How to add APPKEY to linker file.
I have 2 s32K144 board's, I want to update firmware using CAN FD. And I followed AN12323 doc. And I am able to update the given binary red_led.bin and blue_led.bin images. But when I added my binary in place of this and tried flashing using gateway. And flashing is successful. But my application is not able to boot. Then I researched and found I have to have APPKEY in my application which I didnt included. Please let me know how can I add APPKEY in linker file
Thanks
Hello @lukaszadrapa
Now I am able to flash the bin file which I have created using given information. The application actually blinks green led. But when I flashed the bin file it actually not able to boot the firmware. No LED is blinked. Please help I am attaching my project with this reply.
Thank you
I'm sorry, but currently we do not have resources to debug ctm's code.
What can you see in the debugger? Can you reach the code which jumps to app? Is the jump successful? Is it possible to step the app?
Regards,
Lukas
Hello lukaszadrapa,
Yes, I can see that using debug mode that it is jumping to the fw location but reading from that location is not happening. Like I have created an application for blinking of green led. So that is not even working. I am doubting interrupt vector table. Of firmware what I have flashed. And I just want to create bin file using position independent code. As in gateway application they have given two bin files. S32K144_Blue_LED_pic.bin and S32K144_Red_LED_pic.bin namely. I just want to know how these bin files were created.
Thank you
Hi @vinaykl
as mentioned in the AN12323, the app binary files were created in IAR IDE which supports position independent executable.
The problem is that this is not supported by S32 Design Studio. Or to be more precise, S32DS supports position independent code (only piece of code like a function) but not position independent executable (whole app image). If you want to use S32DS, it would be necessary to have always the right image compiled for given address space.
Here you can see how to modify linker file of application:
https://community.nxp.com/t5/S32K/S32K144-Firmware-update/m-p/1350022/highlight/true#M12319
And I think there are more useful information in that thread.
Regards,
Lukas
Hi @vinaykl
the header including APPKEY is updated by bootloader, it's not part of the bin image / application project.
Something was already discussed here:
https://community.nxp.com/t5/S32K/S32K144-Firmware-update/m-p/1359634
You can also take a look at Gateway project - it defines the header which is sent in first step, then the bin image is sent and once it is sent, the bootloader updates the header and APPKEY.
Regards,
Lukas