AnsweredAssumed Answered

Mapping variable to user-defined section

Question asked by Peter Liedholm on Oct 21, 2011
Latest reply on Oct 21, 2011 by Peter Liedholm

Hi

I cannot get any way to map a variable to a specific section to work.

 

Memory section is created by processor expert, here it is called mysection

 

From processorexpert.lcf

MEMORY {  interrupts  (RX) : ORIGIN = 0x1FFF0000, LENGTH = 0x000001E0  code        (RX) : ORIGIN = 0x1FFF01E0, LENGTH = 0x00015220  data14000000 (RW) : ORIGIN = 0x14000000, LENGTH = 0x00001000  data        (RW) : ORIGIN = 0x20005400, LENGTH = 0x00006C00  mysection   (RW) : ORIGIN = 0x2000C000, LENGTH = 0x00004000  cfmprotrom  (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010}

 Here are some traces on what I have tried to map a variable to "mysection"

#pragma define_section MYSECTION ".bss"  far_absolute RW//#pragma section MYSECTION begin//uint16_t adcIn[8192] __attribute__ ((align (8));uint16_t adcIn[8192] __attribute__ ((section ("MYSECTION")));//__declspec(MYSECTION) uint16_t adcIn[8192];//uint16_t adcIn[8192];//#pragma section MYSECTION end

 The compilation/linking is OK, but the variable "adcIn" maps to section "data" no matter what.

 

Any ideas?

Outcomes