mcuboot跳转异常

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

mcuboot跳转异常

1,218 Views
84521716
Contributor I

RT1052 MCU工程,参考mcuboot_opensource代码编写了一个自己的boot程序,boot代码放在OCRAM上(nor_ocram_txt_dtcm),APP代码也放在OCRAM上(nor_ocram_txt_dtcm),测试发现boot程序不能正常跳入到app,但是boot代码放在SDRAM上(nor_sdram_txt_ram),app放在OCRAM上(nor_ocram_txt_dtcm)能正常跳转运行。项目上想剩一颗SDRAM芯片,所以只能boot代码在OCRAM上运行,app也得在OCRAM上运行。要如何适配才能让boot代码放在OCRAM,app也放在OCRAM上,boot能正常跳转入app?(2个scf文件都是验证过,正常工作的,app跳转地址和堆栈地址也是对的)

84521716_0-1709881166170.png

 


84521716_1-1709880852741.png

 

Labels (1)
0 Kudos
Reply
4 Replies

1,152 Views
84521716
Contributor I

84521716_0-1710496644298.png

我规避了这些内存,一样是跳转异常,而且代码里应该是没有用bootROM api,bootloader里就只有拷贝app固件和跳转到app;

 

0 Kudos
Reply

1,187 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @84521716 ,

 

请问你的boot code是放在m_qacode这个section吗?APP代码放在m_data2这个section后面?

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,174 Views
84521716
Contributor I

boot code放在sdram,APP代码放也在m_data2这个section后面能正常跳转的;

一下是nor_sdram_txt_ram.scf部分截图

 

84521716_0-1710417333506.png

boot code放在m_data2这个section后面,APP代码放也在m_data2这个section后面是不能正常跳转的(scf文件,除了flash地址不一样,其他都一样)。现在想要boot code和app code 都放在m_data2这个section能正常跳转;

 

0 Kudos
Reply

1,156 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @84521716 ,

 

你的bootloader里面有没有调用bootROM API的接口?如果有的话需要注意你的bootloader有没有占用下面这段OCRAM空间:

Kan_Li_0-1710491635736.png

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos
Reply