(Sorry if this is not the correct forum .. but there is no specific GCC forum as yet)
Trying to use the GCC __attribute__ (section(("label"))); but it gives me errors... (in CCSv6)
error: no memory region specified for loadable section `APP_DATA_TSTAMP'
Any ideas here? Did I miss a compile switch or such?
I seem to have followed the documentation properly, and a few examples I've seen agree..
------------------------
GCC documentation
section ("section-name")
Normally, the compiler places the code it generates in the text section. Sometimes,
however, you need additional sections, or you need certain particular
functions to appear in special sections. The section attribute specifies that a
function lives in a particular section. For example, the declaration:
extern void foobar (void) __attribute__ ((section ("bar")));
puts the function foobar in the bar section.
Some file formats do not support arbitrary sections so the section attribute
is not available on all platforms. If you need to map the entire contents of a
module to a particular section, consider using the facilities of the linker instead.
..... example code ...
// FRAM Array reserved to store FRAM Log Mode starting Time Stamp
#if defined(__IAR_SYSTEMS_ICC__)
#pragma location = 0xF002
__no_init uint8_t timeStamp[6];
#elif defined(__TI_COMPILER_VERSION__)
#pragma location = 0xF002
#pragma NOINIT(timeStamp)
uint8_t timeStamp[6];
#elif defined(__GNUC__)
uint8_t timeStamp[6] __attribute__ ((section("APP_DATA_TSTAMP")));
#endif
..... linker output..
'Building target: OutOfBox_FR5969.out'
'Invoking: GNU Linker'
"C:/TexasInstruments/ccsv6/tools/compiler/gcc_msp430_4.9.14r1_10/bin/msp430-elf-gcc.exe" -mmcu=msp430fr5969 -Os -g -gstrict-dwarf -Wall -Wl,-Map,"OutOfBox_FR5969.map" -o"OutOfBox_FR5969.out" "./FRAMLogMode.o" "./LiveTempMode.o" "./main.o" "./driverlib/MSP430FR5xx_6xx/adc12_b.o" "./driverlib/MSP430FR5xx_6xx/aes256.o" "./driverlib/MSP430FR5xx_6xx/comp_e.o" "./driverlib/MSP430FR5xx_6xx/crc.o" "./driverlib/MSP430FR5xx_6xx/cs.o" "./driverlib/MSP430FR5xx_6xx/dma.o" "./driverlib/MSP430FR5xx_6xx/eusci_a_spi.o" "./driverlib/MSP430FR5xx_6xx/eusci_a_uart.o" "./driverlib/MSP430FR5xx_6xx/eusci_b_i2c.o" "./driverlib/MSP430FR5xx_6xx/eusci_b_spi.o" "./driverlib/MSP430FR5xx_6xx/fram.o" "./driverlib/MSP430FR5xx_6xx/gpio.o" "./driverlib/MSP430FR5xx_6xx/mpu.o" "./driverlib/MSP430FR5xx_6xx/mpy32.o" "./driverlib/MSP430FR5xx_6xx/pmm.o" "./driverlib/MSP430FR5xx_6xx/ref_a.o" "./driverlib/MSP430FR5xx_6xx/rtc_b.o" "./driverlib/MSP430FR5xx_6xx/sfr.o" "./driverlib/MSP430FR5xx_6xx/sys.o" "./driverlib/MSP430FR5xx_6xx/timer_a.o" "./driverlib/MSP430FR5xx_6xx/timer_b.o" "./driverlib/MSP430FR5xx_6xx/tlv.o" "./driverlib/MSP430FR5xx_6xx/wdt_a.o" "./driverlib/MSP430FR5xx_6xx/deprecated/cs.o" "./driverlib/MSP430FR5xx_6xx/deprecated/dma.o" "./driverlib/MSP430FR5xx_6xx/deprecated/fram.o" "./driverlib/MSP430FR5xx_6xx/deprecated/mpy32.o" "./driverlib/MSP430FR5xx_6xx/deprecated/pmm.o" "./driverlib/MSP430FR5xx_6xx/deprecated/sfr.o" "./driverlib/MSP430FR5xx_6xx/deprecated/sys.o" -T"../msp430fr5969.ld" -Wl,--start-group -l"c" -l"gcc" -Wl,--end-group
c:/texasinstruments/ccsv6/tools/compiler/gcc_msp430_4.9.14r1_10/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld.exe: error: no memory region specified for loadable section `APP_DATA_TSTAMP'
collect2.exe: error: ld returned 1 exit status
gmake: *** [OutOfBox_FR5969.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****