Hi,
I am working on the custom board based on TM4C1294+lwip1.4.1+freeRTOS+ccs5.5.x(Compiler ti v5.1.9).
After reconfiguring EPI ports to access 8MB Sdram, it worked fine as I tested the example of "sdram.c"
However, As I declared some arrays in .h like below
extern SC_TESTSETUP sctest[NUMCHANS] __attribute__ ((section (".external"))); /* array of setuptest structures */
extern SC_HOLDSTAT scholdstat[NUMCHANS] __attribute__ ((section (".external"))); /* array of hstat structures */
and accessed to the variables in .c, they still sit address at 0x20000000 around which is not area of the external sdram(0x60000000).
SC_TESTSETUP sctest[NUMCHANS] ; /* array of setuptest structures */
SC_HOLDSTAT scholdstat[NUMCHANS] ; /* array of hstat structures */
memset((char *) sctest,0 ,sizeof(sctest));
memset((char *) scholdstat,0 ,sizeof(scholdstat));
// write values for testing
sctest[0].clrbits = 0;
sctest[0].numcells = 4;
sctest[0].test[0].dcapac = 1;
As I read back the values that I wrote, all values are "0"
Here is my .cmd
/* The starting address of the application. Normally the interrupt vectors */
/* must be located at the beginning of the application. */
#define APP_BASE 0x00000000
#define RAM_BASE 0x20000000
#define SDRAM_BASE 0x60000000
/* System memory map */
MEMORY
{
/* Application stored in and executes from internal flash */
FLASH (RX) : origin = APP_BASE, length = 0x00100000
/* Application uses internal RAM for data */
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
/* Application uses external RAM for large data arrays */
SDRAM (RWX) : origin = SDRAM_BASE, length = 0x00800000
}
/* Section allocation in memory */
SECTIONS
{
.intvecs: > APP_BASE
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.vtable : > RAM_BASE
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
.external : > SDRAM
}
__STACK_TOP = __stack + 16384;
I am not sure what's wrong with accessing the external sdram.
Thanks,
Jin