Hi,
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:
http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/t/170432.aspx
but it does not mention how to reseve the four-byte section in flash!
Any help would be appreciated!
Thanks!
TC
Hello Torsten,
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!