I am using the simulator/debugger to run some of tests of my software. To do this I create a driver that contains arrays of data used to initialize the inputs and arrays of data that contain the expected values for the outputs. This driver is compiled and linked with libraries to create an executable. Through the use of some scripts the simulator/debugger is executed and the test is run. I have been able to do this in the past with no problems. However, when the test data I now have (55 inputs/outputs which get converted into 55 arrays with 28000 elements) the code for the driver gets extremely large.
Within the scripts that run the executable I have the following commands to load the executable into the simulator/debugger:
/* Create debug environment */
Env = ScriptingEnvironment.instance();
/* Create script server object and set the configuration */
Server = Env.getServer("DebugServer.1");
Server.setConfig(Path + "tms320f283xx_sim.ccxml");
/* Open the debug session */
Session = Server.openSession(".*");
/* Connect to target */
Session.target.connect();
/* Open the session so we can start the tests */
Session = Server.openSession();
/* Load the test */
Session.memory.loadProgram("C:/Test/rbt_test.out");
My original .cmd file looked as follows:
MEMORY
{
PAGE 0: /* Flash */
/* FPGA Flash (128KB) */
MEDL : origin = 0x180000, length = 0x000800 /* MEDL Table */
TASM : origin = 0x180800, length = 0x001000 /* TASM */
HWCC : origin = 0x181800, length = 0x003000 /* HW-COM Configuration */
/* Internal Flash (512KB) */
IMGH : origin = 0x300000, length = 0x000010 /* Processor Flash for Prime Image Header. */
INTFLASH : origin = 0x300010, length = 0x070000 /* Processor Flash for Prime Image. */
CSMD : origin = 0x370010, length = 0x000076 /* CSM Data, zero when using CSM. */
BTFEP : origin = 0x370086, length = 0x000002 /* Boot-to-Flash Entry Point. */
CSMPW : origin = 0x370088, length = 0x000008 /* CSM Password, do not zero. */
BROM : origin = 0x3FE000, length = 0x001FC0 /* Boot ROM. */
BVEC : origin = 0x3FFFC0, length = 0x000040 /* Boot Interrupt Vector. */
PAGE 1: /* RAM */
INTDATA1 : origin = 0x000000, length = 0x000800 /* Processor SARAM [M0-M1] */
STACK : origin = 0x008000, length = 0x001000 /* Processor SARAM [L0] */
INTDATA2 : origin = 0x009000, length = 0x003000 /* Processor SARAM [L1-L3] */
INTDATA3 : origin = 0x00C000, length = 0x004000 /* Processor SARAM [L4-L7] (DMA Accessible) */
EXTDATA : origin = 0x200000, length = 0x100000 /* Processor External SRAM (CS7) */
}
SECTIONS
{
/* Image Header: */
.ImageHeader : > IMGH, PAGE = 0
/* Data Initialization Table: */
.cinit : > INTFLASH, PAGE = 0
/* Constants: */
.const : > INTFLASH, PAGE = 0
.econst : > INTFLASH, PAGE = 0
/* INTFLASH-Resident Executable Code: */
.text : > INTFLASH, PAGE = 0
/* Switch Statement Tables: */
.switch : > INTFLASH, PAGE = 0
/* Unused Reset Pointer: */
.reset : > INTFLASH, PAGE = 0, TYPE = DSECT
/* Stack: */
.stack : > STACK, PAGE = 1,
START(_SP_INIT),
SIZE(_STACK_SIZE),
END(_SP_END)
/* Data by default resides in either Internal or External RAM: */
.ebss : >> INTDATA1 | INTDATA2 | INTDATA3 | EXTDATA, PAGE = 1
/* DMA Accessible Data: */
.dmadata : > INTDATA3, PAGE = 1
}
With the new drivers the .cinit .ebss sections need to be increased, as shown by the following error messages:
"TI.cmd", line 110: error #10099-D: run placement fails for object
".ebss", size 0x531c40 (page 1). Available ranges:
INTDATA1 size: 0x800 unused: 0x0 max hole: 0x0
INTDATA2 size: 0x3000 unused: 0x0 max hole: 0x0
INTDATA3 size: 0x4000 unused: 0x0 max hole: 0x0
EXTDATA size: 0x100000 unused: 0xfef6c max hole: 0xfef48
"TI.cmd", line 88: error #10099-D: placement fails for object ".cinit",
size 0x3b7b44 (page 0). Available ranges:
INTFLASH size: 0x70000 unused: 0x379c3 max hole: 0x379c2
error #10010: errors encountered during linking;
"rbt_test.out" not built
To me it looks as if I would need to define memory regions in the external memory area. But, I am not sure how to do this. From what I have read once I have my memory map defined I might need to use a .gel file to initialize the memory.
My problem is that I don't know if I need to define memory in external memory area. If so, how do I do that in the .cmd file. And how would I initialize it in the .gel file (in the F28335_Memory_Map function?).
Any assistance would be greatly appreciated!
Thanks,
Bill