bootloader jump to app issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bootloader jump to app issue

Jump to solution
3,317 Views
thomasbao
Contributor II

Hello,

    I am developing CAN Bootloader for MPC57485G. There some issue.

bootloader:

thomasbao_1-1631430593522.png

app:

thomasbao_2-1631430643548.png

my jump code:

thomasbao_0-1631430716352.png

 

However, after __asm__("se_blrl"), the debug show as follow:

 

thomasbao_0-1631430551716.png

It shows "No source available for "0xfc0400" . Could anyone help me?

 

And,I add clean RAM before jump, It will show as follow:

thomasbao_0-1631432028314.png

Is uSDH IRQ? But I have disable IRQGlobal, and I never use uSDH.

0 Kudos
Reply
1 Solution
3,275 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

MSR is core register, it's not memory mapped. MSR register can be accessed using asm instructions mtmsr and mfmsr. For more details:

https://www.nxp.com/webapp/Download?colCode=E200Z4RM&location=null

https://www.nxp.com/webapp/Download?colCode=EREF_RM&location=null

https://www.nxp.com/docs/en/reference-manual/VLEPEM.pdf

I2C driver uses OSIF, you can find it in referenced components. It looks like configured PIT channel is still working. I2C_MasterDeinit() does not disable selected timer and INT_SYS_DisableIRQGlobal() clears MSR[EE] bit only. So, please check the OSIF/PIT. I guess that this could be the reason.

Regards,

Lukas

View solution in original post

0 Kudos
Reply
5 Replies
3,304 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

it makes sense that you can't see source code of the application because only elf file containing debugging information for bootloader is loaded. Please follow this HOW TO article:

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Debug-multiple-elf-files-in-S32-...

Also make sure that all interrupts are disabled before the jump (on all levels: MSR[EE], priority registers, local enable bits in peripherals) and it's also good practice to put everything back to default reset state. This can save a lot of headache.

Regards,

Lukas

0 Kudos
Reply
3,287 Views
thomasbao
Contributor II

And, what the address of MSR? I could not find it in RM.
I use I2C in mybootloader, if I read some data by I2C, then jump to userapp failed, otherwise it will success. And before jump, I call the I2C_MasterDeinit() and INT_SYS_DisableIRQGlobal(), what other things I need todo? 

0 Kudos
Reply
3,276 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

MSR is core register, it's not memory mapped. MSR register can be accessed using asm instructions mtmsr and mfmsr. For more details:

https://www.nxp.com/webapp/Download?colCode=E200Z4RM&location=null

https://www.nxp.com/webapp/Download?colCode=EREF_RM&location=null

https://www.nxp.com/docs/en/reference-manual/VLEPEM.pdf

I2C driver uses OSIF, you can find it in referenced components. It looks like configured PIT channel is still working. I2C_MasterDeinit() does not disable selected timer and INT_SYS_DisableIRQGlobal() clears MSR[EE] bit only. So, please check the OSIF/PIT. I guess that this could be the reason.

Regards,

Lukas

0 Kudos
Reply
3,268 Views
thomasbao
Contributor II

Thank you for your help.

0 Kudos
Reply
3,300 Views
thomasbao
Contributor II

Hello, Lukas

    I follow the steps as your link, but It only enter _start function in startup_MPC5748G.S. And click Resume, then it pause at my userapp main() function, not the bootloader.

0 Kudos
Reply