AnsweredAssumed Answered

External RAM setup

Question asked by Mohsin455 on Feb 4, 2013
Latest reply on Feb 5, 2013 by Mohsin455

Hi All,

 

          I am using K60N512, MQX3.8 and IAR tools. I am using external RAM in my custom board and it works fine. Now I want to add a new section to my linker file so that I can store the data of my choice in external RAM. I have added a new section EXTERNAL_RAM as below. But when I use this linker file, the board does not boot. It looks like somehow the vectors are not being populated correctly. Can anyone please advise the what could be wrong ?



define memory mem with size = 4G;

define region ROM_region   = mem:[from __ICFEDIT_region_ROM_start__   to __ICFEDIT_region_ROM_end__];

define region RAM_region   = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__];

define region ERAM_region  = mem:[from __EXTERNAL_RAM_BASE to __EXTERNAL_RAM_END ];     /* External RAM section */

 

 

define block KERNEL_DATA with alignment = 8 { section .kernel_data };

 

define exported symbol __FLASHX_SECT_SIZE = 0x800;

define exported symbol __FLASHX_END_ADDR = __INTERNAL_FLASH_BASE + __INTERNAL_FLASH_SIZE;

 

define block CFMPROTROM with size = 20 { section .cfmconfig };

define block FLASHX_POOL with alignment = __FLASHX_SECT_SIZE { section .flashx };

define block TEXTSECTION with alignment = 4 { section .text };

keep { section .cfmconfig };

keep { section .flashx };

 

initialize by copy { readwrite };

do not initialize  { section .noinit };

do not initialize  { section .kernel_data };

do not initialize  { section .flashx };

 

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec, block CFMPROTROM };

place in ROM_region { first block TEXTSECTION, readonly,  last block FLASHX_POOL };

 

place at address mem:__ICFEDIT_region_RAM_start__ { readwrite section .vectors_ram };

 

place in ERAM_region  { section EXTERNAL_RAM };        /* External RAM section */

/* each block/segment must be in one line (association to region) because I need kernel data start after other datas */

place in RAM_region   { readwrite, last block KERNEL_DATA };


Thanks,

Mohsin

Outcomes