Dear experts,
working on a bootloader project for two different versions of TMS570 I came to a point where the program during startup gets stuck during EEPROM blank check performed in the F021 Flash API.
The project consists of the Demo Example provided by HALCOGEN (including FreeRTOS functionality) , uses the FEE routines from Halcogen and application code. Everthings works fine using the linker command file based on the original code from HALCOGEN:
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020
KERNEL (RX) : origin=0x00000020 length=(0x00008000 - 0x00000020)
FLASH0 (RX) : origin=0x00010000 length=(0x00190000 - 0x00010000)
FLASH1 (RX) : origin=0x00190000 length=0x00180000
STACKS (RW) : origin=0x08000000 length=0x00001500
KRAM (RW) : origin=0x08001500 length=0x00000800
RAM (RW) : origin=(0x08001500+0x00000800) length=(0x0003eaff - 0x00000800)
/* USER CODE BEGIN (2) */
/* USER CODE END */
}
/* USER CODE BEGIN (3) */
/* USER CODE END */
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
.intvecs : {} > VECTORS
/* FreeRTOS Kernel in protected region of Flash */
.kernelTEXT : { sys_startup.obj(.const)
os_tasks.obj (.const:.string)
-l=../lib/rtsv7R4_T_be_v3D16_eabi.lib<auto_init.obj> (.text)
-l=../lib/rtsv7R4_T_be_v3D16_eabi.lib<copy_decompress_rle.obj> (*)
-l=../lib/rtsv7R4_T_be_v3D16_eabi.lib<cpy_tbl.obj> (*)
-l=../lib/rtsv7R4_T_be_v3D16_eabi.lib<copy_zero_init.obj> (*)
-l=../lib/rtsv7R4_T_be_v3D16_eabi.lib<copy_decompress_none.obj> (*)
-l=../lib/rtsv7R4_T_be_v3D16_eabi.lib<icall32.obj> (.text)
-l=../lib/rtsv7R4_T_be_v3D16_eabi.lib<memset32.obj> (.text)
-l=../lib/rtsv7R4_T_be_v3D16_eabi.lib<memcpy32.obj> (.text)
} > KERNEL
.cinit : {} > KERNEL
.pinit : {} > KERNEL
/* Rest of code to user mode flash region */
.text : {} > FLASH0 | FLASH1
.const : {} > FLASH0 | FLASH1
/* FreeRTOS Kernel data in protected region of RAM */
.kernelBSS : {} > KRAM
.kernelHEAP : {} > RAM
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
FEE_TEXT_SECTION : {} > FLASH0 | FLASH1
FEE_CONST_SECTION : {} > FLASH0 | FLASH1
FEE_DATA_SECTION : {} > RAM
Modifiying the linker Command file with the purpose to move the kernel and all subsequent content to start adress of the second sector causes the FAPI to crash during startup.
I debugged into th code as far as possible and found out that the FEE code wants to perform an eeprom blank check of bank #7 which crashes inside the F021 API. I had been using version 02.01.00.
The system gets caught inside a trap with the label flashreal.
What I do not understand: Why does the behaviour depand on the modification of the linker command file and therefore on thelocation of code in the flash memory?
Thanks, appreciating al helful responses,
Peter