Skip to content

Commit

Permalink
Merge pull request #997 from rutgerhendriks/develop
Browse files Browse the repository at this point in the history
[feature] Option bytes on the STM32F767 ZIT6 Nucleo-144
  • Loading branch information
Nightwalker-87 committed Jul 19, 2020
2 parents 56a699d + 2dd47a4 commit f162a5d
Show file tree
Hide file tree
Showing 7 changed files with 749 additions and 111 deletions.
10 changes: 9 additions & 1 deletion inc/stlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ enum stlink_flash_type {
STLINK_FLASH_TYPE_UNKNOWN = 0,
STLINK_FLASH_TYPE_F0, // used by f0, f1 (except f1xl),f3. */
STLINK_FLASH_TYPE_F1_XL, // f0 flash with dual bank, apparently */
STLINK_FLASH_TYPE_F4, // used by f2, f4, f7 */
STLINK_FLASH_TYPE_F4, // used by f2, f4 */
STLINK_FLASH_TYPE_F7,
STLINK_FLASH_TYPE_L0, // l0, l1 */
STLINK_FLASH_TYPE_L4, // l4, l4+ */
STLINK_FLASH_TYPE_G0,
Expand Down Expand Up @@ -289,7 +290,14 @@ int stlink_fread(stlink_t* sl, const char* path, bool is_ihex, stm32_addr_t addr
int stlink_load_device_params(stlink_t *sl);

int stlink_read_option_bytes32(stlink_t *sl, uint32_t* option_byte);
int stlink_read_option_bytes_boot_add32(stlink_t *sl, uint32_t* option_byte);
int stlink_read_option_control_register32(stlink_t *sl, uint32_t* option_byte);
int stlink_read_option_control_register1_32(stlink_t *sl, uint32_t* option_byte);

int stlink_write_option_bytes32(stlink_t *sl, uint32_t option_byte);
int stlink_write_option_bytes_boot_add32(stlink_t *sl, uint32_t option_bytes_boot_add);
int stlink_write_option_control_register32(stlink_t *sl, uint32_t option_control_register);
int stlink_write_option_control_register1_32(stlink_t *sl, uint32_t option_control_register1);

int stlink_write_option_bytes(stlink_t *sl, stm32_addr_t addr, uint8_t* base, uint32_t len);
int stlink_fwrite_option_bytes(stlink_t *sl, const char* path, stm32_addr_t addr);
Expand Down
1 change: 1 addition & 0 deletions inc/stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
#define STM32_F2_OPTION_BYTES_BASE ((uint32_t)0x1FFFC000)
#define STM32_L4_OPTION_BYTES_BASE ((uint32_t)0x1FFF7800)
#define STM32_L1_OPTION_BYTES_BASE ((uint32_t)0x1FF80000)
#define STM32_F7_OPTION_BYTES_BASE ((uint32_t)0x1FFF0000)

#endif // STM32_H
Loading

0 comments on commit f162a5d

Please sign in to comment.