ARM Technical Support Knowledge Articles

CREATING A HEX FILE WITH CONSTANTS ONLY

Applies to: General Topics

Answer

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.

Article last edited on: 2004-05-10 21:34:08

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential