This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Jump from custom bootloader to application

Hello, I am trying to build  a custom bootloader which is jumping in the application. In order to do this in a first approach, i wrote a Bootloder which jumps as follows:

For the application I changed the VET_TAB_OFFSET to 0x000A0000UL.

In Keil Settings Target I changed the Read/only Memory Areas:

IROM1 : Start 0x80A000 Size 0x60000

In the Target Options I unchecked Use Memory Layout from Target Dialog

For R/O Base I put 0x080A0000

My scatter file for the application:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
LR_IROM1 0x080A0000 0x00060000 { ; load region size_region
ER_IROM1 0x080A0000 0x00060000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00020000 { ; RW data
.ANY (+RW +ZI)
}
RW_IRAM2 0x24000000 0x00080000 {
.ANY (+RW +ZI)
}
}
LR_IROM2 0x08100000 0x00100000 {
ER_IROM2 0x08100000 0x00100000 { ; load address = execution address
.ANY (+RO)
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

For the Bootloader

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x000A0000 { ; load region size_region
ER_IROM1 0x08000000 0x00A0000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00020000 { ; RW data
.ANY (+RW +ZI)
}
RW_IRAM2 0x24000000 0x00080000 {
.ANY (+RW +ZI)
}
}
LR_IROM2 0x08100000 0x00100000 {
ER_IROM2 0x08100000 0x00100000 { ; load address = execution address
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I use Keil with the MDK Plus Toolchain on the STM32H753.

I do the jump on the bootloader as follows and nothing happens:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
void start_app()
{
uint32_t JumpAddress = *(volatile uint32_t*) (JUMP_ADDR+4);
void (*jump_to_application)(void)= (void*) JumpAddress;
HAL_RCC_DeInit();
__disable_irq();
__set_MSP(*(__IO uint32_t*) JUMP_ADDR);
// Disable systick timer and reset it to default values
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
//__disable_irq();
//__DSB();
SCB->VTOR = JUMP_ADDR;
jump_to_application();
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

What could be the reason?

0