avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Binary image length


From: Shaun Jackman
Subject: [avr-gcc-list] Binary image length
Date: Tue, 21 Nov 2006 16:29:42 -0700

What's the best approach to place the length of a binary firmware
image in the image itself at a constant location in the image? If
possible, I'd like to avoid using a linker script. I suppose the ideal
location for the firmware length would be immediately following the
interrupt vector table. On my ATMEGA64, this address appears to be
0x8c. I've noticed that the progmem section is placed at this
location. So, I suppose one solution would be to place as the first
declaration in the first file specified on the command line link
order:

extern char __data_load_end;
const prog_uint16_t image_size = (uint16_t)&__data_load_end;

Checking just now, this approach seems to work. Any better suggestions?

Thanks,
Shaun




reply via email to

[Prev in Thread] Current Thread [Next in Thread]