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: Starterware
Hi Sir,
I want to store some arrays in the two DATA20_P segments of FRAM ,the DATA20_P is set in the lnkmsp430fr6972.xcl as following
// --------------------------- // Read/write data in FRAM // -Z(CONST)DATA16_P,DATA20_P=D000-FF7F,10040-13FFF -Z(DATA)DATA16_HEAP+_DATA16_HEAP_SIZE -Z(DATA)DATA20_HEAP+_DATA20_HEAP_SIZE // ---------------------------
I defined arrays as following
__persistent unsigned int CurrentFaultBuffer[5120] = {0x0000}; __persistent unsigned int ElecfieldFaultBuffer[5120] ={0x0000}; __persistent unsigned int Fault1Buffer[960] = {0x0000}; __persistent unsigned int Fault2Buffer[960] = {0x0000};
if the CurrentFaultBuffer[5120] was allocated to the 0xD000-0xFF7F, other's arrays were allocated to the 0x10040-0x13FFF, the space of DATA20_P is enough. However ,I found all of arrays was allocated to the 0x10040-0x13FFF,so it is a mistake
the question is How I could allocate CurrentFaultBuffer[5120] to the segment DATA20_P(0xD000-0xFF7F) and allocate others to the segment DATA20_P(0x10040-0x13FFF) ?
Best regards
Jent
Thank you Ryan ,
The 0xD000- 0xFF7F only stored the DATA20_P , the main code was stored in 6C00- CF7F.the whole .xcl is following:
// --------------------------- // Read/write data in FRAM // -Z(CONST)DATA16_P,DATA20_P=D000-FF7F,10040-13FFF -Z(DATA)DATA16_HEAP+_DATA16_HEAP_SIZE -Z(DATA)DATA20_HEAP+_DATA20_HEAP_SIZE // --------------------------- // Constant data // -Z(CONST)DATA16_C,DATA16_ID,TLS16_ID,DIFUNCT,CHECKSUM=6C00-CF7F // --------------------------- // --------------------------- // Code // -Z(CODE)CSTART,ISR_CODE,CODE16=6C00-CF7F // --------------------------- // Code -P(CODE)CODE=6C00-CF7F -Z(CODE)CODE_PAD // --------------------------- // --------------------------- // Constant data // -Z(CONST)DATA20_C,DATA20_ID,CODE_ID=6C00-CF7F // ----------------------------- // Signature memory and interrupt vectors // -Z(CONST)SIGNATURE=CF80-CF8F -Z(CODE)INTVEC=CF90-CFFF -Z(CODE)RESET=CFFE-CFFF
I put two programs(application program,upgrade program) in the FRAM, the application program's .xcl file is mentioned above. the upgrade program is allocated to the 0x4400-0x6BFF in another .xcl file. so I must utilize 0x10040-0x13FFF to store data
Regards
Jent
**Attention** This is a public forum