On Mon, 30 Nov 2009, Frieder Ferlemann wrote:
> Hi Gordon,
>
> Gordon Henderson schrieb:
>>> is there any command that parses the .hex files and tells you the how
>>> much code ?
>>
>> Actually, I've just found out by accident that the standard unix 'size'
>> command will parse the hex files - approximately. I guess it just lumps
>> everything into one big segment, but it's almost right!
>>
>> If I can be bothered I'll write something, but it's good enough for now.
>
> you can use srec_info from the srecord package. Recommended anyway:)
> Cross platform. At http://srecord.sf.net
A-Ha ...
> example of its output:
>
>> srec_info interrupt.hex --intel
> Format: Intel Hexadecimal (MCS-86)
> srec_info: interrupt.hex: 11: warning: data records not in strictly ascending
> order (expected >= 0x00A5, got 0x0046)
> Data: 0000 - 0003
> 000B - 000D
OK...
$ srec_info thingy.hex --intel
Format: Intel Hexadecimal (MCS-86)
Data: 000000 - 0173E3
300000 - 30000D
$ size ddplan.hex
text data bss dec hex filename
0 95218 0 95218 173f2 thingy.hex
So size is recording the 14 extra bytes of config data in the 300000 range
(and is in decimal). This is for a 96KB device - 98304 bytes - minus the
bootloader... It's getting tight!
Another bit of code I have (hexfile only - I think MPLAB generated) comes
out as:
Data: 000000 - 017F01
200000 - 200007
300000 - 30000D
F00000 - F003FF
And that's why size reports it being bigger than the device.
Thanks,
Gordon
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user