This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
I'm trying to use the external RAM (262,144 words by 16 bits) present on 28335 EzDSP.
I need to store 11 vectors of 6000 conventional floats inside that memory. I dont need to store any other element.
I'm using the DSP2833x_Xintf.c to configure the Xint module.
This is my RAM.cmd file:
MEMORY
{
PAGE 0 :
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002 /* Boot to M0 will go here */
RAMM0 : origin = 0x000050, length = 0x0003B0
RAML0 : origin = 0x008000, length = 0x004000 // RAML3 RAML2 RAML1 RAML0 merged
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
ADC_CAL : origin = 0x380080, length = 0x000009
RESET : origin = 0x3FFFC0, length = 0x000002
IQTABLES : origin = 0x3FE000, length = 0x000b50
IQTABLES2 : origin = 0x3FEB50, length = 0x00008c
FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0
BOOTROM : origin = 0x3FF27C, length = 0x000D44
PAGE 1 :
/* BOOT_RSVD is used by the boot ROM for stack. */
/* This section is only reserved to keep the BOOT ROM from */
/* corrupting this area during the debug process */
BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML4 : origin = 0x00C000, length = 0x001000
RAML5 : origin = 0x00D000, length = 0x001000
RAML6 : origin = 0x00E000, length = 0x001000
RAML7 : origin = 0x00F000, length = 0x001000
ZONE7 : origin = 0x200000, length = 0x040000 // 256kib external memory
}
SECTIONS
{
codestart : > BEGIN, PAGE = 0
ramfuncs : > RAML0, PAGE = 0
.text : > RAML0, PAGE = 0
.cinit : > RAML0, PAGE = 0
.pinit : > RAML0, PAGE = 0
.switch : > RAML0, PAGE = 0
.stack : > RAMM1, PAGE = 1
.ebss : > RAML4, PAGE = 1
.econst : > RAML5, PAGE = 1
.esysmem : > RAMM1, PAGE = 1
FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD
DMARAML4 : > RAML4, PAGE = 1
DMARAML5 : > RAML5, PAGE = 1
DMARAML6 : > RAML6, PAGE = 1
DMARAML7 : > RAML7, PAGE = 1
ZONE7DATA : > ZONE7, PAGE = 1
.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used */
csm_rsvd : > CSM_RSVD PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
csmpasswds : > CSM_PWL PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
/* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
.adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD
}
**Someone may notice that in addition to declaring external zone 7, I made other changes to the distribution of internal memory (compared to the TI .cmd example file).
This was done to better suit the needs of my project (too many variables) and everything is working well except the external memory.**
This is how I declare the vectors on my .c file:
#define TABLE_DIM 6000
#pragma DATA_SECTION(w_table, "ZONE7DATA");
float w_table[TABLE_DIM];
#pragma DATA_SECTION(Edroop_table, "ZONE7DATA");
float Edroop_table[TABLE_DIM];
#pragma DATA_SECTION(Pn_table, "ZONE7DATA");
float Pn_table[TABLE_DIM];
#pragma DATA_SECTION(Qn_table, "ZONE7DATA");
float Qn_table[TABLE_DIM];
#pragma DATA_SECTION(Pj_table, "ZONE7DATA");
float Pj_table[TABLE_DIM];
#pragma DATA_SECTION(Qj_table, "ZONE7DATA");
float Qj_table[TABLE_DIM];
#pragma DATA_SECTION(Pk_table, "ZONE7DATA");
float Pk_table[TABLE_DIM];
#pragma DATA_SECTION(Qk_table, "ZONE7DATA");
float Qk_table[TABLE_DIM];
#pragma DATA_SECTION(Prefn_table, "ZONE7DATA");
float Prefn_table[TABLE_DIM];
#pragma DATA_SECTION(Qrefn_table, "ZONE7DATA");
float Qrefn_table[TABLE_DIM];
#pragma DATA_SECTION(Vo3a_table, "ZONE7DATA");
float Vo3a_table[TABLE_DIM];
For testing:
int i;
for(i = 0; i < TABLE_DIM; i++)
{
w_table[i] = 1.0;
Edroop_table[i] = 2.0;
Pn_table[i] = 3.0;
Qn_table[i] = 4.0;
Pj_table[i] = 5.0;
Qj_table[i] = 6.0;
Pk_table[i] = 7.0;
Qk_table[i] = 8.0;
Prefn_table[i] = 9.0;
Qrefn_table[i] = 10.0;
Vo3a_table[i] = 11.0;
}
The problem is: I'm having overlapping values when I populate the vectors. Some part of the vector Vo3a_table is being written in the memory position belonging to Pj_table. (I end up having some "11.0"s inside Pj_table instead of only "5.0"s)
OBS: The CCS's memory allocation window shows only 50% (132k) is being used of ZONE7 (262k).
Can anyone help me?
Hi Henrique,
Can you please share the map file for more details.
Thanks
Aswin