Hello Everyone,
I am using MSP432E401Y along with external SDRAM of 8MB. This external SDRAM is connected through EPI interface of MSP. When I try to build and load program through JTAG programmer, it gets failed to load program. I am unable to debug or run my program.
I think this is due to: at system startup, compiler tries to initialise global variables. So it also tries to initialise external SDRAM variable too. But at system boot up, EPI interface has not configured. So how do I achieve that? Explain with c code.
For reference see my below code:
- In main.c file I have created global variable of SDRAM
#pragma DATA_SECTION (gdTemp_Array, ".ext_ram")
uint32_t gdTemp_Array[32];
- In .cmd file I have created section for external SDRAM
MEMORY
{
FLASH (RX) : origin = 0x00000000, length = 0x00080000
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
EXT_RAM (RWX) : origin = 0x60000000, length = 0x00800000
}
SECTIONS
{
#ifndef gen_crc_table
.intvecs: > 0x00000000
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
#else
.intvecs: > 0x00000000, crc_table(crc_table_for_intvecs)
.text : > FLASH, crc_table(crc_table_for_text)
.const : > FLASH, crc_table(crc_table_for_const)
.cinit : > FLASH, crc_table(crc_table_for_cinit)
.pinit : > FLASH, crc_table(crc_table_for_pinit)
.init_array : > FLASH, crc_table(crc_table_for_init_array)
.TI.crctab : > FLASH
#endif
.vtable : > 0x20000000
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
.ext_ram: > EXT_RAM
}
__STACK_TOP = __stack + 512;