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

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

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

580件の閲覧回数
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 返答(返信)

565件の閲覧回数
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 件の賞賛
返信

555件の閲覧回数
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 件の賞賛
返信

549件の閲覧回数
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 件の賞賛
返信