I have a small problem. We have a big project that use an AT91SAM7S
part. We have build a bootloader that can download all the application
and/or only a section of code that need to be change to optimize the
time that is needed to download the application (via an RS485 network).
So What I did is modified the Linker script to add some new section of
code (userControl) and RAM (DataUser and BssUser).
This is work great. I can have 2 bin file. 1 with all the code main.bin
and 1 with the UserControl section only.
SO I can download both bin and everything work.
Now the problem.
The way I build the code, I have only 1 entry point in the Usercontrol
section from the main.bin file. The entryFonction is the only link
between the main application and the usercontrol application.
The problem that I have, is the linker add some code (stub) before the
Entryfonction and of course change the entry adress of the function. So
When I only download the Usercontrol bin file, the main application try
to jump to a wrong adress.
I compile mthumb files with interworking option. I would like to know if
it is possible to have the linker do not generate the stub if the caller
function is in thumb mode and the callee fonction is in the thumb mode
I need to have the UserControl EntryPoint always at the same adress.
I'll attach the ld file and the makefile.