Hi all,
I want to share S32K144 bootloader example (based on AN12218SW : S32K148) using S32K144EVB
This example includes :
1. Bootloader interface : Tool to download User Application to S32K144 when running bootloader
2. Bootloader_b11 : Bootloader project
3. bootloader_app_b10 : User Application project
How to use :
I) Step 1 : to flash Bootloader (BootLoader_b10.elf) to S32K144 (through USB micro connector)
II) Step 2 : Bootloader will wait in 10 seconds for you click "download" user application 'bootloader_app_b10.srec' file through Serial_Bootloader_Interface.jar tool (Select Baudrate = 19200). If not, Bootloader will run forever in for-loop (user application is not downloaded into S32K144)
Note1 : After User Application is downloaded into S32K144, Bootloader will automatically jump to user application (RED LED and GREEN LED blink alternately)
Note2 : If you re-build User Application in User Application project, you need to modify a little srec file (bootloader_app_b10\Debug\bootloader_app_b10.srec)
Good luck .. ^_^
WIll the bootloader code be replaced with API functions? JAVA INTERFACE APPLICATION IS INDEPENDENT OF THE BOOTLOADER CODE right? will that be recreated with python, Where shall i get the source code for the java application?
But when I download other code srec file in that interface. It has not worked. The srec file which i provide should have to blink white LED. In java interface, the lines are get uploaded and finished, but no response on s32k144 RGB LED
Hello sir,
I need a source code for serial Bootloader interface (Application).
Connection from "127.0.0.1" via 127.0.0.1
Connection from "127.0.0.1" via 127.0.0.1
Searching for FreeRTOS Kernel Symbols...
pxCurrentTCB not found. FreeRTOS analysis not enabled.
Copyright 2017 P&E Microcomputer Systems,Inc.
Command Line :C:\NXP\S32DS_ARM_v2018.R1\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_3.3.5.201801101746\win32\pegdbserver_console -device=NXP_S32K1xx_S32K144F512M15 -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=OPENSDA -speed=5„
CMD>RE
Initializing.
Target has been RESET and is active.
CMD>CM C:\NXP\S32DS_ARM_v2018.R1\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_3.3.5.201801101746\win32\gdi\P&E\supportFiles_ARM\NXP\S32K1xx\freescale_s32k144f512m15_pflash_dflash_eeprom.arp
Initializing.
Initialized.
;version 1.04, 11/30/2017, Copyright 2017 P&E Microcomputer Systems, Inc. All rights reserved. www.pemicro.com [s32k144f512m15_x_pflash_dflash_eeprom_rev2]
;device freescale, s32k144f512m15, pflash_dflash_eeprom
;begin_cs device=$00000000, length=$14001000, ram=$20000000
Loading programming algorithm ...
WARNING - Selected .ARP file has been modified. CRC16 = $4977
Done.
CMD>VC
Verifying object file CRC-16 to device ranges ...
block 00000000-0000040F ...
Ok.
block 10000000-10001353 ...
Calculated CRC-16 does not match block. (File = $4092, Device = $0000)
CMD>EM
Erasing.
Module has been erased.
Reloading programming algorithm ...
done.
CMD>PM
Programming.
Processing Object File Data ...
.
Programmed.
Error communicating to target processor - try a RESET.
CMD>VC
Error loading CRC-16 algorithm.
Error loading CRC-16 Algorithm.
Error verifying flash of device
Error occurred during Flash programming.
I am getting this error. How can i solve this?
I tried the code which you have provided and it works well. But is their a Possibility to Jump to boot section during run time based on certain condition.
Lets Consider I Want to Jump to Bootloader section when I receive data on CAN_ID 0x01 so can i use a something like
JumpToUserApplication(*((uint32_t*)0x00000000), *((uint32_t*)(0x00000000 + 4)));
Regards
Gopal Rathi
Error in final launch sequence
Failed to execute MI command:
tbreak main
Error message from debugger back end:
Cannot access memory at address 0x100000a2
Cannot access memory at address 0x100000a2
I tried but i get this error . how can i solve this ?
Hi,
I have tried working with the bootloader code you shared. I am able to load the bootloader and the application software also working when the bootloader is in debugging mode. If i run it in normal mode, I am not able jump to application mode. I have attached the linker file of application and SREC file of app.
Regards,
kaarthi.
There are some more S32K1xx bootloader based on CAN as below links for your reference:
《汽车电子ECU bootloader开发之S32K1xx系列MCU NVM驱动独立安全bootloader开发详解》;
《S32K1xx ECU bootloader开发之RAM NVM驱动(S19文件)生成与集成调用和测试详解》
《汽车电子ECU bootloader开发之S32K144的CAN bootloader开发详解(工程源代码开源供大家参考)》;
《汽车电子ECU bootloader开发开发之S32K1xx系列MCU bootloader开发要点详解》;
Hope it's helpful for you.
Best regard,
Enwei.
Hi @enwei
it is very interesting project for flashing S32K via CAN Bus.
Because I am not fluent in chinese.
i have a question regarding the work process.
If i connect several boards (same bootloader) into single can bus.
and then I use GY8507 flashing *.S19 file into this can bus.
what would be the outcome? should all hardwares get same update of *.S19 or Error ?
looking forwards to your reply.
Best Regards,
Narudol T.
@Narudol-T Hi Narudol,
This CAN bus based bootloader is designed for automotive applications, on a car, each ECU has its own dedicated function with a pre-dfined CAN message ID for it bootloader link-up, so it is impossible to connect several boards (same bootloader) into single can bus at the same time.
So I'd like to know how is your use case?
For your question, if connecting mulptiple boards with the same bootloader configuration to a single CAN bus, for my project, it should work as normal(all the boards will response with the same beat). While in a actual bootloader, a randon number will be sent by the ECU to secure communicate with the bootloader host, so they will not work as expected with bus conflict.
Best regard,
Enwei Hu.
Hi @enwei
The application is Electric Vehicle.
Since normal operation will be 112SxP NMC Li-ion, it requires at least x8pcs of MC33771B board.
So, when when want to update the Battery Cell Controller (BCC) from outside though CAN Bus.
This bootloader will come very handy.
And, the Firmware of each BCC is basically same, only CAN ID shall be different.
In such above practice, what should be the best practice to handle it ?
Should we need to modify the Bootloader specificly to each BCC board or commonly used ?
Looking forward to your reply.
Thank you,
Narudol T.
Hi @Narudol-T ,
It's up to your product requirements on balance system performance vs. reliability.
Best regard,
Enwei Hu.
Hi @enwei
Thank you very much.
BTW, if there is any other flashing tool you may recommend besides GY8507?
For example, I have VECTOR, KVASER, and PCAN usb.
Could it being used for flashing *.S19 with any specific suggestion software ?
Looking forward to your reply.
Thank you,
Narudol T.
Hello @enwei ,
I am not able to open your link. I am getting the below message
Can you provide another link?
hi ,can you help me ,I do this ,but the app cannot be loader . I donot konw How to edit the srec file ? can you share youre e-mail ?
Hello, thank you for sharing your code. I have some questions, please.
1. Is Your bootloader capable of updating the user application via a UART interface for example or not.
2. How can I make my change your application (bootloader 10) by my own application?
regards,
Hi,
Thank you for sharing.
I would like to add the note. It is better to use some tools for SREC alignment for huge application projects.
The srec_cat tool can be used for this purpose:
Best regards,
Diana