Hi, How can I locate the INIT.A51 code at e.g 0x1000? Is it a usual segment? Does the INIT.A51 do anything except initialize static vars?
(The problem is that I want to use a bootloader and 2 images. First the bootloader's startup and init.a51 code will run, then the bootloader code and then I want it to jump to the correct image and initialize the static variables of the specific image chosen...)
Thanks
... but you do not want to.
the app and the bootloader need each their unique init. The co mpiler/linker tailors init to what it is to do.
Erik
So how can I locate the whole chunk of startup and init code at a different location? The only thing that the knowledge database tells you is how to relocate the main function... How can I relocate the startup code? If all the startups and inits will be at 0x0 they willl overrun each other...
P.S The 2 images don't have interrupt vectors so overrunning those isn't an issue.
use your target options->Read/Only Memory areas to set the on-chip ROM start and size for your bootloader/application. that will position your entire program (including the startup code) to the required position, if your selected region is valid of course.
Do you mean to use the BL51 Locate in uVision3?
no; use the target options dialog ("Project->Options for target"). But you can indeed override the settings of the target tab using the "Use Memory Layout from Target Dialog", to arrange it all in a linker scatter file.
The target options dialog has a few tabs. In the 'Target' tab there is no place to decide the location of the code..Only a checkbox that decides if you want to locate the ROM/XRAM ON chip (addresses are given and you can't change them...) or you can set EPROM off chip code and xram addresses.So I couldn't find what you meant...
Did you mean I should use the off chip ROM memory areas and give begin addresses and sizes that are on-chip?
Thank you