Attachment is the UDS bootloader solution of S12Z, S32K1xx and S32K3xx. The package include projects and user guide. All projects are verified over ECU BUS(0.2.22).
Unified bootloader V2.1 Vs V2
1. Integrated S32K312, S32K314, S32K324, S32K344
PC tool(https://github.com/frankie-zeng/ECUBus
1. ECU BUS
2. Add CAN FD support
3. Easy of use
4. The tool only support PEAK
Disclaimer:
1. All projects/source code are demo code
Thank you for the example set, however, with the latest S32DS IDE the mex file gives an error that the platform is not compatible and it seems that it is not possible to install the old platform in the new S32DS IDE.
Would you be so kind to update the platform to the latest version to be able to import it?
Thank you in advance for your time and consideration.
First of all, thanks to Tomlin Tang and JaydenHsu,
Some users are looking for the flash driver source project of this routine, I summarize the process of making it as follows:
(you need to create a new project and add C40_Ip component to your project)
1.set Optimization Level to None
2.create flash image->HEX
3.modified the linker file.
4.copy and attribute "C40_Ip_StartSequence"
/* Including necessary configuration files. */
#include "Mcal.h"
volatile int exit_code = 0;
/* User includes */
#include "C40_Ip.h"
C40_Ip_StatusType __attribute__((section(".int_flstb"))) C40_Ip_StartSequence(uint8_t Operation,uint32_t TimeoutCnt)
{
uint32_t u32Timeout = TimeoutCnt;
C40_Ip_StatusType eReturnCode=STATUS_C40_IP_ERROR;
//erase cmd
if(0 == Operation)
{
/* One and only one ADATA register must also be written. This is referred to as an erase interlock write.*/
IP_FLASH->DATA[0] = 0xFFFFFFFFU;
/* Setup erase operation */
IP_FLASH->MCR |= FLASH_MCR_ERS_MASK;
/* Flash memory erase will be on a sector */
IP_FLASH->MCR &= ~FLASH_MCR_ESS_MASK;
}
//program cmd
else if(1 == Operation)
{
IP_FLASH->MCR |= FLASH_MCR_PGM_MASK;
}
else
{
/*error*/
}
/* start internal erase/program sequence */
IP_FLASH->MCR |= FLASH_MCR_EHV_MASK;
//check status
do
{
if(0U == (IP_FLASH->MCRS & FLASH_MCRS_DONE_MASK))
{
eReturnCode = STATUS_C40_IP_BUSY;
u32Timeout--;
if (0U == u32Timeout)
{
eReturnCode = STATUS_C40_IP_ERROR_TIMEOUT;
}
}
else
{
if(0U == (IP_FLASH->MCRS & FLASH_MCRS_PEG_MASK))
{
eReturnCode = STATUS_C40_IP_ERROR;
}
else
{
eReturnCode = STATUS_C40_IP_SUCCESS;
}
}
}while(STATUS_C40_IP_BUSY == eReturnCode);
if(STATUS_C40_IP_BUSY != eReturnCode)
{
/* Terminate erase operation */
IP_FLASH->MCR &= ~FLASH_MCR_EHV_MASK;
/* Terminate erase operation */
IP_FLASH->MCR &= ~FLASH_MCR_PGM_MASK;
}
return eReturnCode;
}
/*!
\brief The main function for the project.
\details The startup initialization sequence is the following:
* - startup asm routine
* - main()
*/
int main(void)
{
/* Write your code here */
for(;;)
{
if(exit_code != 0)
{
break;
}
}
return exit_code;
}
/** @} */
The above is the generation process of the flash driver for this routine, which is actually only a function "C40_Ip_StartSequence".
The bin content generated by the test is same
Hi, @HarrySu
Can you create another ticket in community? This ticket used to release unified bootloader code. Thanks!
BR
Tomlin
Hello @nxf10035 ,
I'm working on a BootLoader Topic with s32k312. Above i can see only an application and pdf file. Could u please guide me to get the Source Code for reference.
Thank In Advance!!!
Hi,
I already test pass with CAN, but CANFD fail, how to config the ECU-BUS tool for CANFD ?
Hi,
Is there going to be any update?
I am trying to figure out S32K344 example but it is given lots of errors even with RTD 2.0.3.
How can we use with RTD 3.0.0?
Hello @Senlent,
I have a problem with the project of Unified_Bootloader_Demo as the jump to the application fails.
The question is why have you used the flash driver source project (C40_Ip), I don´t know the reasons why I have to create new project with C40_Id and where I have to link the file.
If anyone could help me I would appreciate it. I hope I await your response as soon as possible,
Thank you for all,
Hi,
I also want to add additional questions to @JonAnder_Amante.
Why do you use DTCM instead of SRAM?
How can we adjust other (bootloader and app) linker files if we change flash driver as shown?
Do we need to link flash driver to app or bootloader for each app update?
thanks in advance.
Hi @anakha
I would like to ask you if your project jump to app from the program of bootloader. If you have achieved, could you tell me how have you got the jump to app?
thank you for all,
Jon Ander Amante
Unfortunately I could not achieve.
I find the same flash driver explanation from this blog and try defined corrections from its translation. But, still could not figure out how to implement.
Tengo una pregunta importante. ¿Cuál es el propósito de la aplicación que se encuentra en la carpeta S32K344_user_config? ¿La aplicación es que un led parpadea durante unos segundos?
Gracias y espero su respuesta lo antes posible.
Hello, @JonAnder_Amante @anakha @Grasshopper1 @justinleeyang
If you have any questions, please create a ticket in community. This ticket used to release unified bootloader code. Thanks!
BR
Tomlin
Hi, @nxf10035
I have created the ticket, how to communicate and solve problems in the next step ?
Hi,
I'm new to NXP Unified Bootloader, i have downloaded unified_bootloader_demo_V2.1 and i wat to use Unified bootloader for S32K148_CAN.
how to integrate Compiler in this S32K148_CAN project? and how to choose Compiler flags? how to compile code or Project?
#S32K312 #ECUBUS
I'm using ecubus to do s32k312 bootloader,I haven't figured out the flash_driver of the separate code,Look at the code given by the nxp official and the ecubus project,I found that the address selected when brushing the flash_driver is 0x20000010,But the code and LD are 0x20000000,Why is there this deviation?
It is helpful for me. thanks.
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,
How to fix this question based on unified_bootloader_demo_v2.1?
Thanks! 谢谢
Hi Everyone,
I am new to NXP Unified Bootloader, I downloaded the Unified bootloader V2.1 Vs V2, and tried to import project into S32DS, but it shows error like this:
is there anyone know how to configure the setting and how to kill this error? Thank you very much in advance.
Hello, where is the C40_Ip component , I cann't find it. this is the IDE I am using
What is purpose of C40_Ip_StartSequenceInit in FLASH_HAL_Init? how do i add it? the post says to make new project for C40_Ip_StartSequenceInit? how will it linked with bootloader?
@xierxiaofeng you need to install RTD 2.0.0
Hi
How do I compile the entire C40_IP to FlashDriver, I don't want to use C40_IP in the bootloader
@nxf10035 How can I debug if the app is not running well after jump from FBL ??