|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
! v& m6 @" s L) t, i, P0 Y我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
3 J! o: F( e. |" H(不过疑惑的是,为何单独DSP仿真就没有问题呢?). U( t9 }4 E; H, p3 P7 ?0 v
3 z2 F- G6 \- q3 a是不是需要在DSP.CFG中进行配置
- n- Z1 f4 O; n6 _( T/ ^我现在的配置为
4 X# |, ^% a" z" G) b+ A. U
: }- ^3 f9 y* t) c/*
3 h) \0 f3 {: _& U7 g * ======== Operating System Configuration ========
7 c. {6 [1 Y* V& z% `) r */* j9 v8 G0 F) w$ }0 j) Y( ?7 r
8 J- e" K$ }; n$ H% w% n& O/* no rts heap */% |( d2 t6 p5 Q5 \9 ?* s* \' i
Program.heap = 0;
" }+ U9 d/ e- F4 ^& k& U; aProgram.argSize = 100; /* minimum size */" j0 o9 ]$ ^+ h, Z
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大6 l. p4 f* T0 ^3 t* n
, A. N( H' ]$ i3 R: `/* create a default heap */
, p& w" p) j( ?5 S! i! O9 pvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
% v. @6 D6 q9 O& C/ I4 W; ivar heapMemParams = new HeapMem.Params();
9 d9 `; ~! ?1 l; IheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大8 g1 p' o S' \, x7 ~* f6 I
7 O! F2 n9 B9 M2 D, F
var Memory = xdc.useModule('xdc.runtime.Memory');- Z% Z8 n& B2 z& E( l) ] B
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);( ~- M0 L) l) Q A
6 o: V* ]3 s: `* h! E/* configure System module *// ?5 E7 E3 {" t# P- u
var SysMin = xdc.useModule('xdc.runtime.SysMin');
9 Q# n) y7 E1 }7 x2 xSysMin.bufSize = 0x1000;
! i# D9 b8 v h% k; M t6 sSysMin.flushAtExit = false;
- C" N$ Q8 ?; P2 S
! W+ u2 y9 n1 A$ l& k6 @5 k2 h- tvar System = xdc.useModule('xdc.runtime.System');
]% G; e! `; w' _* R$ s% gSystem.SupportProxy = SysMin;
" j0 U/ f N8 D. U/ M0 @; A- }3 t' m/ g" I: P' n2 d
/* configure SysBios to use the lower half of Timer 1 */% g$ x- l( f* u# s5 j4 ~
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
0 V# a' |' d% R1 {1 h# d' B! D: j; Cvar Clock = xdc.useModule('ti.sysbios.knl.Clock');* Q3 C2 V6 z3 \ \ a% B
Timer.timerSettings[1].master = true;& G, m9 X3 b( B3 X. C8 t3 t b1 O
Timer.defaultHalf = Timer.Half_LOWER;- r0 {2 {6 }- A! V% w B- l! ^
Clock.timerId = 1;
9 N N: x/ P* J2 Q0 G
6 O3 w8 f$ b( n% M
2 a/ L! u9 t' c2 m/*
6 ~9 o* r* `2 ?6 N * ======== Miscellaneous Configuration ========/ o/ \9 A; m( `! l
*/7 r* {- i. N* I1 x2 B, M2 e
' q; r# h Y: U9 X
/* set default diags mask */
9 H" _8 e' Z' b, ^( uvar Diags = xdc.useModule('xdc.runtime.Diags');/ _5 S, _- {, X+ C% f d+ s
var Defaults = xdc.useModule('xdc.runtime.Defaults');/ R" A" G0 B h/ m5 m! ?7 y
+ {5 J" O# w9 t5 R9 p, v/ x; FDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
) ~" t( z0 M7 LDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;: T5 w8 h7 ~( s
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
/ X( L! N! S5 ?& B( ^Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */- @5 Z/ W* |/ l/ W$ E2 A: I8 x
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */0 w0 b; a0 J M" S- u' u* z
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;* Z5 k( Z" i5 B* q1 Z) Q# g
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
9 I8 _; o1 @: \0 X, }4 yDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
, f: m0 I( r( s0 a' Q# YDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
. ]8 U' l5 V3 F; tDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
; U0 T* M3 a( K S' i4 N& y6 TDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;" h$ z* @$ L) c- t2 d/ N" n
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
}# q1 ~7 n. ?- ^& P) LDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
0 H. j2 k5 _1 F' Q/ {8 cDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
5 }7 t; S1 {6 T0 K' L* d' Q3 h% v2 J4 r& c" {
/* override diags mask for selected modules */
: l; r* y/ W) y6 nxdc.useModule('xdc.runtime.Main');
1 V4 z- A; u! R! r* a! XDiags.setMaskMeta(
5 _: M4 ]! r# c( P2 {& P* S "xdc.runtime.Main",
8 h+ k- s$ p. q5 k Diags.ENTRY | Diags.EXIT | Diags.INFO,4 n2 \3 k; x3 P3 G" ^6 ?$ O
Diags.RUNTIME_ON
( R+ Z+ J* L/ _+ a. b);
. Y" W5 P8 Q5 E* E2 d
6 m6 D4 `) u; |var Registry = xdc.useModule('xdc.runtime.Registry');
1 `- ]# T( Z S; P5 `Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;& Y, N! S% C5 j
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
0 a, m: P; ?! _Registry.common$.diags_INFO = Diags.RUNTIME_OFF;- [9 h2 e( j; q4 U8 E
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
N0 y& Y( ~: Z! J# `
- E% c6 i" f4 C/ Q# @/* create a logger instance */
) ~: B% c% |9 S: s. t, Fvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
' B: w0 d- l6 Y/ m( S4 Xvar loggerBufP = new LoggerBuf.Params(); _! K2 O+ ]$ e: o
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
9 Q+ F2 U, ?) V+ X% v9 RloggerBufP.bufType = LoggerBuf.BufType_FIXED;
% g% j D+ a% i- X: ]; D. ~7 c' U8 N/ x5 G3 K% m) e
var appLogger = LoggerBuf.create(loggerBufP);
9 k2 }( [) z+ D2 iappLogger.instance.name = "AppLog_Core1";
* V0 [8 B! `2 Z |6 T3 V% i# ]Defaults.common$.logger = appLogger;# b% K3 O& \- r3 X( c8 W
Memory.defaultHeapSize = 0x8192;
6 z9 a6 { h U/ V# k4 tIdle.idleFxns[0] = "&LEDStatus";
! @4 k3 M% |9 M# d4 I' ~4 DCache.initSize.l2Size = Cache.L2Size_32K;
/ J! N# M% Q& J: H7 l
- w7 k1 V5 ^# [6 H$ T9 G" C+ Q |
|