I am working on a project with the TMS320F28335 that has hit the limit of the on chip memory. As such I want to push, as much as possible, the memory we are using to the RAM chip we have connected via the XINTF bus. I am setting up the linker command file as such:
MEMORY
{
PAGE 0: /* Program and Data Memory */
/*TFI : origin = 0x338000, length = 0x007F80*/ /* first sector on-chip FLASH */
APP : origin = 0x300000, length = 0x038000 /* other sectors on-chip FLASH */
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Program with all 0x0000 when CSM is in use. */
BEGIN : origin = 0x33FFF6, length = 0x000002 /* Used for "boot to Flash" bootloader mode. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* CSM password locations in FLASH */
OTP : origin = 0x380400, length = 0x000400 /* on-chip OTP */
ADC_CAL : origin = 0x380080, length = 0x000009 /* ADC_cal function in Reserved memory */
IQTABLES : origin = 0x3FE000, length = 0x000b50 /* IQ Math Tables in Boot ROM */
IQTABLES2 : origin = 0x3FEB50, length = 0x00008c /* IQ Math Tables in Boot ROM */
FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0 /* FPU Tables in Boot ROM */
ROM : origin = 0x3FF27C, length = 0x000D44 /* Boot ROM */
RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM */
VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */
PAGE 1 : /* Data Memory */
/*-------------------------------------------------------------------------*/
/* RAM Ranges */
/*-------------------------------------------------------------------------*/
/*
* Zero wait state both program and data.
* Ideal for placement of data structures and code that is time critical.
*/
M01SARAM : origin = 0x000000, length = 0x000800
/*
* Zero wait state for both program and data. This is also secure memory
* for which the Flash API must run if the CSM is not unlocked.
* Ideal for placement of data structures and code that is time critical.
*/
L03SARAM : origin = 0x008000, length = 0x004000
/*
* Zero wait state for data reads and writes.
* One wait state for program reads and writes.
* Ideal for placement of data structures.
*/
L47SARAM : origin = 0x00C000, length = 0x004000
/*
* External RAM chip.
*/
XRAM : origin = 0x100000, length = 0x080000
...............
}
SECTIONS
{
/* Allocate program areas: */
.cinit : > APP PAGE = 0 /* constants use to initialize global vars and const in ram */
.pinit : > APP PAGE = 0 /* table of constructors to be call at startup */
.text : > APP PAGE = 0 /* executable code and constants */
codestart : > BEGIN PAGE = 0
csmpasswds : > CSM_PWL PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0
/* Allocate uninitalized data sections: */
.stack : > L03SARAM | L47SARAM PAGE = 1
.ebss : > XRAM PAGE = 1
.esysmem : > XRAM PAGE = 1
.sysmem : > XRAM PAGE = 1
.cio : > XRAM PAGE = 1
/* Initalized sections go in Flash */
.econst : > APP PAGE = 0 /* far constant variabls */
.switch : > APP PAGE = 0 /* jump tables for switch structures */
.args : > APP PAGE = 0
/* Allocate IQ math areas: */
IQmath : > APP PAGE = 0 /* Math Code */
IQmathTables : > IQTABLES PAGE = 0, TYPE = NOLOAD
FPUmathTables : > FPUTABLES PAGE = 0, TYPE = NOLOAD
/* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
.adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD
..............................
XRamFile : > XRAM PAGE = 1
I am manually placing all task stacks in the .stack section as well as calling a routine that configures external memory in the via
Reset = xdc.useModule('xdc.runtime.Reset');
Reset.fxns[Reset.fxns.length++] = "&initExternMem";
When I run I get the following error:
"gged interrupt flagged: intr# 19
xdc.runtime.Error.raise: terminating execution
"
Is the problem that I am not running the initExternMem call early enough so that Bios can access its data structures or is the problem that certain parts of bios have to run from internal ram?
Please advise