Hello Ti Team,
I've got an issue where the symptom seems to be that when the bootloader calls the application, certain interrupts don't trigger. Could you please help direct
my debugging effort.
Basic setup
- Processor: TMS570LS20216.
- We've got a bootloader that can load code into flash through the UART with no issues. Both the upload and download functions work. Relevant functions from the F035 flash API are loaded and executed from RAM.
- Bank:0 is reserved for the bootloader.
- Banks:1, 2, & 3 are reserved for the application.
- The bootloader always runs at power up and if the user doesn't want to use it, the application gets called after a timeout.
When do interrupts in the application work with no issues
- When loaded and run directly from CCS and,
- When all interrupts in the bootloader are turned off and the application called from the bootloader. So basically:
#define APP_BOOT_ADDRESS (0x00080000U) bootloader_main() { #if 0 // def out everything. Just call the application. ... ... #endif ((void (*)(void))APP_BOOT_ADDRESS)(); }
Other related setup description
Bootloader's linker file
MEMORY { VECTORS (RWX) : origin=0x00000000 length=0x00000020 FLASH (RX) : origin=0x00000020 length=0x001fffe0 STACKS (RW) : origin=0x08000000 length=0x00003500 RAM (RW) : origin=0x08003500 length=0x00024aFF } SECTIONS { .intvecs : {} > VECTORS .flashapi : load = FLASH, run = RAM, LOAD_START(F035_LoadStart), LOAD_END(F035_LoadEnd), LOAD_SIZE(F035_LoadSize), RUN_START(F035_RunStart), RUN_END(F035_RunEnd), RUN_SIZE(F035_RunSize), { pf035a_api_eabi.lib (.text) } .text : {} > FLASH .data : {} > RAM .const : {} > FLASH .cinit : {} > FLASH .bss : {} > RAM .stack : {} > STACKS }
Bootloader's sys_intvecs.asm file
;------------------------------------------------------------------------------- ; sys_intvecs.asm ; ; (c) Texas Instruments 2009, All rights reserved. ; ;------------------------------------------------------------------------------- ; import reference for interrupt routines .ref _c_int00 .ref _svc ;------------------------------------------------------------------------------- ; interrupt vectors .sect ".intvecs" b _c_int00 b #0x7FFF8 b #0x7FFF8 b #0x7FFF8 b #0x7FFF8 b #0x7FFF8 ldr pc,[pc,#-0x1b0] ldr pc,[pc,#-0x1b0]
Application's linker file
MEMORY { VECTORS (X) : origin=0x00080000 length=0x00000020 FLASH (RX) : origin=0x00080020 length=0x0017FFE0 STACKS (RW) : origin=0x08000000 length=0x00001500 RAM (RW) : origin=0x08001500 length=0x00026B00 } SECTIONS { .intvecs : {} > VECTORS .text : {} > FLASH .const : {} > FLASH .cinit : {} > FLASH .bss : {} > RAM .data : {} > RAM }
The interrupts I'am trying to work with
- In the bootloader we're using four interrupts.
- RTI 0 & 1
- SCI RX interrupts for both the SCI ports.
- The application uses RTI interrupts - 0 & 1 as well. These are the ones that don't seem to fire.
Thanks in advance!
Jude.