I have some porblems about app addr layout in my qn2021 board

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

I have some porblems about app addr layout in my qn2021 board

1,332 次查看
xiaozhukuaipao
Contributor I

I have a qn2021 board.Can i modify the bootloader in rom?.Is The bootloader from manufactures?  How to tell bootloader program about my app start addr ,if i cannot modify zhe bootloader

0 项奖励
回复
3 回复数

1,317 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi,

As far as I know, QN9021 bootloader isn't allowed to modify. 

The application start (or entry) address is defined as an attribute in the ELF/Dwarf, but this is indicative only. What counts is what you have in the hardware. At reset it fetches the PC and SP from the vector table, so from an application stand point you can read from that memory. Then it goes through that code (startup code) and jumps to main().

As for the debugger: it follows what the startup code does, but you can script it (with the usual gdb scripts if you like) to modify the registers and do special stuff). How such a scripting looks like: https://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/

But this won't have an effect if you run it without the debugger.

In additional, this source maybe helpful:  https://community.nxp.com/t5/MCUXpresso-IDE/Debug-Fails-When-Application-is-Offset-in-Flash/m-p/8775...

 

Best regards,

Gavin

0 项奖励
回复

1,307 次查看
xiaozhukuaipao
Contributor I
thanks your reply .It need a address When the bootloader jump to my app.My problem is how to transfer the address to bootloader.
0 项奖励
回复

1,301 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @xiaozhukuaipao ,

 

Sorry for my late reply. 

The bootloader will automatically guide the startup process, and finally execute to the main entry address of the APP. Are you referring to modifying the APP entry? If this is the case, it can be done. For details, please refer to this article: IAR Embedded Workbench中的MCU启动过程 | IAR

 

Best regards,

Gavin

0 项奖励
回复