Other Parts Discussed in Thread: HALCOGEN
Hello,
I've successfully implemented a CAN Bootloader on TMS570LS0714 based on SPNA241 application report: I can get the Bootloader answering to CAN commands, flashing the binary application file and running the application.
Unfortunately, our design doesn't allow GPIO to be checked for application update, so the idea is that our application is writing on a specific FEE block when it needs to be updated.
The Bootloader then reads this FEE block to now if needs to flash new application or jump to the application directly.
Read/Write operations on FEE from application are working fine.
In the Bootloader, I enabled the FEE driver from HALCOgen, and I changed the linker file to:
/*----------------------------------------------------------------------------*/
/* Linker Settings */
--retain="*(.intvecs)"
/* USER CODE BEGIN (1) */
/* USER CODE END */
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020 vfill = 0xffffffff
FLASH0 (RX) : origin=0x00000020 length=0x000BFFE0 vfill = 0xffffffff
SRAM (RW) : origin=0x08002000 length=0x0001EB00
STACK (RW) : origin=0x08000000 length=0x00001500
/* USER CODE BEGIN (2) */
#if 1
ECC_VEC (R) : origin=(0xf0400000 + (start(VECTORS) >> 3))
length=(size(VECTORS) >> 3)
ECC={algorithm=algoL2R4F021, input_range=VECTORS}
ECC_FLA0 (R) : origin=(0xf0400000 + (start(FLASH0) >> 3))
length=(size(FLASH0) >> 3)
ECC={algorithm=algoL2R4F021, input_range=FLASH0 }
#endif
/* USER CODE END */
}
/* USER CODE BEGIN (3) */
ECC
{
algoL2R4F021 : address_mask = 0xfffffff8 /* Address Bits 31:3 */
hamming_mask = R4 /* Use R4/R5 build in Mask */
parity_mask = 0x0c /* Set which ECC bits are Even and Odd parity */
mirroring = F021 /* RM57Lx and TMS570LCx are build in F021 */
}
/* USER CODE END */
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
.intvecs : {} > VECTORS
flashAPI:
{
.\TMS570LS07x\source\Fapi_UserDefinedFunctions.obj (.text)
.\source\bl_flash.obj (.text)
--library= "c:\ti\Hercules\F021 Flash API\02.01.01\F021_API_CortexR4_BE.lib" (.text)
} palign=8 load = FLASH0, run = SRAM, LOAD_START(apiLoadStart), RUN_START(apiRunStart), SIZE(apiLoadSize)
.text : {} > FLASH0
.const : {} palign=8 load=FLASH0, run = SRAM, LOAD_START(constLoadStart), RUN_START(constRunStart), SIZE(constLoadSize)
.cinit : {} > FLASH0
.pinit : {} > FLASH0
.data : {} > SRAM
.bss : {} > SRAM
.sysmem : {} > SRAM
/* USER CODE BEGIN (4) */
FEE_TEXT_SECTION : {} > FLASH0
FEE_CONST_SECTION : {} > FLASH0
FEE_DATA_SECTION : {} > SRAM
/* USER CODE END */
}
/* USER CODE BEGIN (5) */
/* USER CODE END */
to add FEE sections.
In the Bootloader main file, I initialize the FEE with :
TI_FeeModuleStatusType Status;
TI_Fee_Init();
do
{
TI_Fee_MainFunction();
fee_delay();
Status=TI_Fee_GetStatus(0 );
}
while(Status!= IDLE);
and I run the rest of the CAN Bootloader (copy the flash APIs to SRAM, ConfigureCANDevice and run UpdaterCAN).
With this configuration, the Bootloader doesn't answer anymore to ping commands and when I break the execution, the program is stuck in undefEntry reset.
I cannot determine exactly what causes the program to reset by stepping with the debugger.
Can someone please help me to read EEPROM from Bootloader, whether with FEE driver or directly with F021 API?
Thank you