How do I place program sections at a particular position in memory?
The location a program section is placed in memory is specified by the section placement file.
Section placement files consist of a number of named memory segments. Contained within each memory segment will be a number of program sections. A program section's Input Sections property is used to specify which input sections will be placed in a program section.
For example, to place the contents of the ".foo" section at a particular location in memory:
- Open the section placement file.
- Create a new program section called ".foo" at the required position in the memory map.
- Select the ".foo" program section and modify it's Input Section property to be "*(.foo)"
- Re-build the project.
Note that it is not necessary to create a program section for each input section because multiple input sections can be specified in a program section's Input Section property. For example, if you wanted to place two sections, ".foo" and ".bar", in a single program section, you could do this by setting the program section's Input Section property to be "*(.foo .bar)".
See the Linking and section placement section of the CrossWorks for ARM user guide for more information.
Please sign in to leave a comment.