2019-05-04 12:54 PM
Firstly I'm very new to all of this so apologies if this is trivial.
I have been trying to debug and run a simple blinking led project onto a STM32WB nucleo board using the STM32CubeIDE v1.0 (MacOS). After staring the debugging session, the console displays download verified successfully yet I do not have the option to run the project only pause or terminate.
Using breakpoints it seems to be getting hung up at the line, bl SystemInit in the file startup_stm32wb55rgvx.s and never actually gets to the main function.
The project was created with the cubeMX inside the IDE. All firmware and software has been updated.
Im asking this here because I have had success with the Atollic TrueStudio IDE which makes me think this issue is IDE based?? Or do i just have change some settings?
2019-05-04 02:45 PM
Well indicative of some broken expectations in the function. You should stop the debugger and SEE where it is stuck, most likely the Error_Handler or HardFault_Handler.
Often dependencies on clock inputs, pll and flash wait state settings.
Check also compiler/linker command line settings passed by the tool chain, and as meta data in the project itself.
2019-05-05 07:58 AM
It's almost certainly not the IDE. When you pause the code (which breaks into the running process), what function is the CPU in?
2019-05-05 12:10 PM
The CPU is in the HardFault_Handler as @Community member suspected it would be
2019-05-05 12:55 PM
Where can i find these settings?
2019-05-05 01:20 PM
Check your compiler flags. Ensure you're compiling to the Thumb instruction set and not the ARM instruction set.
2019-05-05 01:44 PM
Are you talking about the -mthumb part?
This is the first line of the console when i build the project.
arm-none-eabi-gcc -mcpu=cortex-m4 -c -x assembler-with-cpp --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Startup/startup_stm32wb55rgvx.o" "../Startup/startup_stm32wb55rgvx.s"
2019-05-05 02:37 PM
Hm; that was what caused my problems when I first started into the world of STM32. You'll have to single-step through the disassembly and find the instruction on which the processor is hard faulting.
2019-05-05 02:57 PM
Righto, thanks for the help so far!