Part Number: TMS320F28069
Other Parts Discussed in Thread: C2000WARE
Tool/software: TI C/C++ Compiler
I am having problems linking to the flash API. In the sections portion of my linker file I have the following lines
GROUP : LOAD = APP_FLASH,
RUN = RAML0_1,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
crc_table(_CRCTestVector),
PAGE = 0
{
ramfuncs
{-l "2806x_BootROM_API_TABLE_Symbols.lib"(.econst)}
{-l "2806x_BootROM_API_TABLE_Symbols.lib"(.text)}
}
However on the library include I am getting the warning "warning #10068-D: no matching section" I have included the path to the library in the linker paths. I have also made sure that Flash2806x_Program() function is getting called in my code. So it should be making use of the lib.
#include "Flash2806x_API_Config.h" #include "Flash2806x_API_Library.h"
Has also been included.
What do I need to do differently to make the linker file pick up that the library is getting used?
For reference my code looks as follows:
#include "sw/drivers/cpu/src/32b/f28x/f2806x/cpu.h"
#include "Flash2806x_API_Config.h"
#include "Flash2806x_API_Library.h"
#include "variables.h"
//----------------------------------------
#ifdef __cplusplus
#pragma DATA_SECTION("FlashScalingVar");
#else
#pragma DATA_SECTION(Flash_CPUScaleFactor, "FlashScalingVar");
#endif
Uint32 Flash_CPUScaleFactor;
//----------------------------------------
#ifdef __cplusplus
#pragma DATA_SECTION("FlashCallbackVar");
#else
#pragma DATA_SECTION(Flash_CallbackPtr, "FlashCallbackVar");
#endif
void (*Flash_CallbackPtr) (void);
FLASH_ST g_FlashStatus;
struct parameterStoreage_struct parameterStorage;
void FlashAPIInit(void){
EALLOW;
Flash_CPUScaleFactor = SCALE_FACTOR;
#ifdef ENABLE_WATCHDOG
Flash_CallbackPtr = FlashAPICallback;
#else
Flash_CallbackPtr = 0;
#endif
EDIS;
}
void storeParameters(){
uint16_t index = *parameterStorage.indexCurrent;
Uint16 status;
int i;
if(!index){
return;
}
i = 0;
while(index == *parameterStorage.indexCurrent){
index &= ~((uint16_t)(1 << i));
i++;
}
status = Flash2806x_Program((Uint16 *)parameterStorage.indexCurrent, (Uint16 *)&index, sizeof(index), &g_FlashStatus);
}