AnsweredAssumed Answered

STM32F372 first project

Question asked by madroadbiker on Nov 28, 2013
Latest reply on Nov 29, 2013 by madroadbiker
I am new to ARM and am trying to create my very first project using an STM32F372CC micro. I have a prototype board connected to a STM32L discovery board. I am using Keil uVision V4.70.0.0. I can compile and download to the prototype board. But when I run, it goes to the hardfault handler in startup_stm32f37x.s which I obtained from the ST library. I searched this forum for everything I could find for hardfault but nothing addresses my problem. The problem must something very basic maybe in the setup or maybe I'm not using the correct startup file because the error occurs before it ever gets to any of my code. I can trace through the code from Reset_Handler in the startup file. In Reset_Handler it calls SystemInit and returns ok. Then there is a LDR R0, =__main instruction followed by a BX R0. When I step through the BX R0 instruction, it goes to __user_initial_stackheap in the startup file. That eventually leads to a BX LR instruction which, when executed, goes right to the HardFault_Handler also in startup.
Am I using the wrong startup file (startup_stmf37x.s)? I don't know where to go from here. I would greatly appreciate some help. Thank you very much.

Outcomes