stm32-cmake: Nucleo STM32F103RB being bricked, blinky example not running
Hi,
I’m trying to use your toolchain for STM32F103RB development, while I’m constantly having this issue.
I was trying with my own application first, but I decided to try with your blinky example.
I’ve removed F4 and L0 targets, and left only F1 with change to F103 device.
I’m configuring CMake with simple cmake -DCMAKE_MODULE_PATH=…/cmake …/blinky
I’m generating hex file using extra target:
ADD_CUSTOM_TARGET(${TARGET}.hex DEPENDS ${TARGET} COMMAND ${CMAKE_OBJCOPY} -Oihex ${FILENAME} ${FILENAME}.hex)
After running make blinky.hex I get successful build and the artifacts.
After flashing nucleo with generated binary, nucleo is no longer visible by flasher application. I need to switch to Windows and use ST’s official app and flash with reset button pressed. This helps to nucleo being visible, but flashing hex file with official flasher also do not the app to start blink led.
Previosly I was using TrueStudio configuration and everything was working fine.
Can you help?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16
Maybe the MCU actually goes to sleep with
__WFI()wich is not the case with your other toolchain https://github.com/ObKo/stm32-cmake/blob/293cef4a83accdb9038506156484d4b27c7c704b/examples/blinky/blinky.c#L57The sleep could explain the connection loss. Please just replace the
__WFIwith an emptywhile(1);loop and try again.Yes, I’m using this board exactly. To the community: if anyone reading this had chance to use this project with the same or similar Nucleo board, please let me know. Also if anyone own this board, I would be grateful for checking blinky example.
Thanks for further advice, I will correct this.
Yes, I guess I have no choice. I anything comes to your mind, please let me know.
I have one extra idea - I have also Nucleo board with STM32H7, so I will try how my environment builds binary for that board. If it will be incorrect too, it could be some environment issue…