A multicore project problem

cancel
Showing results for 
Search instead for 
Did you mean: 

A multicore project problem

296 Views
john71
Senior Contributor I

CM4 memory

Flash Flash_00                 Flash   0x30800000 0x800000
RAM SRAM_ITC_cm4     RAM    0x1ffe0000 0x20000
RAM DTCM                     RAM2   0x20000000 0x20000
RAM rpmsg_sh_mem      RAM3   0x202c0000 0x2000
RAM NCACHE_REGION RAM4  0x83000000 0x800000

 

CM7 memory

Flash BOARD_FLASH          FLASH 0x30000000  0x800000
RAM SRAM_DTC_cm7         RAM    0x20000000  0x40000
RAM OCRAM_ITCM_ALIAS  RAM2 0x20200000  0x20000
RAM rpmsg_sh_mem            RAM3 0x202c0000   0x2000
RAM NCACHE_REGION       RAM4 0x202c8000   0x8000

 

When I compile CM7 project I get

evkmimxrt1160_hello_world_cm7.axf section `.data_RAM2_core_m4slave_text' will not fit in region `OCRAM_ITCM_ALIAS' evkmimxrt1160_hello_world_cm7
region `OCRAM_ITCM_ALIAS' overflowed by 3428 bytes evkmimxrt1160_hello_world_cm7


Memory region Used Size Region Size %age Used
BOARD_FLASH: 169792 B 8 MB 2.02%
SRAM_DTC_cm7: 8544 B 256 KB 3.26%
OCRAM_ITCM_ALIAS: 134500 B 128 KB 102.62%
rpmsg_sh_mem: 0 GB 8 KB 0.00%
NCACHE_REGION: 0 GB 32 KB 0.00%

 

And I see at the code

 

/* Address of memory, from which the secondary core will boot */
#define CORE1_BOOT_ADDRESS (void *)0x20200000

/* Boot Secondary core application */
    (void)PRINTF("Starting Secondary core.\r\n");
    (void)MCMGR_StartCore(kMCMGR_Core1, (void *)(char *)CORE1_BOOT_ADDRESS, 2, kMCMGR_Start_Synchronous);
    (void)PRINTF("The secondary core application has been started.\r\n");

 

 

Why address 0x20200000? How should I change it?

0 Kudos
4 Replies

260 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi John,

I recommend you to check the following application note, I think it will help you clarify most of your questions.

https://www.nxp.com/docs/en/application-note/AN13264.pdf

Have a great day,

Felipe

-------------------------------------------------------------------------------

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

241 Views
john71
Senior Contributor I

OK. Now it's compiled all good.

CM4 memory

RAM  SRAM_ITC_cm4     0x1ffe0000   0x20000

RAM  DTCM                      0x20000000  0x20000 

RAM  rpmsg_sh_mem       0x202c0000  0x2000

RAM  NCACHE_REGION  0x20240000  0x10000

CM7 memory

Flash   BOARD_FLASH         0x30000000   0x1000000

RAM  SRAM_DTC_cm7        0x20000000   0x40000

 RAM OCRAM_ITCM_ALIAS 0x20200000  0x20000

RAM  rpmsg_sh_mem           0x202c0000    0x2000

RAM NCACHE_REGION      0x83000000   0x800000

 

When I start Debug this message pops-up first

 

error.png

 

Then I get

MCUXpresso IDE RedlinkMulti Driver v11.4 (Sep 13 2021 15:04:52 - crt_emu_cm_redlink build 16)
Found chip XML file in D:/Workspace_MCUXpresso_11.4/evkmimxrt1160_hello_world_cm7/Debug\MIMXRT1166xxxxx.xml
( 5) Remote configuration complete
Reconnected to existing LinkServer process.
============= SCRIPT: RT1160_connect_M7_wake_M4.scp =============
RT1160 Connect M7 and Wake M4 Script
DpID = 6BA02477
APID = 0x84770001
Error: Wire Ack Fault - target connected?
View cores on the DAP AP
DpID = 6BA02477
============= END SCRIPT ========================================
Probe Firmware: DAPLink CMSIS-DAP (ARM)
Serial Number: 024400000208827100000000000000000000000097969905
VID:PID: 0D28:0204
USB Path: \\?\hid#vid_0d28&pid_0204&mi_03#9&350958c4&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Using memory from core 0 after searching for a good core
connection failed - Em(04). Cannot provide power to DAP bus... Retrying
Failed on connect: Em(04). Cannot provide power to DAP bus.
Connected&Reset. Was: NotConnected. DpID: 6BA02477. CpuID: 00000000. Info: <None>
Last stub error 0: OK
Last sticky error: 0x0 AIndex: 0
Debug bus selected: MemAp 0
DAP Speed test unexecuted or failed
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
(100) Target Connection Failed
error closing down debug session - Nn(05). Wire ACK Fault in DAP access

 

What should I do?

 

I connected an external debugger J-LINK and I get

J-Link is connected.
Device "MIMXRT1166XXX6_M7" selected.
Firmware: J-Link V10 compiled Aug 9 2021 10:30:48
Hardware: V10.10
S/N: 50119084
Feature(s): GDB
Checking target voltage...
Target voltage: 3.33 V
Listening on TCP/IP port 2331
Connecting to target...
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...
Could not connect to target.
Please check power, connection and settings.

Server has been shut down.

 

 

0 Kudos

146 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi John,

Please follow section 4 of the AN for multicore debugging detailed steps.

Best regards,

Felipe

0 Kudos

277 Views
john71
Senior Contributor I

How do I share the memory between cores? How do I set in master CORE1_BOOT_ADDRESS?

And what does it mean?

m4.png

 

0 Kudos