Forum : 8051
Original Post
Post Information | Post |
---|---|
September 9, 2009 - 9:49am
|
Hi, I need to bootload the AT98C51CC03 at (for example) address 0xC000. This address can be set by the Atmel Flip application. But how do I make some C-function in my source code, start at this address 0xC000? Thanks, Henk |
Hi Henk,
On the Raisonance Compiler, you can just use the "at" absolute qualifier this way:
The linker will locate the myfunc() function at address 0xC000. There is no need for linker scripts or specific commands.
Regards,
Bruno
Hi Bruno,
Great!
but an additional question is:
How do I make (not only just one single) but a series of (bootloader) c-functions be stored starting from address 0xC000?
thanks
Henk
Henk,
To relocate a set of functions, put them in the same file and use the linker CODE directive.
If your file is FOO.C with main and bye functions.
CODE(?PR?MAIN?FOO(0xC000),?PR?BYE?FOO)
will locate main at 0xC000 followed by bye.
To properly retreive the segment names, copy them from your map file (.M51)
This process is explained in the linker documentation.
Stéphane