lkjljljlj 发表于 2018-8-6 09:37
你四个核跑的相同的工程吗?如果这样的话,stack和.bss段一定要放到LL2里(用local address)。
请参考另一个相关的帖子:
http://www.deyisupport.com/question_answer/dsp_arm/c6000_multicore/f/53/p/68413/163132.aspx#163132
您好!
4个Core跑一样的工程。每个Core上跑一个SRIO收发Task、两个算法Task,每个Core都是通过SRIO接收数据,然后处理,再发送出去。
其中一个算法Task的stacksize为0x40000,另一个算法Task的stacksize为0x20000。
这样导致.text、.far太大,无法都放在LL2上,所以我做了如下设置
Program.sectMap[".idleTaskStackSection"] = "MSMCSRAM";Program.sectMap[".taskStackSection"] = "MSMCSRAM";Program.sectMap["systemHeap"] = "MSMCSRAM";结果查看map文件,.far:taskStackSection以及systemHeap被放置在了MSMCSRAM中,才能正确编译通过。
Map文件片段如下
MEMORY CONFIGURATION name origin length used unused attr fill---------------------- -------- --------- -------- -------- ---- -------- L2SRAM 00800000 00100000 000dfc08 000203f8 RW X MSMCSRAM 0c000000 00200000 001343a0 000cbc60 RW X DDR3 80000000 20000000 00000000 20000000 RWIXSEGMENT ALLOCATION MAPrun origin load origin length init length attrs members---------- ----------- ---------- ----------- ----- -------00800000 00800000 00059700 00059700 r-x 00800000 00800000 000596e0 000596e0 r-x .text 008596e0 008596e0 00000020 00000020 r-- .const.100859700 00859700 000389c8 00000000 rw- 00859700 00859700 000389c8 00000000 rw- .far.1008920d0 008920d0 000004b0 00000000 rw- 008920d0 008920d0 000004b0 00000000 rw- .far.200892580 00892580 0001c59e 0001c59e r-- 00892580 00892580 0001c59e 0001c59e r-- .const.2008aeb20 008aeb20 0000821a 0000821a rw- 008aeb20 008aeb20 0000821a 0000821a rw- .fardata008b6d40 008b6d40 00010080 00000000 rw- 008b6d40 008b6d40 00008080 00000000 rw- tcp3DriverSection 008bedc0 008bedc0 00008000 00000000 rw- tcp3DDataSection008c6dc0 008c6dc0 00012080 00008000 rw- 008c6dc0 008c6dc0 00008000 00008000 rw- .args 008cedc0 008cedc0 00008000 00000000 rw- .stack 008d6dc0 008d6dc0 00002080 00000000 rw- tcp3QueueDescrSection008d8e40 008d8e40 0000019c 0000019c r-- 008d8e40 008d8e40 0000019c 0000019c r-- .switch.1008d9000 008d9000 000004b0 000004b0 r-x 008d9000 008d9000 00000200 00000200 r-x .vecs 008d9200 008d9200 000002b0 000002b0 r-- .switch.2008d94b0 008d94b0 000000b4 00000000 rw- 008d94b0 008d94b0 000000b4 00000000 rw- .bss008d9564 008d9564 000000d1 000000d1 rw- 008d9564 008d9564 000000d1 000000d1 rw- .neardata008d9638 008d9638 00000068 00000068 r-- 008d9638 008d9638 00000068 00000068 r-- .rodata008d96a0 008d96a0 000001a0 00000000 rw- 008d96a0 008d96a0 00000120 00000000 rw- .cio 008d97c0 008d97c0 00000080 00000000 rw- tcp3DataSection008d9840 008d9840 000063fc 000063fc r-- 008d9840 008d9840 000063fc 000063fc r-- .cinit0c010000 0c010000 001219a0 00000000 rw- 0c010000 0c010000 0007b8a0 00000000 rw- .Tran_Receive_buffer 0c08b8a0 0c08b8a0 00060800 00000000 rw- .far:taskStackSection 0c0ec0a0 0c0ec0a0 0003c000 00000000 rw- systemHeap 0c1280a0 0c1280a0 00009900 00000000 rw- IRAM0c131a00 0c131a00 00002880 00000000 rw- 0c131a00 0c131a00 00002400 00000000 rw- .qmss 0c133e00 0c133e00 00000480 00000000 rw- .cppi0c134280 0c134280 00000180 00000180 rw- 0c134280 0c134280 00000180 00000180 rw- .srioSharedMem
跑程序时,这样的代码(同样的代码、同样的cfg文件)被加载到Core0上,程序运行正常。但是,程序加载继续加载到Core1上时,就出现了如下的问题
The DSP core runs @ 983MHzDebug(Core 1): Waiting for SRIO to be initialized.Debug(Core 1): SRIO can now be used.SRIO start!Core Num = 1****************************************************ICT Debug Info: SRIO Task Start****************************************************A0=0xc0cb858 A1=0x0A2=0x1 A3=0xc131980A4=0xc0ec4d8 A5=0xc0ec4c8A6=0x8027 A7=0x1A8=0x828d20 A9=0xc133d38A10=0x847b2e A11=0xc0cb888A12=0x847b78 A13=0x0A14=0x1c9a1 A15=0x5400027A16=0xc0ecb18 A17=0x0A18=0xc0ec934 A19=0x1e0A20=0x20 A21=0x0A22=0x0 A23=0x0A24=0x0 A25=0x1A26=0x0 A27=0x0A28=0x1088e0c0 A29=0x134A30=0x34022e50 A31=0x8ae928B0=0xc0ecbd0 B1=0x0B2=0x0 B3=0x2000027B4=0x0 B5=0x15000102B6=0xc0ec4c8 B7=0x1B8=0x8b5978 B9=0x8ae964B10=0xc0cb88c B11=0x0B12=0x0 B13=0x3B14=0x8d94b0 B15=0xc0cb888B16=0x0 B17=0x0B18=0x2e40000 B19=0x0B20=0x0 B21=0x2e4B22=0x2e40000 B23=0x0B24=0x0 B25=0x3000B26=0x3000 B27=0x0B28=0x0 B29=0x0B30=0x2e4 B31=0xc0ecc54NTSR=0x1000eITSR=0xfIRP=0x85651aSSR=0x0AMR=0x0RILC=0x0ILC=0x0Exception at 0x0EFR=0x2 NRP=0x0Internal exception: IERR=0x1Instruction fetch exceptionti.sy***ios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x00000000, sp = 0x0c0cb888.To see more exception detail, use ROV or set 'ti.sy***ios.family.c64p.Exception.enablePrint = true;'xdc.runtime.Error.raise: terminating execution
我的问题如下:
1. Core1上运行代码出现的问题,是否是因为程序占据了MSMCSRAM 0x001343a0大小的空间,跑在一个Core上可以,但是继续跑在其他核上,就导致MSMCSRAM不够了?
2. 因为每个Core上跑的程序占据的.far:taskStackSection以及systemHeap过大,不能都放在MSMCSRAM上,能否把这些放置在DDR3?每个Core都划分一个区域放置每个Core的.far:taskStackSection以及systemHeap?
虽然我简单设置如下
Program.sectMap[".idleTaskStackSection"] = "DDR3";Program.sectMap[".taskStackSection"] = "DDR3";Program.sectMap["systemHeap"] = "DDR3";结果编译正确,但是程序仅加载到Core0上也出现如下问题
The DSP core runs @ 983MHzICT BBU Debug Info: QMSS successfully initializedICT BBU Debug Info: CPPI successfully initialized ICT BBU Debug Info: PASS successfully initializedICT BBU Debug Info: Ethernet subsystem successfully initializedICT BBU Debug Info: Tx setup successfully done ICT BBU Debug Info: Rx setup successfully done ICT BBU Debug Info: PASS setup successfully done ICT BBU Debug Info: Core0 SRIO Driver has been initializedSRIO start!SGMII start!****************************************************ICT Debug Info:SGMII Task Start****************************************************Core Num = 0****************************************************ICT Debug Info: SRIO Task Start****************************************************A0=0x8003ffb8 A1=0x0A2=0x1 A3=0xc0d1180A4=0xc0927d8 A5=0xc0927c8A6=0x8027 A7=0x1A8=0x828d20 A9=0xc0d3538A10=0xffbeffff A11=0x82ffffffA12=0xffbeffff A13=0x82ffffffA14=0xffbeffff A15=0xffffffffA16=0xc092e18 A17=0x0A18=0xc092c34 A19=0x1e0A20=0x0 A21=0x0A22=0x0 A23=0x0A24=0x0 A25=0x0A26=0x0 A27=0x0A28=0x1088de40 A29=0x134A30=0x34022e30 A31=0x8ae928B0=0xc092ed0 B1=0x0B2=0x0 B3=0x11be2000B4=0x82ffffff B5=0x15000102B6=0xc0927c8 B7=0x1B8=0x8b5978 B9=0x8ae964B10=0x11be2000 B11=0x80ff7021B12=0xffbeffff B13=0xffffffffB14=0x8d94b0 B15=0x8003ffe8B16=0x0 B17=0x0B18=0x2e20000 B19=0x0B20=0x0 B21=0x2e2B22=0x2e20000 B23=0x0B24=0x0 B25=0x3000B26=0x3000 B27=0x0B28=0x0 B29=0x0B30=0x2e2 B31=0xc092f54NTSR=0x1000eITSR=0xfIRP=0x85651aSSR=0x0AMR=0x0RILC=0x0ILC=0x0Exception at 0x82fffffeEFR=0x2 NRP=0x82fffffeInternal exception: IERR=0x2Fetch packet exceptionti.sy***ios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x82fffffe, sp = 0x8003ffe8.To see more exception detail, use ROV or set 'ti.sy***ios.family.c64p.Exception.enablePrint = true;'xdc.runtime.Error.raise: terminating execution3. 还有更好的建议吗?
调试非常急!望不吝赐教!!谢谢!