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

[feature] Added support for STM32L5x2 #1053

Closed
wants to merge 12 commits into from
Binary file added flashloaders/stm32f0.bin
Binary file not shown.
10 changes: 9 additions & 1 deletion inc/stlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ enum target_state {

#define STLINK_DEBUG_APIV2_SWD_SET_FREQ 0x43

//add by wliang
#define STLINK_DEBUG_APIV2_READ_DAP_REG 0x45
#define STLINK_DEBUG_APIV2_WRITE_DAP_REG 0x46
//add by wliang

#define STLINK_APIV3_SET_COM_FREQ 0x61
#define STLINK_APIV3_GET_COM_FREQ 0x62

Expand Down Expand Up @@ -124,9 +129,12 @@ enum stlink_flash_type {
STLINK_FLASH_TYPE_F7,
STLINK_FLASH_TYPE_L0, // l0, l1 */
STLINK_FLASH_TYPE_L4, // l4, l4+ */
STLINK_FLASH_TYPE_L5, // l5x2 */
STLINK_FLASH_TYPE_G0,
STLINK_FLASH_TYPE_G4,
STLINK_FLASH_TYPE_WB
STLINK_FLASH_TYPE_WB,
//add by wliang
STLINK_FLASH_TYPE_H7
};

struct stlink_reg {
Expand Down
7 changes: 4 additions & 3 deletions inc/stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
/* Constant STM32 memory map figures */
#define STM32_FLASH_BASE ((uint32_t)0x08000000)
#define STM32_SRAM_BASE ((uint32_t)0x20000000)
#define STM32_F2_OPTION_BYTES_BASE ((uint32_t)0x1FFFC000)
#define STM32_F7_OPTION_BYTES_BASE ((uint32_t)0x1FFF0000)
#define STM32_G0_OPTION_BYTES_BASE ((uint32_t)0x1FFF7800)
#define STM32_G4_OPTION_BYTES_BASE ((uint32_t)0x1FFFF800)
#define STM32_L0_CATx_OPTION_BYTES_BASE ((uint32_t)0x1FF80000)
#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)
#define STM32_L4_OPTION_BYTES_BASE ((uint32_t)0x1FFF7800)
#define STM32_L5_OPTION_BYTES_BASE ((uint32_t)0x40022040)

#endif // STM32_H
Loading