2019-08-04 09:12 AM
First time using a nucleo board and I am getting started with the stm32cubeide. I have selected the stm32wb55 nucleo board during project creation and used all the defaults for the cubemx autogeneration code which initializes the buttons and leds.
I am able to build the project, but when I run the code the mcu enters the hard fault handler after entering the SystemInit function called in the startup assembly code. The below picture shows the disassembly of the SystemInit function. While stepping through the disassembly, I found that I enter the hard fault handler immediately after executing the "add r7, sp, #0" instruction.
I've looked at other posts and some of the recommendations were to make sure that you compile with -mthumb option and indeed I am as this is one of the compile options specified for the elf file in the makefile. I'm not sure what could be wrong especially since this is all auto-generated and I have not edited a single line of code. All suggestions are appreciated, thanks.
Solved! Go to Solution.
2019-08-04 10:28 AM
2019-08-04 10:28 AM
2019-08-04 10:35 AM
#MadeForSTM32 but not tested