cancel
Showing results for 
Search instead for 
Did you mean: 

New ST32MX prjoject goes straight to HardFault_Handler

sde c.1
Senior II

Hi All,

I have created a new ST32IDE/ST32MX project for controller STM32G473CET6-01 at my own PCB.

USART, CRC and FREERTOS is added .

This project compiles fine, but the moment i press the debug button ,it goes straight to void HardFault_Handler(void) ?

This happens without pressing the Resume(F8) button after debugger is loaded.

Wondering why this happen?

As STM is new for me , i hope to get an easyer asnwer then "search the hardware fault", i didn't expect this problem with an empty project . 😅

The first thing i wanted to try do is remove RTOS, but it seems that not possible, do i need to create a new project in that case?

Thank you !

0693W000007EZPqQAO.png 

1 ACCEPTED SOLUTION

Accepted Solutions
sde c.1
Senior II

misterie solved, a wrong STM32 was placed . thanks for the responses !

View solution in original post

4 REPLIES 4
KnarfB
Principal III

Would create a new minimal project for testing. You can set a breakpoint at the very first instruction (Reset_Handler) instead of main: Debug Configuration > Startup and then step-trough the code. You should also check the .map file that the addresses look reasonable (Flash, SRAM). Sometimes there were issues with reading the right .ld file. RTOS should not matter before main().

Pavel A.
Evangelist III

The fault analyzer shows stacking error and MSP=2001FDD8

Is this a valid RAM address for this part?

-- pa

It has 128KB of RAM, the 0x20018000..0x2001FFFF is an alias of the CCM at 0x10000000..0x10007FFF

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sde c.1
Senior II

misterie solved, a wrong STM32 was placed . thanks for the responses !