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.
Hello,
I have built a project using TivaWare 2.1.4, and been calling the APIs from the flash. However, as I need more flash space, I was trying to change to ROM calls (I discovered this exists recently).
When I changed the API calls from (example) GPIOPinADC(...) to ROM_GPIOPinADC(...) I get "unresolved symbols remain" error in the compiler, for ALL the APIs.
I did include "driverlib/rom.h" and tried to "#define TARGET_IS_TM4C129_RA2", but that didn't work either.
How can I fix this?
I suggest you add these two header files to your program:
#include "driverlib/rom.h" #include "driverlib/rom_map.h"
Then I use the "MAP_" prefix instead of "ROM_". What that does is it equates to the ROM_ prefix if it is defined in rom.h, but to the function name without a prefix if it is not. That way, if a ROM based function was fixed and replaced in the TivaWare library, the new function will be put in flash and used. If there are no corrections, the ROM based function will be used.
Example:
// // Configure the system frequency. // g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
While "steering code to ROM" (appears) to offer "much" - there ARE "impacting calling overheads" - which diminish such, "Flash Size reduction." (much like vendor's "hint" of "MCU Security" - a "peek beneath the covers" - proves less than thrilling...)
Are you really, "bumping against Flash max?" As firm/I often note - perhaps "unique code functions" may be "broadened" - so that they may "rise in occurrence" - yet reduce code size due to their (repeated) use. (i.e. "re-use") (Note - you don't want to "degrade" vital functions - you must survey for "high usage general functions" which are prime candidates for such "consolidation.") Maybe! ("Every" application IS different - nothing prevents your "quick/dirty" experimentation - and compare/contrast of size under varying implementations...)