hello !! please i want to know how could i control the placement of RW data of a "xxxx.o" on a specific region into the flash PS : my input is a .axf file and my output would be a .hex file
"linker will copy data from flash to RAM ... position into internal flash before linking process"
The linker is a tool on your PC which runs at the time you build your project - it does not exist in the Target, and so does not do any copying of data between Flash and RAM.
However:
"hope that my goal is some what clear now"
I think so: you want to know where in Flash the initialisation data is stored?
I think Westonsupermare Pier has answered that?
But it is still not clear why you want to know it? What is your end goal? What are you actually trying to achieve by all this?
www.catb.org/.../smart-questions.html
in order to reorganize them , it means i have some module i want to allocate their RW in specific field in internal flash , also i shouldn't do it with modification in c code
And why can't you manage this in the scatter file? By modifying the objects passed to the linker? Or by writing your own linker?
The complexity of what you are trying to attempt seems rather high compared to the skills you're bringing to the party.
Most of the options would start with you understanding the AXF/ELF object format, and then you're ability to modify and change the data, and the things that refer to the data, both directly and indirectly.
>>ok Pier but is debug mode the only way to see the scatterload function and Region$$Table$$Base ?
They are accessible at an application level
But why do you feel the need to reorganise them?
Again, what are you trying to accomplish by this?
OP wants to modify or patch the linker output to change section/structure/variable placement after-the-fact, and apparently can't/won't use the more appropriate methods to achieve that.
Basically wants to drive down the freeway in the wrong direction because the exit looks closer and refuses to make left turns.
is it possibile to accomplish my task with partial linking ? and how could i could i get them from an application level as you said
Again, we don't know what your actual task is!
You seem to be fixated on this "partial linking" thing, but there's no evidence that it's a good or necessary approach.
This is why we keep asking you what the end goal is.
Again, please see: www.catb.org/.../smart-questions.html - you are focussing on the step, not the goal.
I think there are 2 possibilities:
1. You are over-complicating a standard task, which has a well-used, simple solution;
2. You really do have some special-case, complex requirement.
But we can't tell which unless you describe the end goal.
And we can't help you effectively without understanding the end goal.
The suspicion is strongly that it is case number 1.
My end goal is to implement section overlay for many modules . my current goal is how to reorganize RW section for that modules in specific adresses into internal flash for scheduling reason for the overlay manager . is it clear now ?
and why do you feel the need to do that?
Have you reviewed how others do it?
As Westonsupermare Pier said, it does seem that you need to spend a bit more time getting a firm grasp of the basics before moving on to advanced stuff like this.
Is this a school project?
ok thanks for your help
ARM Linker User Guide > Scatter-loading Features > Placement of sections with overlays
www.keil.com/.../armlink_pge1362066004071.htm
Ponder using a loader, so your code can load different modules. The ELF object format allows for a DLL type use case.
The format may be overly complicated for such a task, and a simpler more custom solution may be more workable.
in fact that's my goal , to implemant a dynamic loader but you didn't answer me sir how "they are accessible at an application level" ?
That means that your application code can "see" them - and, thus, use them.
Again, for a project like this, you really need to spend some significant time becoming properly familiar with the tools; eg,
The list of "Load$$..." execution region symbols is here: www.keil.com/.../armlink_pge1362065953229.htm
which points you to, among other things:
Methods of importing linker-defined symbols in C and C++
Methods of importing linker-defined symbols in ARM® assembly language
that's for coding in assembly or source mode but am just searching the address where a section or region is loaded into memory before the image containing it starts executing.
... but am just searching the address where a section or region is loaded into memory before the image containing it starts executing
Then YOU'd better start reading the documentation on the AXF/ELF format. They YOU can start writing your loader.