Part Number:TM4C123GH6PZ
I have a custom board with the above TIVA part. We have an application that is currently in production and reliable. The goal is to implement a flash bootloader that will allow application updates via the CAN bus (which is the primary comm link on the board.
My though was to implement this in several steps:
1. Use the TI serial_boot example found in the TivaWare examples to start.
2. Verify that the bootloader hands over control to the application and the application functions properly.
3. Program the application via the serial
3. Using the serial_boot example as a baseline, modify the bootloader to use the CAN bus in place of the serial.
The problem is that I can't beyond step 1. The bootloader and application have been modified to reflect the correct memory spaces.
The bl_config.h file in the boot_serial project has been modified to include:
#define VTABLE_START_ADDRESS 0x2800
#define APP_START_ADDRESS 0x2800
The file tm4c123gh6pz_startup.cmd in the application was modified:
#define APP_BASE_ADDR 0x00002800
#define RAM_BASE_ADDR 0x20000000
MEMORY
{
FLASH (RX) : origin = APP_BASE_ADDR, length = 0x0003d800
SRAM (RWX) : origin = 0x20000000, length = 0x00008000
}
/* The following command line options are set as part of the CCS project. */
/* If you are building using the command line, or for some reason want to */
/* define them here, you can uncomment and modify these lines as needed. */
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone. */
/* */
/* --heap_size=0 */
/* --stack_size=256 */
/* --library=rtsv7M4_T_le_eabi.lib */
/* Section allocation in memory */
SECTIONS
{
.intvecs: > APP_BASE_ADDR
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.vtable : > RAM_BASE_ADDR
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
}
Using the UniFlash application, I load the boot_serial.bin to address 0x0000 and the application to address 0x2800
My expectation is that the bootloader would run, there is no serial input and would transfer control to the application at start address 0x2800 but it's not happening. I am basing this on the LED indicator on the board that is lit immediately upon the application init.
My questions are:
1. Are my expectations incorrect? Is there something I am missing? Should the example boot_serial not start the application?
2. What is the best approach to debugging the bootloader? I'm using CCS7 as my development environment and the XDS2xx USB emulator.
Thanks!