|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明 ~9 G* o0 r/ d/ I" `
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
/ L ~3 v/ a) Y% [1 b, C" v(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
+ \- g ]- B4 F/ F$ m) Q: F3 i! `* @0 t! k
是不是需要在DSP.CFG中进行配置
7 M( W6 ?3 S; o6 Q5 C我现在的配置为
. N$ Q% m5 ^7 S- c9 P7 h; h j6 y8 f8 e4 Q4 [$ J; |
/*) M: u- z3 @- _( [/ [. M) b D5 f
* ======== Operating System Configuration ========* F% \) x7 ^2 S+ U! B
*/
% {" |: h; S4 o4 p; [# V: r
: B2 H* f7 J' E2 A( u/* no rts heap */
' [" W3 p" k- ~ fProgram.heap = 0;
$ Q/ P1 B/ H6 q2 s& IProgram.argSize = 100; /* minimum size */7 q* C2 Y' y' [" Z8 |" Z
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大8 ^/ r3 ]7 o/ h8 [' ^& u
3 Y. [: _0 `8 Y
/* create a default heap */3 v) ^3 r# e+ L1 o8 D
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
4 J! T5 W* L uvar heapMemParams = new HeapMem.Params();
# c \( c- D( f, h+ ^heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
. `0 H% g7 r* u5 C8 `8 J; k+ x
7 E+ H5 Y7 s7 _4 F" D2 I4 G" q, Wvar Memory = xdc.useModule('xdc.runtime.Memory');
+ x0 ^4 c. |2 ?; gMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
; v _4 _' A% p5 Z' _. u1 V: k/ N- j
, ~4 P5 L1 s) `7 \/* configure System module */8 s7 O- w$ g" f0 N. h$ T2 {
var SysMin = xdc.useModule('xdc.runtime.SysMin');
# |, a/ M1 o1 Y) n* Q" f) CSysMin.bufSize = 0x1000;7 C( w% w+ {+ p6 |; U+ r2 t+ J; p
SysMin.flushAtExit = false;
& i0 {- z3 q1 r2 H, G; ]+ z" ]# z9 Q) H0 ~
var System = xdc.useModule('xdc.runtime.System');
: O0 x! D* r+ J2 JSystem.SupportProxy = SysMin;
. ?6 F% d) ]8 o$ S. |3 h1 L0 P8 d* L0 a; Z( ~" r! M
/* configure SysBios to use the lower half of Timer 1 */3 b0 v# f7 F& f! a! |# a% m
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
7 H) H" [- K* j" [* Z7 |. lvar Clock = xdc.useModule('ti.sysbios.knl.Clock');2 J6 G# m' r1 u7 Y; O9 u
Timer.timerSettings[1].master = true;$ o' d6 J4 O0 H" u: b
Timer.defaultHalf = Timer.Half_LOWER;) ^; \ }. W) P7 |$ C; E, Q3 ?4 m
Clock.timerId = 1;( J. y" F0 V% _7 h1 P
7 \+ N4 ?& g9 x6 V) Y
/ G, n' l' S! k" B: v4 Z8 s/*2 W# w2 L- P; v8 g! e7 q5 O3 `
* ======== Miscellaneous Configuration ========+ a1 E7 m( J; g! i: W; X
*/
1 D. m3 [% e+ w. y ^) g( m* n9 r+ i3 n( w/ U% P2 E- `' i
/* set default diags mask */
5 n0 g* t6 ?, a' K1 ~0 p* Y& ~var Diags = xdc.useModule('xdc.runtime.Diags');4 R9 q( d- |( [7 r
var Defaults = xdc.useModule('xdc.runtime.Defaults');; z8 U: r/ F8 C" g$ ?
, H% }8 f( C" J! `+ O# P( L0 u
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
/ e A5 J' T! h! B& }% @Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
! ]/ L b) Z3 V% hDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;2 l `: k6 s6 b$ v9 g6 B1 Q* u- y
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */; u$ f& t( T$ G6 y
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
6 _4 v3 y/ C w4 QDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
0 s( l% K8 M# s0 ~, h3 PDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
$ W- f' O2 A t$ w k2 N5 N& VDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
6 H0 M Z" s" m; ?3 {! n( pDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
# @5 S6 l7 w5 D2 M7 RDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;( b9 g1 i4 ^/ \% R1 _/ {6 v2 q
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
* o1 ?1 s, z' a) i3 rDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;+ H* _9 w7 l, P8 r$ p% ^2 V$ C
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;7 U I& z$ m6 G w& \* Q. Y
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;. |/ I+ L% t; \9 T+ Y# }, n3 u
, H8 E: r% E9 \ ?/* override diags mask for selected modules */
5 I" d& p w4 r* e9 Xxdc.useModule('xdc.runtime.Main');% O4 s7 } U' N: D+ A E
Diags.setMaskMeta(: }+ q" x. A! D) ~
"xdc.runtime.Main",( z9 u4 w: n( i2 _
Diags.ENTRY | Diags.EXIT | Diags.INFO,- s9 Y" ]' ~. V" u9 T& z& [
Diags.RUNTIME_ON( d1 U1 T( v7 c9 ?, Y
);* K2 z# g& A* l" L% r# Z( r/ l; K
' g ]" @, p1 cvar Registry = xdc.useModule('xdc.runtime.Registry');
$ B/ w, c2 P: e6 Z& dRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
, j+ b# B' j' G T0 B% `Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;8 T& o- z2 t+ J- \: K- o
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
7 S8 f7 Z% c, t3 R/ g4 GRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;: X2 p3 H: }8 P! K9 Z+ z
' ?4 n) U( e6 Q, {! C
/* create a logger instance */' W g0 s# \$ d- Z3 ~* m
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
" t, c' [9 C0 s) ~' }' Pvar loggerBufP = new LoggerBuf.Params();
! M6 L3 U9 N% \* w+ p+ G0 `loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
% Q$ K2 a, J! a3 ZloggerBufP.bufType = LoggerBuf.BufType_FIXED;
" [4 N9 t! v# a* Z1 A
* G# @& c: ?0 fvar appLogger = LoggerBuf.create(loggerBufP);
, T, g4 w; A* s- j/ O% g9 gappLogger.instance.name = "AppLog_Core1";" G8 a$ Y( }+ f5 V6 V% E
Defaults.common$.logger = appLogger;* [9 R4 R4 B# ~! L' K/ \
Memory.defaultHeapSize = 0x8192; . }4 p( S, k$ K) D% @- w2 S' u
Idle.idleFxns[0] = "&LEDStatus";: q" J$ o+ R& b6 Q
Cache.initSize.l2Size = Cache.L2Size_32K;
9 `1 q+ p# f, a( F: _; N& s/ p. z1 c1 z6 |) L
|
|