I am trying to load a CAN bootloader onto the S32K344. I have placed a simple LED blinking application into it, which is compiled with AUTOSAR 4.7.0. The code is debugged, and from this code, I generate the .ld and .bin files. When I start the code, it gets stuck at AppAddr, even though it has a value, and it jumps to HardFault Handler. How can I resolve this issue?
Hi Lukas,
I took this the function from below link.
https://community.nxp.com/t5/S32K-Knowledge-Base/Unified-bootloader-Demo/ta-p/1423099
I created a template project for s32k344. And i added the s32k344 can bootloader files in this project. I fixed the issues and i debug.But i take mistake about boottojumpapp() function.It cant found register handler.How should i configure ld files ?
BR.
Hi @yavuzklcc
first of all, please notice that Unified bootloader is unofficial demo only shared on the community. It is provided AS IS with no guarantees and no support (or with very limited support).
My recommendation is to use the same linker files as you can see on those projects. That means the bootloader starts at 0x40_0000 and app starts at 0x44_0000:
bootloader:
int_flash : ORIGIN = 0x00400000, LENGTH = 0x00040000 /* 256K*/
app (there's area 0x200 for block info):
int_flash : ORIGIN = 0x00440200, LENGTH = 0x007FFFFF - 0x00040200
This is then used in the code like this:
/*application can used space*/
const BlockInfo_t gs_astBlockNumA[] = {
{0x00440000u, 0x007D4000}, /*App A information is in the block.*/
};
... so the best way is to keep this layout as is.
Regards,
Lukas
Where does this function come from? It's not function from RTD.
Hi @yavuzklcc
the AppAddr doesn't seem to be correct. It's not within the flash memory at all.
How did you get the AppAddr? What is the address of IVT of your application? Can you read the start address from IVT?
Regards,
Lukas