Tool/software: TI C/C++ Compiler
I'm attempting to implement a workaround that calls for executing a function from RAM (specifically PMM32 from the msp430fr58471 errata) and am having a little bit of trouble. I've searched across this forum and see plenty of examples for how to do this on IAR and CCS but I'm using MSP430-GCC which appears to not support the methods I've seen so far.
For reference, the contents of the function I'm attempting to call from RAM:
FRCTL0 = FRCTLPW; GCCTL0 &= ~(FRPWR|FRLPMPWR); __bis_SR_register(LPM3_bits | GIE);
Things that I've tried:
- Using __attribute((section(".data"))) which should store my code in flash but execute it from RAM.
- Creating my own section in the linker file using a 32 byte range of RAM that I declared solely for this purpose with the "> RAM AT>FLASH" syntax and again using the section attribute.
- Using in-line assembly to jump to a const char array that contains the compiled binary data equivalent of the above commands.
All of these methods produce inconsistent results. Any help would be appreciated.