|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
& a* O Z: ^9 J! T, v7 I# y我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
) O8 g9 ^2 F% c; w& r C* o+ K(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
7 u& g- h" H3 z$ C" T5 G, K* u2 Z; H$ w7 g( ]: b i" v. Y& f, ]
是不是需要在DSP.CFG中进行配置
) k* @* F5 h3 f( R! p我现在的配置为+ h3 F0 A: \# A' ]& I9 y, W; L% F. B
7 e, r8 l# q- G9 C" W% N/*
' l4 B) ?6 }9 z; l% P% s * ======== Operating System Configuration ========" f, R$ `) s d- f! D5 s
*/- Y S8 p. {$ d5 ~, ^
' U& U- d2 O {1 L) t9 W% c1 h; d
/* no rts heap */
7 t: g& E- |! ]0 E4 I9 P QProgram.heap = 0;% Z; @ ^& q8 X
Program.argSize = 100; /* minimum size */1 ~* k& {2 I+ o8 O0 d
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大7 ^. R8 x! u' l
/ @. C! W m: W7 M0 N4 r" T% S
/* create a default heap */
8 S" J( ~( m, i7 K9 ^var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
% }. }( x+ }# y9 t& X9 V( Pvar heapMemParams = new HeapMem.Params();
' | C/ [4 J h2 ~: fheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
6 x: T$ z7 e5 b- r8 l3 b
3 c& M1 y8 s; `- D* i: w2 @8 \var Memory = xdc.useModule('xdc.runtime.Memory');) g: P$ `6 T: g- S# r8 w) d) e
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
/ p9 _- E9 P0 B, q% `! ?7 u9 _" K# ~0 B9 e) V0 M; g
/* configure System module */
1 {) `2 N# X9 F. v: ivar SysMin = xdc.useModule('xdc.runtime.SysMin');
5 e" {. S. x$ ], ?SysMin.bufSize = 0x1000;
% \0 s- W) N7 V8 [: G/ m0 GSysMin.flushAtExit = false;4 `! ~" R' q0 Z/ J
1 H: _3 i0 O) u% l0 J! Fvar System = xdc.useModule('xdc.runtime.System');
+ E3 m6 q* D' `/ \( K5 p) D+ @) LSystem.SupportProxy = SysMin;! f- b- h& j. N+ |3 E6 f9 T
' @- b7 x g7 \: i( Q' y/* configure SysBios to use the lower half of Timer 1 */$ r$ ] g+ `) c+ b
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');, a; @# f7 {) r/ I$ W+ f4 s
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
. ^2 y% N3 f* c1 P6 [Timer.timerSettings[1].master = true;: U; c" u/ g/ _) Y# U$ x
Timer.defaultHalf = Timer.Half_LOWER;! K! @: u) v" m- L, \! U
Clock.timerId = 1;9 ^+ \+ G. T3 A( }. `. q
' ?: l# V2 r1 g K N! `/ _
* M( i4 L6 e/ P! w
/*
6 d. E, k$ G+ Y4 W; R0 e/ V * ======== Miscellaneous Configuration ========
" |/ ?, ]4 [, \! [) b/ b; g1 M) V */
( V( \; O1 B- d6 S$ z2 H( r7 p
/* set default diags mask */
8 N( W' E( r& N; E7 B( C9 l1 zvar Diags = xdc.useModule('xdc.runtime.Diags');
$ Q0 X$ `5 J1 G# ?5 ivar Defaults = xdc.useModule('xdc.runtime.Defaults');$ E7 B6 [. U5 d+ k) T6 ~, u" c% h& ]
9 D* ~$ u5 ^+ [. B. HDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;; y9 s/ w9 C4 d3 Q" O& W
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
& @0 |4 E2 P1 I1 T* q' Q1 O7 h3 XDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
' d v7 D0 @3 U5 B) w/ F0 a% SDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */' K4 J; K1 g- ~: L$ M$ H
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */; h4 n T9 Z3 L& t- V
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;# W6 N0 W/ h- [% C. P6 E3 f
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;2 K! t/ X2 j, h$ }1 ^( |5 M
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;. t9 } e& p# ~8 j
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
F7 k7 u; l& m" RDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
" e" L" T0 y; E% t6 N# L( WDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;$ c+ u' N: B6 r% j$ M
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
( ^6 P1 w* ~1 TDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
4 P4 V& C/ U5 H% O3 \/ \. q: ]Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;. h+ Z8 S- H1 H9 P0 }8 r* P9 u* q
, C. R1 D! y8 q+ j& i/* override diags mask for selected modules */
5 [: b9 ~, O! p, d. j. g. v* uxdc.useModule('xdc.runtime.Main');
: b% o4 d# ]% ]Diags.setMaskMeta(3 I5 \- V* M7 t8 Q) x) e
"xdc.runtime.Main",
6 h) B/ r% r4 K4 G$ @ Diags.ENTRY | Diags.EXIT | Diags.INFO,/ f: ]" t7 m, C+ \ n5 [
Diags.RUNTIME_ON
: y0 y% l# F- P% z. z* e);
% k+ ]% G- r8 M; r3 I6 D& m8 M% j
var Registry = xdc.useModule('xdc.runtime.Registry');
0 \: E% l# `, H# \( ]8 FRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;" J' i$ p1 ? }7 ^+ r* \
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
! ]/ o6 Y) G% P1 i3 TRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
& d9 V$ M4 o% C- m W6 KRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;, n8 g& v3 O g ~0 x: Y6 A
8 i( p1 ]" Q; Z, y/* create a logger instance */
- k3 ^9 O/ t2 t/ [8 \+ T. K6 s6 P: Tvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
U x; C3 |4 dvar loggerBufP = new LoggerBuf.Params();3 S9 Y; E+ A' i- _. g( A
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */) ]- s, M r6 `, I+ K. ^% h& J
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
2 a, H# [( o! R
2 t. [0 ~3 W! p/ o, B9 x; W5 N+ K9 ^. Avar appLogger = LoggerBuf.create(loggerBufP);& k( l9 R Z [1 @7 P( c. J
appLogger.instance.name = "AppLog_Core1";
T7 {; z9 B7 ?# [+ aDefaults.common$.logger = appLogger;) f) _* `3 D3 B) [5 N" @
Memory.defaultHeapSize = 0x8192; 3 {/ ]. y( h; z, J" G5 l
Idle.idleFxns[0] = "&LEDStatus";
2 b" u5 O) B+ Q$ x! ~- ~Cache.initSize.l2Size = Cache.L2Size_32K;
: F. n6 F( X/ z3 M! \/ ?6 L2 A4 e7 M2 J1 ~4 W; c$ i; U4 ~
|
|