Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for G031/G041 chips. #825

Merged
merged 2 commits into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/stlink/chipid.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ enum stlink_stm32_chipids {
STLINK_CHIPID_STM32_G4_CAT2 = 0x468, // See: RM 0440 s46.6.1 "MCU device ID code".
STLINK_CHIPID_STM32_G4_CAT3 = 0x469,
STLINK_CHIPID_STM32_L4RX = 0x470, // taken from the STM32L4R9I-DISCO board
STLINK_CHIPID_STM32_G0_CAT1 = 0x466, // G031/041
STLINK_CHIPID_STM32_G0_CAT2 = 0x460, // G071/081
STLINK_CHIPID_STM32_WB55 = 0x495
};

Expand Down
1 change: 0 additions & 1 deletion include/stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

// cortex core ids
#define STM32VL_CORE_ID 0x1ba01477
#define CS32VL_CORE_ID 0x2ba01477
#define STM32F7_CORE_ID 0x5ba02477

// Constant STM32 memory map figures
Expand Down
2 changes: 1 addition & 1 deletion src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@ static int stlink_write_option_bytes_g0x(stlink_t *sl, uint8_t* base, uint32_t l

/* Check if chip is supported and for correct address */
if(sl->chip_id != STLINK_CHIPID_STM32_G0_CAT1 &&
sl->chip_id != STLINK_CHIPID_STM32_G0_CAT2) {
sl->chip_id != STLINK_CHIPID_STM32_G0_CAT2) {
ELOG("Option bytes writing is currently only supported for the STM32G0\n");
return -1;
}
Expand Down
1 change: 0 additions & 1 deletion src/flash_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ int stlink_flash_loader_write_to_sram(stlink_t *sl, stm32_addr_t* addr, size_t*
loader_code = loader_code_stm32l;
loader_size = sizeof(loader_code_stm32l);
} else if (sl->core_id == STM32VL_CORE_ID ||
sl->core_id == CS32VL_CORE_ID ||
sl->chip_id == STLINK_CHIPID_STM32_F1_MEDIUM ||
sl->chip_id == STLINK_CHIPID_STM32_F3 ||
sl->chip_id == STLINK_CHIPID_STM32_F3_SMALL ||
Expand Down