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.
Part Number: MSP432P4111
Tool/software: Code Composer Studio
I inherited a MSP430-based program that was generated using the IAR environment, and we are porting it to the MSP432 using Code Composer Studio.
I have some functions I need to map to RAM to download new program images to FLASH in the field, and I can't use the built-in BSL because the command set on the PC-side of the interface is incompatible. The PC-side interface takes as its input a TI_TXT file that is generated by the ARM Hex Utility and streams it as a series of bytes to the MSP432 RAM functions, which program the FLASH with the program data that is mapped to FLASH.
The existing code uses the following construct:
#pragma location=RAM_MEMORY_ADDRESS
firmware_download(void)
{
//code
}
When I try to build I get an error. How can I map these functions to RAM locations using Code Composer Studio?
What I want to end up with is a TI_TXT file that looks like this:
@<RAM_MEMORY_ADDRESS>
<firmware download function stream of bytes>
Thanks
FYI, the error I'm getting is:
"ALIAS'ed memory range, SRAM_CODE, may only be used for run placement and not for load placement for <function name>"
Does Placing functions in RAM help?BIt_Banger said:How can I map these functions to RAM locations using Code Composer Studio?
That is very helpful, thank you.
Apparently using the __attribute__((ramfunc)) construct not only maps the functions to RAM but loads them there as well at startup, so I don't need to do it manually and I can remove our legacy function that does that. I discovered ".TI.ramfunc : {} load=MAIN, run=SRAM_CODE, table(BINIT)" was already in my command file, and when I looked at the memory map I was able to verify that the functions mapped to RAM were actually at the locations in RAM specified by the memory map by using the memory browser.
**Attention** This is a public forum