At present, I am upgrading the bootloader of S32K344. After the upgrade, the boot fails to jump to the app. I have done the following steps in total:
1. Assign the app address value to the vector table offset register
S32_SCB->VTOR = 0x600000 ;
2. Jump to the address of reset interrupt function in the APP interrupt vector table
((JumpToPtr) (*((uint32 *)( 0x600000 + 4))))();
3. Only this sentence of the LD file has been changed in the app firmware:
int_pflash : ORIGIN = 0x00600000, LENGTH = 0x001D4000
PE can run the APP firmware in a single step directly (app firmware can run normally), but the following situation occurs when jumping after the app is upgraded.
“Break at address "0x600800" with no debug information available, or outside of program code.”
Of course, I have also tried to jump directly after entering the boot, and this information still appears. I don't know where the problem is, but on the K1 chip these operations are OK. But at present, this problem appears on K3, is the kernel of M7 "app_address+4" is not the position of the reset function in the interrupt vector table? Is it something else? Is there a solution to this problem?
Hi, I am using the project "S32K344_Can_bootloader_RTD200" in the microprocessor S32K344. I want to download an application with the program of bootloader. I have achieved the jump from program to application but I have different questions. 1. I want to use #define EN_DELAY_TIME but when I uncomment the command in the folder "public_in", the program has different errors. My target to use "Backdoor", that is to say, I want to check if the program has to enter to bootloader or not. I don´t know the process and the different functions that I have to use to achieve the target. I want to use the function "Boot_CheckReqBootloaderMode(void)" but when I debug the program, it never enters to the "if". Could you explain me the process and the steps to achieve the target. I add different functions that I think are important. 2. I don´t know if I have to modificate the parameters of "static tJumpAppDelayTimeInfo gs_stJumpAPPDelayTimeInfo = {FALSE, 0u};". I have to change this structure ? You can see all structure in one of the next pictures. I need the reply as soon as possible since I have to send a project very soon.
Thank you for all,
Hi @Jackson_Ping,
Can you try this code?
ADDR_APP = 0x600000;
func = *(UINT32 volatile *)(ADDR_APP + 0xC);
func = *(UINT32 volatile *)(((UINT32)func) + 0x4);
func = (((UINT32)func) & 0xFFFFFFFFU);
(* (void (*) (void)) func)();
At ADDR_APP there should be 0x5AA55AA5
At ADDR_APP + offset 0xC, there is the core start address.
(RM, Table 189. Image vector table).
Regards,
Daniel
Hello ,
i have used same program. for K344, it's OK to jump from bootloader to APP. But when I used same way to test K311. it doesn't jump. Could you give some suggestion?
You need to find the exact location of the interrupt vector table correctly. The location of the interrupt vector table for K1 and K3 is different. The interrupt vector table can be found in the LD file or map table.
Hi.Daniel,
Thank you very much for your answer,I've solved my problem.
But I still have a problem, that is, I found a piece of code in the LD file, a piece of content called "boot_header" occupies 2048 bytes, I am not very clear what "boot_header" means
Hi @Jackson_Ping,
The boot_header does not occupy 2048B it is just alligned to this value.
The boot_header is defined in startup_cm7.s
RM rev7, Table 189. Image vector table
BR, Daniel
Hi.Daniel,
I have understood.
Thanks for your answer!
Best Regards,
Jackson