bootloader jump to app issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

bootloader jump to app issue

跳至解决方案
3,306 次查看
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 项奖励
回复
1 解答
3,264 次查看
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 项奖励
回复
5 回复数
3,293 次查看
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 项奖励
回复
3,276 次查看
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 项奖励
回复
3,265 次查看
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 项奖励
回复
3,257 次查看
thomasbao
Contributor II

Thank you for your help.

0 项奖励
回复
3,289 次查看
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 项奖励
回复