I'm running a modified version of the boot_serial demo to do a firmware update on a TM4C123 microcontroller. I am able to
load the bootloader at 0x00 and the application at 0x2800 by updating over JTAG. Then I disable
interrupts in the application and jump to the bootloader. From there, I'm able
to successfully ping the bootloader, receive acknowledgement, then send a COMMAND_DOWNLOAD, which returns success,
then send the new application via the SEND_DATA command, verifying that all packets are being acknowledged.
However, after sending the COMMAND_RESET command, the old application has been erased, and the
new version is either not working/not present/not being jumped to. Attaching the debugger to the bootloader, which is still present,
shows that is is caught in a while loop in UARTReceive. Here's my configuration.
In the application:
#define APP_BASE 0x2800
#define APP_LENGTH 0x0003d800
#define RAM_BASE 0x20000000
MEMORY
{
/* Application stored in and executes from internal flash */
FLASH (RX) : origin = APP_BASE, length = APP_LENGTH
/* Application uses internal RAM for data */
SRAM (RWX) : origin = 0x20000000, length = 0x00008000
}
In the bootloader:
MEMORY
{
FLASH (RX) : origin = 0x00000000, length = 0x00010000
SRAM (RWX) : origin = 0x20000000, length = 0x00010000
}
And bl_config.h has the following defined:
#define APP_START_ADDRESS 0x2800
#define VTABLE_START_ADDRESS 0x20000000
#define FLASH_PAGE_SIZE 0x00000400
#define STACK_SIZE 48
#define BUFFER_SIZE 30