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.
Hi all,
I have problems using the F021 Flash Library with gcc. I use Atollic TruSTUDIO 5.3.0 (gcc 4.8.3) and the F021_API_CortexR4_BE_V3D16.lib with aTMS570LS1224 Controller and SEGGER JLINK.
I compiled the project with thumb-2 instruction set except the startup code and interrupt vectors with -mthumb-interwork set.
All the HAL code I generated with HalCoGen.
Execpt some wchar_t size warnings concerning the F021 Library the code compiles.
When I try to run/debug the following program (coppied from the F021 manual) the debugger/controller get stuck at the point when the first F021 Library function is called.
int main(void) {
Fapi_StatusType oReturnCheck = Fapi_Status_Success;
FwpWriteByteAccessorType * oFwpWriteByteAccessor = FWPWRITE_BYTE_ACCESSOR_ADDRESS;
FwpWriteByteAccessorType * oFwpWriteEccByteAccessor = FWPWRITE_ECC_BYTE_ACCESSOR_ADDRESS;
FwpWriteDWordAccessorType * oFwpWriteDWordAccessor = FWPWRITE_DWORD_ACCESSOR_ADDRESS;
uint8 au8MainDataBuffer[16] = {0x78, 0x17, 0x19, 0x2E, 0x0A, 0xB9, 0x11, 0x70,
0x5F, 0xC1, 0x9C, 0xFD, 0x54, 0x51, 0xED, 0x86};
uint32 u32Index;
/*
For proper initialization of the device prior to any Flash
operations,
see the device-specific initialization document.
Assumes, unless otherwise noted, device has 144bit wide Flash Banks.
*/
oReturnCheck = Fapi_initializeFlashBanks(180); /* Example code is assuming operating
frequency of 180 MHz */
if((oReturnCheck == Fapi_Status_Success) &&
(FLASH_CONTROL_REGISTER->FmStat.FMSTAT_BITS.BUSY != Fapi_Status_FsmBusy))
{
oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
/* Place specific example code here */
/* Wait for FSM to finish */
while(FLASH_CONTROL_REGISTER->FmStat.FMSTAT_BITS.BUSY == Fapi_Status_FsmBusy);
/* Check the FSM Status to see if there were no errors */
if (FLASH_CONTROL_REGISTER->FmStat.u32Register != 0)
{
/* Put Error handling code here */
}
}
while (1) {
}
}
When I try to view the disassembly I get the following error messages:
Can I use the F021 library with gcc?
Any help is appreciated.
Best Regards
Jens