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.
Hi guys,
I am currently using the evaluation software C51 tool kit to compile my c code into machine code. Apparently, this version of software has a limitation of 2k of object code. At first I thought that will be a .hex file, but then after I manage to squeeze my code size to a size that the version is able to compile (before that it always comes out with a message saying I exceed the 2k limit), I realise that my .hex file is around 8kB, so it is clear that that is not the one. I would like to ask what does it mean by object code? Which will be the file that cannot exceed 2k of size? Shouldn't be the one with .obj as well I think, as those exceed 2k as well.
Thanks guys.
Regards, Siang
As Per pointed out, the hex file size does not directly reflect the code/data size of your program. With the evaluation tools, you can compile code that exceeds the 2K limit but the linker restricts object code to the 2K limit. The Keil object file is found in your project files with the same name as your project but with NO file extension. Object files can contain symbol linkage for source level debugging but the object to hex converter will strip these symbol links. I agree with Per that a fair rule of thumb is the actual binary code size will be about 40% of the hex file size. Bradford