ok I know size doesn’t matter, but…
how do you tell how big your program is?
I tried looking at the size of the .hex file - nah not that
ok I know size doesn’t matter, but…
how do you tell how big your program is?
I tried looking at the size of the .hex file - nah not that
Hello.
I have a somewhat lame solution (hopefully David can chime in if there is a better one):
Open the text file in a text editor like notepad look at the highest address used. Each hex file line begins with a start code, a two-digit (hex) byte count, and a four-digit (hex) address. You can find out more about the Intel hex file format here:
en.wikipedia.org/wiki/Intel_HEX
- Ben
In your application directory, you should find a “.mem” file that is created during compilation. Here is the .mem file for a recent compilation of the wireless serial app:
Internal RAM layout:
0 1 2 3 4 5 6 7 8 9 A B C D E F
0x00:|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|
0x10:|a|a|a|a|a|a|b|b|b|b|b|b|d|e| | |
0x20:|B|B|B|B|T|c|c|c|c|c|c|c|c|f|f|f|
0x30:|f|f|f|f|f|Q|Q|Q|Q|S|S|S|S|S|S|S|
0x40:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x50:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x60:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x70:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x80:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x90:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xa0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xb0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xc0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xd0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xe0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xf0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0-3:Reg Banks, T:Bit regs, a-z:Data, B:Bits, Q:Overlay, I:iData, S:Stack, A:Absolute
Stack starts at: 0x39 (sp set to 0x38) with 199 bytes available.
Other memory:
Name Start End Size Max
---------------- -------- -------- -------- --------
PAGED EXT. RAM 0xf000 0xf03e 63 256
EXTERNAL RAM 0xf000 0xf3f8 954 3840
ROM/EPROM/FLASH 0x0400 0x243f 8256 29696
From the above you can see that the app is only taking up 8256 out of 29696 bytes of Flash, 954 out of 3840 bytes of XDATA, 63 out of 256 bytes of PDATA, and you can see the layout of the internal RAM (199 bytes available for the stack).
If you want more details on what is occupying the space, see the .map file.
–David
absolutely stunning
exactly what I wanted
(now have to work out how to make program smaller as I want to cram a lot more features in!)