Hi,
I am trying to understand the startup code and assembly language (more for learning and not for a specific project) for ARM Cortex M4.
I made a project in KEIL with just one assembly file and added a stack declaration and a vector table there. It was based on STM32F4 startup file in the Keil software pack.
In the reset handler I added just a couple of lines of code to load an immediate value into R0 and R1.
The program worked fine in the simulator however there was a warning issued during build - Warning: L6305W: Image does not have an entry point. (Not specified or not set due to multiple choices.).
Searching on the net, it led me that the ENTRY directive is required so the code knows where to start. So there should be either an ENTRY directive if programming in pure assembly or there should be __main symbol if programming in C.
Adding and ENTRY directive after the RESET code section helped eliminate the warning. But I wonder that even without ENTRY directive, the code worked properly. So what is the significance of the directive, if any? Or it is necessary for the ARM7 etc. and not for Cortex M?
Thanks,
Gopal
Hi Gopal, I am trying and failing to do exactly what you have achieved here. Simple ASM file including the startup code for the STM32F4. I only want to write to a couple of registers, extremely simple it is complaining about me not seeing up my vectors properly though.
is there any chance you could share your ASM file here? It would help me immensely
Hi samwalsh
I have uploaded my startup file here - http://community.arm.com/docs/DOC-9701
This is basically taken from the ST Micro's packs - available with KEIL and also with the STM32 Cube.
What exactly is the error you are getting?