Tool/software: TI C/C++ Compiler
How can I control the placement of the "c_int00" program entry point with the TI Compiler for CortexM and C6x devices?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
How can I control the placement of the "c_int00" program entry point with the TI Compiler for CortexM and C6x devices?
The following Program.sectMap entries in a .cfg file will align "c_int00" on a 0x800 byte boundary within the "SDRAM" memory segment for C6x targets:
Program.sectMap[".c_int00 { boot.ae64P<boot.oe64P> (.text) }"] = new Program.SectionSpec(); Program.sectMap[".c_int00 { boot.ae64P<boot.oe64P> (.text) }"].loadSegment = "SDRAM"; Program.sectMap[".c_int00 { boot.ae64P<boot.oe64P> (.text) }"].loadAlign = 0x800;
The above tells the linker to extract the .text section in boot.oe64P from the library file boot.ae64P and place it in a section called ".c_int00" and place that section in SDRAM aligned on a 0x800 byte boundary. Since there is only one function, "c_int00" in the boot.oe64P, this will align the function "c_int00" on a 0x800 byte boundary.
The following Program.sectMap entries will precisely place the address of "c_int00" at location 0x80012000 for C6x targets:
Program.sectMap[".c_int00 { boot.ae64P<boot.oe64P> (.text) }"] = new Program.SectionSpec(); Program.sectMap[".c_int00 { boot.ae64P<boot.oe64P> (.text) }"].loadAddress = 0x80012000;
Note:
For various flavors of C6x targets, you'll need to modify the above file extensions accordingly (ie use .ae66 and .oe66 for the C66 ELF target). The same pattern follows for Arm targets. Examples for Arm targets will be given below. You may also need to modify the file extensions and provide them with a partial path relative to the project-specific linker library search path. For example, "ti/targets/arm/rtsarm/lib/boot.aem4f<boot.oem4f>" should be used in place of "boot.aem4f<boot.oem4f>".
The following Program-sectMap entries will place "c_int00" somewhere in FLASH, aligned on a 0x800 byte boundary for Arm Cortex-M4F targets:
Program.sectMap[".c_int00 { boot.aem4f<boot.oem4f> (.text) }"] = new Program.SectionSpec(); Program.sectMap[".c_int00 { boot.aem4f<boot.oem4f> (.text) }"].loadSegment = "FLASH"; Program.sectMap[".c_int00 { boot.aem4f<boot.oem4f> (.text) }"].loadAlign = 0x800;
The following Program-sectMap entries will place "c_int00" at location 0x1000 for Arm Cortex-M4F targets:
Program.sectMap[".c_int00 { boot.aem4f<boot.oem4f> (.text) }"] = new Program.SectionSpec(); Program.sectMap[".c_int00 { boot.aem4f<boot.oem4f> (.text) }"].loadAddress = 0x1000;
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.