Please help i have been stuck on this boot loaded / EEPROM problem for weeks now.
I am using the TMS570LS1115 and CCS tools, with XDS200 debugger.
I am using the HALCoGen FEE library to successfully create EEPROM in Bank7.
I wish to also add a bootloader so i have divided up the FLASH into 3 segments for Bootloader, Code and Downloaded Code and RAM into two segments.
Intention is to load the Flash API into RAM2.
To program FLASH i have to move Flash API's to RAM (cannot run code and FLASH from same segment). I am 'following' the sample from TI UART Bootloader.
I have linked in the "F021_API_CortexR4_BE.lib".
This is a list of my .cmd file.
/*----------------------------------------------------------------------------*/
/* Linker Settings */
--retain="*(.intvecs)"
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY
{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASHB (RX) : origin=0x00000020 length=0x0001FFE0 // 0x000FFFE0
FLASH0 (RX) : origin=0x00040000 length=0x00060000 // 128K x 3 (393,215 bytes)
FLASH1 (RX) : origin=0x000A0000 length=0x00060000 // 128K x 3 (393,215 bytes)
STACKS (RW) : origin=0x08000000 length=0x00001300 // 4,864 bytes
RAM (RW) : origin=0x08001300 length=0x0001AD00 // 109,824
RAM2 (RW) : origin=0x0801C000 length=0x00040000 // 16 kbytes
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
.intvecs : {} > VECTORS
flashAPI :
{
--library= F021_API_CortexR4_BE.lib < FlashStateMachine.IssueFsmCommand.obj
FlashStateMachine.SetActiveBank.obj
FlashStateMachine.InitializeFlashBanks.obj
FlashStateMachine.EnableMainSectors.obj
FlashStateMachine.IssueFsmCommand.obj
FlashStateMachine.ScaleFclk.obj
Init.obj
Utilities.CalculateEcc.obj
Utilities.WaitDelay.obj
Utilities.CalculateFletcher.obj
Read.MarginByByte.obj
Read.Common.obj
Read.FlushPipeline.obj
Read.WdService.obj
Async.WithAddress.obj
Program.obj > (.text)
} load = FLASHB, run = RAM2, LOAD_START(api_load), RUN_START(api_run), SIZE(api_size)
.text : {} > FLASH1
.const : {} > FLASH1
.cinit : {} > FLASH1
.pinit : {} > FLASH1
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
FEE_TEXT_SECTION : {} > FLASHB
FEE_CONST_SECTION : {} > FLASHB
FEE_DATA_SECTION : {} > RAM
}
/*----------------------------------------------------------------------------*/
When i call TI_Fee_Init(); from main() my program crashes..debugger ends up in sys_intvecs.asm
prefetchEntry
b prefetchEntry
b _dabort
b phantomInterrupt
ldr pc,[pc,#-0x1b0]
ldr pc,[pc,#-0x1b0]
If I remove the flashAPI: {} section then i can execute TI_Fee_Init OK but now i cannot move the API from FLASH to RAM2.
When i step through TI_Fee_Init() in 'ti_fee_ini.c', line 578 is where the code crashes,
if((Fapi_initializeFlashBanks((uint32)TI_FEE_OPERATING_FREQUENCY))==Fapi_Status_Success)
I am stuck. Can someone please point me in the right direction on how to solve this issue?
thank you in advance for any assistance
Rob