AnsweredAssumed Answered

hard fault handler (main load)

Question asked by david lion on Mar 6, 2017
Latest reply on Mar 8, 2017 by david lion

Hi, I have a problem when I try to load my program. I use the arm compiler (armcc) with a stm32l073.

When I use my debugger I have an Hard Fault handler every times before the main.

I use a standard statup file (startup_stm32l073xx.s). and with the debugger I can see that when   BX R0 is called the program goes in HardFault_Handler. 

I use 40kb of flash and 14kb of ram.


Here the emplacement where the program crashes :


Reset_Handler PROC
                           EXPORT Reset_Handler [WEAK]
         IMPORT __main
         IMPORT SystemInit
                           LDR R0, =SystemInit
                           BLX R0
                           LDR R0, =__main
                           BX R0


If someone knows where is the problem ...

Thanks !