|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
1 q; Q" _* y2 h, l! [ {1 i: \, H我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
: Z, {- C) s6 J(不过疑惑的是,为何单独DSP仿真就没有问题呢?)7 ^3 G, d) w8 T
1 j5 m) y7 U4 j0 t& S J4 `
是不是需要在DSP.CFG中进行配置
# C6 H7 G2 |' k7 Y0 |我现在的配置为4 _# v! N* C. R0 z
/ v; i7 `3 g$ e, f5 y8 L9 P
/*3 H1 ]0 g b! c; W& D
* ======== Operating System Configuration ========
- F1 |4 a# h# S% N */
0 ]: k# k. S+ |' b/ X
3 Y- I+ {, n3 ]( E* y/* no rts heap */
2 a$ ^$ C8 X$ S; S! pProgram.heap = 0;" g$ ]9 X. C1 T9 }4 ~% C7 K5 w
Program.argSize = 100; /* minimum size */
" A1 x8 q2 m2 S: Y X! N3 XProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大6 u5 k% m8 n. |+ N& ?% J( b
7 h# Q) ^; J3 q& f/* create a default heap */. d& ?9 _/ D+ I; Z: N
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
" G4 Y6 \$ n: Ovar heapMemParams = new HeapMem.Params();; L# ?$ U! n3 |4 t/ H5 J4 t1 E1 i3 Y6 e
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
3 F* b( o& C* K, o8 ^8 m
1 f% h7 b! e: G M3 V, H svar Memory = xdc.useModule('xdc.runtime.Memory');* P# Z9 W7 Q/ |
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
: V' r; O6 g; E q, R( O/ Y X7 K6 v+ N1 T8 L
/* configure System module */
) M X, y2 j- `# E; E# D! qvar SysMin = xdc.useModule('xdc.runtime.SysMin');5 }. _9 F: w% M& Z/ o
SysMin.bufSize = 0x1000;
h6 Q0 J! ^/ ^" \" O" v* N' f( ^SysMin.flushAtExit = false;1 c! R$ n. Y* u3 E7 P, m
1 w5 Q5 @. t0 g: Avar System = xdc.useModule('xdc.runtime.System');! \: y" p3 F# r, g
System.SupportProxy = SysMin;% L" I" E+ ]5 k$ J r3 c* f. O
1 k; H1 w8 d+ }+ f5 {9 N
/* configure SysBios to use the lower half of Timer 1 */
3 E$ S9 M F6 G6 f: E4 O Pvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
% N8 E# O1 q8 zvar Clock = xdc.useModule('ti.sysbios.knl.Clock');
3 M4 I1 n" Z3 t' q5 h) oTimer.timerSettings[1].master = true;6 T1 H7 K. l. {
Timer.defaultHalf = Timer.Half_LOWER;4 p9 g4 b0 X) s1 Q
Clock.timerId = 1;3 Z8 ^; a7 u# n' u' [; v4 W2 L: z
6 U, E8 K9 u: x' @% r4 b
. L' d! W' n5 D0 G( Y- i/ a) r/ c# ]/*' u" f( M$ N( q& A4 H/ G
* ======== Miscellaneous Configuration ======== e! P+ w* a7 F+ r# X8 ?, N. G
*/3 y# @$ @3 C, s+ F% \6 m5 {
7 Z. m* h5 i9 B6 w3 E/* set default diags mask */( E# @- Q+ u1 k, M1 Y* _
var Diags = xdc.useModule('xdc.runtime.Diags');
/ q! x& G6 o, l+ J( Z p/ Z" pvar Defaults = xdc.useModule('xdc.runtime.Defaults');
8 D; P* V* I3 _% Z: Z- |; m3 {8 E: j; U/ Y/ M; c' D! B
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
5 W0 U" t/ p+ V0 h/ L' V6 h3 p! RDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
* q1 K9 {% W- w6 [9 ADefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
" s7 {. R: O1 q& K0 T# w* G9 vDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */: S+ t3 U2 [5 _% g& S: l6 `$ C
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
8 j9 n8 e/ X5 V$ N3 H% z" WDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;% Y& r9 M1 S, }: j4 h
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
1 i# x( G. S' G5 X- A2 @& wDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;$ D: K4 i3 Z& w; | r, U
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
/ i) g; I4 v0 WDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
+ S+ i( F: x% R+ ]! |. [% C) cDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;2 W7 F+ U$ n6 J) Y5 v
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;! P, h: @5 f7 W+ a8 {* x0 I
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;: {$ k/ k+ N6 W6 Y% B
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;$ Q/ P4 R( e% {! q
5 I0 B: w) b$ {/* override diags mask for selected modules */% l% j! ?7 @% c8 `8 T) N
xdc.useModule('xdc.runtime.Main');8 v; e! `0 i. W: U) |
Diags.setMaskMeta(, Q0 s: @2 r. e' \! n9 h9 C
"xdc.runtime.Main",
0 `0 U* l( A: J. p. i/ d Diags.ENTRY | Diags.EXIT | Diags.INFO,
' z5 k% y8 w! C Diags.RUNTIME_ON% K; E0 K m: \) U: p% h6 d
);
, [5 r7 ^" u3 t0 _( z
3 z5 @, M- y7 a0 y& j6 ]" L7 X% K7 ^var Registry = xdc.useModule('xdc.runtime.Registry');) K: ^$ i7 q2 ]1 ]
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
5 k, V) {% n' L5 ?, |Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;* Q! J8 g/ H* F- v& D0 c
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
; r& N: \* ~# e. K7 S6 mRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;# E4 T8 T3 {0 Z( ?& y% X8 y
& v4 ^- Q: f. E+ ^/* create a logger instance */
+ [: _4 ]* O7 O4 t* u2 nvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');2 x* F7 W2 ^2 a% w
var loggerBufP = new LoggerBuf.Params();- Q9 w8 }% r, k! s9 ]0 E, a
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
7 X8 U$ o& Z: tloggerBufP.bufType = LoggerBuf.BufType_FIXED;/ ~4 u0 ~9 a/ R$ }
, S+ z1 r1 N; k' N2 R3 lvar appLogger = LoggerBuf.create(loggerBufP);$ s; r$ k9 Z8 G% B: Y
appLogger.instance.name = "AppLog_Core1";
( w7 V5 h1 c% t# S. oDefaults.common$.logger = appLogger; J% e' ? h* A3 i' L, u* C
Memory.defaultHeapSize = 0x8192;
. H8 g0 J# J# W0 [7 |- w; XIdle.idleFxns[0] = "&LEDStatus";
9 r% o2 L# u2 ~0 Z8 }Cache.initSize.l2Size = Cache.L2Size_32K;
- Z* R. u3 j6 w8 y( J2 @+ P/ S* U# n" m% i2 c$ j
|
|