We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Refer to http://www.keil.com/demo/limits.asp
ARM Evaluation Tools:
Point 4: The debugger supports programs that are 16K Bytes or smaller.
Point 9: The CARM compiler, assembler, and linker are limited to 16K Bytes of object code. Source code may be of any size.
My source file (.c) size is 2KB. After compilation, its object file is of 21KB.
But, I still run the debugger successfully ?
It isn't the size of the object file that matters. It's the size of the generated code. Check the code size in the map file.
Do you refer to, say, filename.map ?
I check in the D/A Example Program folder download from
http://www.keil.com/download/docs/283.asp
In dac.map file, the last second line states
Program Size: data = 1301 const=160 code=676
then meaning the 'generated code' is 1301+160+676 = 2137 Bytes, roughly 2KB, after compilation ?
Thanks much
The limit is for code - not for data.
"I still run the debugger successfully ?"
Is that a question, or a statement?
ie, are you asking whether you should be able to run the debugger, or are you saying that you can run the debugger - and you're surprised?
Now that the meaning of the size limitation has been explained, are all your doubts removed?
Thanks much, code size =676 Byte
Problem solved. Thank you.
Was there every any actual problem, or was it just a question/observation?
Below is just our thought, maybe wrong, we are not graduated from Computer Science.
We add three more command lines in main program:
i = 1; j = 2; k = i*j;
the code size will have an increment of 20 bytes, after compilation.
We then think code size measurement is in assembly instruction, not in C command.
There is no direct correlation between number of C source lines or number of C statements, and number of assembler instructions generated.
There is no direct correlation between number of assembler instructions and number of code bytes - different assembler instructions has different size.
Code size is number of bytes of processor instructions (machine code).
The processor does not care about if you have written the program using assembler instructions or if you have used a high-level language. All it cares about is the contents of the individual code bytes. The limits for the evaluation version of the Keil tools don't care about number of lines of assembler or number of lines of C. They care about number of bytes of produced machine code for the processor to run.
Thanks much, it is clear.