I have a bootloader that works well and I would like my MCF51QE128 project (linker control file?) to formally place the function (void)Boatload_Main(void) at a fixed location. While I am unlikely to move or modify the code I would prefer to have it explicitly tied to a given location.
regards Tom M.
I have found a bug in the bootloader and now must modify the code. The entry point of the code
void BootloaderMain(void) must not change. I have tried a few linker control file directives OBJECT, ALIGN and updates to the location counter, without the result I am looking for.
I suppose I could force the function into its own memory segment, but I'd like to use the tools they way they are intended ( with the least brute force).
regards Tom M
Hello
In order to allocate a function at an absolute address you need to place it in a user defined section and specify where you want to allocate that code in the .lcf file.
That is the only way to achieve that with a function.
CrasyCat
Check out FAQ-27631. While it discusses how to locate constants at specific addresses in flash memory, the technique might be useful for what you are trying to do.
---Tom