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.

LAUNCHXL2-TMS57012: F021 Flash API compilation error - unresolved symbol Fapi_enableEepromBankSectors, first referenced in ./source/sys_main.obj

Part Number: LAUNCHXL2-TMS57012

Tool/software:

Dear TI engineers,

I use halcogen and code composer studio.
I get the same error for other flash api functions too.

Properties -> Include Options -> Add-> Flash API include file.
This way I include the flash API.
Why am I getting this compilation error?

My code.

/* USER CODE BEGIN (0) */
#include "Types.h"
#include "F021.h"
/* USER CODE END */

/* Include Files */

#include "sys_common.h"

/* USER CODE BEGIN (1) */
#define SYS_CLK_FREQ 150
/* USER CODE END */

/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/

/* USER CODE BEGIN (2) */
uint8_t DataBuffer[8] = {0,1,2,3,4,5,6,7};

/* USER CODE END */

int main(void)
{
/* USER CODE BEGIN (3) */
//_Enable_IRQ();
if ((Fapi_initializeFlashBanks((uint32_t)SYS_CLK_FREQ)) == Fapi_Status_Success)
{

Fapi_setActiveFlashBank(Fapi_FlashBank7);

Fapi_enableEepromBankSectors(0xFFFFFFFF,0xFFFFFFFF);

while( FAPI_CHECK_FSM_READY_BUSY != Fapi_Status_FsmReady );

while( FAPI_GET_FSM_STATUS != Fapi_Status_Success ); /* don't have to include this one*/

}

Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,(uint32_t*)0xF0200000);

while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy );

while(FAPI_GET_FSM_STATUS != Fapi_Status_Success);

Fapi_issueProgrammingCommand((uint32_t*)0xF0200000,DataBuffer,8,0,0,Fapi_AutoEccGeneration);

while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy );

while(FAPI_GET_FSM_STATUS != Fapi_Status_Success);

while(1)
{
;
}
/* USER CODE END */

return 0;
}
  • Hi Enes,

    If you are using FAPI library, then you should need to make sure two things.

    1. You should need to include F021 library in the linker file search path as below:

    2. And now you should also need to include the include folder of F021 library to the build include options like as shown below:

    As per my understanding you did only the second step, maybe you are missing the first step as i given, so please also do the first step.

    --
    Thanks & regards,
    Jagadish.

  • It was fixed when I added "F021_API_CortexR4_BE_V3D16.lib" to the "arm linker". Thank you.