Technical Support

GENERAL: CREATING A HEX FILE WITH CONSTANTS ONLY

QUESTION

I am trying to burn an eprom with only constants, no code. How can I get the compiler not to add the startup code to the beginning of my hex file?

ANSWER

First, make sure there is no main function in your code. If there is, the compiler ALWAYS includes the startup code.

Then add #pragma SRC to the top of your C file. This forces the compiler to generate assembler code instead of an object file. Assemble and link the resulting .SRC file and the startup code will not be included.

Last Reviewed: Monday, May 10, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure