bootloader jump to app issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

bootloader jump to app issue

ソリューションへジャンプ
3,308件の閲覧回数
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,266件の閲覧回数
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,295件の閲覧回数
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,278件の閲覧回数
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,267件の閲覧回数
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,259件の閲覧回数
thomasbao
Contributor II

Thank you for your help.

0 件の賞賛
返信
3,291件の閲覧回数
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 件の賞賛
返信