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.
Per this post http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/47133.aspx or http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/99/t/6696.aspx, I have tried to place a variable or array at a specific location in flash on a TMS570. The only time I see the memory locations updated is if I declare the variable as a const, which doesn't work for me since I intend to change the value, but fix the location. So why does this work:
#pragma LOCATION(memPoint, 0x00005000)
const uint32 memPoint[4] = {0}; // will see all 0's at 0x00005000, but I can't change them
but not this:
#pragma LOCATION(memPoint, 0x00005000)
uint32 memPoint[4] = {0};
void main()
{
memPoint[0] = 0x12345678 // will never see the value at 0x00005000
}
I also tried editing the linker config and trying to allocate that way, but unless memPoint is a const, I never see the value at 0x00005000 get set. My MPU is configured to allow user and priveledge read/write access to the entire flash memory space as well.
Please post the map file generated from the linker for the case that doesn't work. You can obtain this by using the -m linker option.
0x5000 is flash, so yea, I see the issue. A better question then is if I have bootloader code running in RAM, how do I write application code to flash from the bootloader in RAM, assuming I'm getting that application code from either an ethernet driver running in RAM or from the EMIF? This is totally new territory for me; looking for any pointers in the right direction.
I cannot answer that question. It is probably best to post the question to your hardware's forum. Someone there should be able to answer the question.
Ok, thanks. Found this anyway, so I think this is a step in the right direction: http://processors.wiki.ti.com/index.php/TMS570_Hercules_MCU_Bootloader