OpenBLT XMC1400 with larger bootloader file

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User19713
Level 1
Level 1
I am working on a project with multiple boards using 4500 and 1400 series micros. I have gotten the OpenBLT to work on the 4500 series, but am having issues on the 1400 series. Working from the 1400 demo in the OpenBLT repo, I have gotten the srec file in the correct memory location using
Bootcommander. The issue is when it tries to jump to the new app, it doesn't appear to do anything.

The app program itself works, I have tested it and it sends CAN as soon as the app starts. When the bootloader goes to jump to the app, the CAN messages don't send so I don't think it is making it to the app.

Looking at the assembly I noticed that the 4500 and 1400 handle the pProgResetHandler diferently. I assume that this is because the 1400 is an ARM Cortex-M0 and the 4500 is an ARM Cortex-M4 and am hoping that this is not part of my issue.

The hardware that this is on has certain peripherals that need to be put in safe states right away, so the bootloader no longer fits in the two sectors in the example and the flashLayout array was modified as below, commenting out yet another sector.

/* { 0x10001000, 0x01000, 1}, flash sector 1 - reserved for bootloader */
/* { 0x10002000, 0x01000, 2}, flash sector 2 - reserved for bootloader */
/* { 0x10003000, 0x01000, 3}, flash sector 3 - reserved for bootloader */
{ 0x10004000, 0x01000, 4}, /* flash sector 4 - 4kb */
{ 0x10005000, 0x01000, 5}, /* flash sector 5 - 4kb */

Since the checksum check and some other features in the bootloader are hardcoded to use flashLayout[0], this seemed the simplest.

Does anyone know if changing this sector mapping requires any additional changes other than to the srec of the app?

I've seen a few threads with people using OpenBLT for the 1400 and assume that there has been success. Any help would be appreciated in determining why my app doesn't start after the jump.

Thanks!
0 Likes
1 Reply
User19713
Level 1
Level 1
I found out that I needed to add the below lines to the startup_XMC1400.S file before the section that initializes the interrupt vector.

ldr r0, =__initial_sp
mov sp, r0

It fixes an issue with the stack pointer. If anyone ports OpenBLT to a board and finds that thier application is getting stuck in an infinite loop when the bootloader jumps to the application, the above lines may fix the issue.
0 Likes