Ho to link CM7 executable, including CM4 binary that run in FLASH XIP

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

Ho to link CM7 executable, including CM4 binary that run in FLASH XIP

971 Views
mastupristi
Senior Contributor I

Hi

In CM4 of an RT1175 I need to run the lwip network stack, with PTPv2 (similar to what was done in AN12149) and SDP+RTP to transport audio over IP. In addition there must be the USB stack with CDC for communication and UAC2 for audio transport. All on top of an RTOS (FreeRTOS and maybe in the future we will try Zephyr).

As a result, the FW for CM4 will most likely be more than 200KB for the code.
I would like to try to run the code in Flash XIP, but I have not found examples of this scenario in the SDK.
My idea is to link the CM4 giving it as a memory map from 0x30002000 onwards (in flash) and when I link it inside the CM7 the relevant linker script will output it to the same addresses.
Where do I try an example of this? How should I do it?

 

best regards

Max

Tags (3)
0 Kudos
Reply
3 Replies

919 Views
mayliu1
NXP Employee
NXP Employee

Hi @mastupristi ,

 

Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

I consulted with an expert in the boot field of RT product. The conclusion is that the CM4 image supports xip execution.

If the CM7 program is 0x30002000 XIP, then the CM4 program will have to avoid this position.

If you put the CM4 program in this position(0x30002000), then put the CM7 program back. 0x3000_0000 - 0x3000_1FFF Put the boot head of the CM7 program, the header will point to the address of the CM7 program, and the ROM will jump to the CM7 program according to the starter header. After the CM7 program runs, kickoff 0x3000_2000 the CM4 program is executed.

I suggest you can refer to the following link.

痞子衡嵌入式:MCUXpresso IDE下在线联合调试i.MXRT1170双核工程的三种方法 - 痞子衡 - 博客园 (cnblogs.com)

 

Wish it helps you.

If you still have question about it, please kindly let me know.

 

Best Regards

mayliu

0 Kudos
Reply

907 Views
mastupristi
Senior Contributor I

Hi @mayliu1 

it seems to me that you answered something different from my question.

I already know that CM4 can run XIP from Flash.
What I don't know is how I can link CM4 inside CM7. I mean I need the linker scripts for both of them.

I suggest you can refer to the following two links.

1: 痞子衡嵌入式:MCUXpresso IDE下在线联合调试i.MXRT1170双核工程的三种方法 - 痞子衡 - 博客园 (cnblogs.com)

2: Jay Heng: https://www.cnblogs.com/henjay724/p/18331325

Is it possible that NXP has not yet realized that these topics are too important to relegate them to a site exclusively for the Chinese market?

The first link however is not useful to me because the translation says “three methods for online joint debugging of i.MXRT1170 dual-core projects under MCUXpresso IDE”, surely I will also need to debug at some point (but using vscode instead of MCUXpresso IDE), but, as I said, my question was a different one.

the second link opens me a chat on MS teams with an unknown interlocutor. Who is the interlocutor in this chat?

regards

Max

 

0 Kudos
Reply

887 Views
mayliu1
NXP Employee
NXP Employee

Hi @mastupristi ,

 

Thank you for your interest in the NXP MIMXRT product, I would  like to provide service for you.

I'm sorry that I put wrong Link, I have already correct it.

Please refer to only this link:

痞子衡嵌入式:MCUXpresso IDE下在线联合调试i.MXRT1170双核工程的三种方法 - 痞子衡 - 博客园 (cnblogs.com)

And also,Please import SDK demo as follows.

SDK_2_16_000_MIMXRT1170-EVKB\boards\evkmimxrt1170\demo_apps\hello_world_secondary_core_boot\cm7

SDK_2_16_000_MIMXRT1170-EVKB\boards\evkmimxrt1170\demo_apps\hello_world_secondary_core_boot\cm4

In the link, 2.3 chapter describe what you want to realize.

mayliu1_0-1727167565038.png

 

Wish it helps you.
If you still have question about it, please kindly let me know.

Best Regards

mayliu

 

0 Kudos
Reply