How to create the STM32CubeMx project?

This problem has been solved, just configure the path to compile successfully!

Here’s what I configured:

[env:disco_l152rb]
platform = ststm32
board = disco_l152rb
framework = stm32cube

; change microcontroller
board_build.mcu = stm32l151rbt6

; change MCU frequency
board_build.f_cpu = 32000000L

upload_protocol = jlink ; SWD interface
debug_tool=jlink

build_flags = -DL1
-Isrc/Core/Inc

1 Like