This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ENTRY directive for assembly code

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

Parents Reply Children
No data