TI E2E Community
Stellaris® ARM® Microcontrollers
Stellaris® ARM® LM3S Microcontrollers Forum
Reserving checksum section via linker command file
I am interested in reserving a four-byte section in my binary image for storing a 32-bit CRC (using an external app). IAR Embedded Workbench has a linker option for this but I am using CCS4 which does not. I found the following related post:
but it does not mention how to reseve the four-byte section in flash!
Any help would be appreciated!
You can find details on the linker command script syntax in this document. The sections 7.5 (eg. 7.5.10 Creating and Filling Holes) and maybe even 7.9 would probably be of interest to you (although I haven't looked too closely at section 7.9).
Correction: That's the wrong toolchain document. Please see this one instead. The section numbers still appear to match up.
Add these line to the startup_ccs.c file after the interrupt vector section
#pragma DATA_SECTION(g_CRCLocation, ".intvecs")
const long g_CRCLocation = 0;
Thanks to both Mitch and David for looking in to this! I ended up going with David's suggestion: it lets me reserve 4 bytes worth at the end of the .intvecs section for the CRC - works perfectly!
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. 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 respect to these materials. 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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.