|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
& r. w4 d) }* R. F y$ e我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下: _4 ]; O* e) k& k% ^& d$ v9 p
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
1 q6 d0 `3 e3 L! N8 p. m3 ]/ |1 u! y, U5 z! h5 F
是不是需要在DSP.CFG中进行配置- T8 p9 \7 f& a) w! y4 w" C+ `
我现在的配置为
! T2 g% P4 f9 q6 S3 W: @9 Y
5 [& M/ z9 x0 t s& O/*7 ?( u, D- P" j( ` T
* ======== Operating System Configuration ========
" s2 c, b: g1 {/ N */
9 J4 t* L& y/ P- g. v% _5 _$ s' R- M1 e+ Z, F$ ?# G @
/* no rts heap */: l$ ?/ u2 U6 l( r
Program.heap = 0;
" U$ y, X6 c4 ^Program.argSize = 100; /* minimum size */
- i3 L% H$ a( B/ Y* L% RProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大, `) O$ W& Y$ _0 t: R2 c! o
5 v; Y- @$ ~- Y, u
/* create a default heap */- b/ x! ^0 ~& R2 v6 O
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
2 Y, f% q. P* Q8 g: ovar heapMemParams = new HeapMem.Params();- M& |2 f; r+ ~$ \6 m
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大8 k) J. V) I, p) P0 I& [( o
6 ]8 B- m y# Y" B) ?
var Memory = xdc.useModule('xdc.runtime.Memory');+ ]+ S) F* N" _. W$ [8 ~
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
* F( s# Q+ @: c% M/ d) o9 c, ]
- i1 W7 T9 V8 g d7 x$ i/* configure System module */
9 ~2 ^, P7 w1 Uvar SysMin = xdc.useModule('xdc.runtime.SysMin');
( t- M' i r" w. SSysMin.bufSize = 0x1000;6 a7 \9 ?1 K1 c& L7 [# I/ G1 W
SysMin.flushAtExit = false;
7 V S; b$ ]# Y
$ F1 T2 J8 s% evar System = xdc.useModule('xdc.runtime.System');
( `& ` n% d5 j8 q! m9 k" F# {, KSystem.SupportProxy = SysMin;
% Q/ Q4 w& ^! ]; h: X
( d" K" o5 E5 \# S6 L$ L/* configure SysBios to use the lower half of Timer 1 */7 G* o! h1 F9 A% K( m, R3 O0 a
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');" l! `. v# }# I
var Clock = xdc.useModule('ti.sysbios.knl.Clock');0 w( c( W* P# w2 [0 [
Timer.timerSettings[1].master = true;, S' U) R, }" N2 @* h
Timer.defaultHalf = Timer.Half_LOWER;/ @: @% M6 k# Q, x- t( d p; d+ s: Z
Clock.timerId = 1; l( S/ l7 Q! a9 ], z
- W6 y. N8 N; ?& Y3 X: f* r, ]
% O$ e6 ~ M' k# K9 D! h) }+ z/*5 ^/ s3 a, \' b* V6 E8 k
* ======== Miscellaneous Configuration ========$ f" Z x! \. _6 f
*/) Y) ^; b4 T' x2 ]9 ]
& o b* ]* s2 M; I0 d/ r4 `8 G0 m
/* set default diags mask */9 c7 C# Q; n) _
var Diags = xdc.useModule('xdc.runtime.Diags');" s. r5 Q4 S% F% O
var Defaults = xdc.useModule('xdc.runtime.Defaults');1 B1 T% T( {+ q2 m6 K
1 h3 O- ~& e' V+ q/ h" K! z+ N
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;+ b2 g, C5 A6 C/ |8 Q
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
5 C2 s2 S5 @5 I }7 @: mDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
5 c; F6 S" h. y: \! f" s! ]! r9 xDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */! d4 [" o$ _1 y
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */8 y5 n/ ]0 n, _+ ~+ e) [
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;1 I$ {+ f! P' }
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
$ N+ Z* {4 e, z: hDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;. z4 I9 ?# C6 ?+ @* W3 |
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
8 _( o: a& b- H0 p* ]Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;2 b' U" `0 N: l' O3 g3 G
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;$ W9 k' ^7 Z& r7 T
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;1 R& l1 ]! n; C. W( `
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
( d2 t X" Y5 O4 W L" w: ]0 o) XDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
) ~8 l0 S1 K% K- S1 Z+ ^" f' X% s
0 L( H* n. s5 F+ W/* override diags mask for selected modules */
. J2 q; G. {5 N- v, p* y, e# s( ?xdc.useModule('xdc.runtime.Main');# C. K+ C9 N: j
Diags.setMaskMeta(% m! J% i# L0 A
"xdc.runtime.Main",4 x' N" X# o" x7 v `, [
Diags.ENTRY | Diags.EXIT | Diags.INFO,
. I, B6 ?" r ~5 ~: |. ] Diags.RUNTIME_ON
3 y" b W& w! Z);7 Q& F2 s. Z+ Q
* a! V; X: L% m3 l+ P9 i) O; G s# ^
var Registry = xdc.useModule('xdc.runtime.Registry');
( D' W" W0 u: ]8 v$ l0 ?1 P4 LRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;; @3 G% P" z3 u: E8 }3 Y6 x8 o ^
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;2 g* L, L$ E/ A: u* Y; c' ?
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;* d% h- |3 I+ ^/ L" G4 K
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;: U( H K6 N) H$ x# g5 Z
, k3 A$ a, q# R- W% u, _
/* create a logger instance */1 G* W2 {7 @, o( C% N0 @
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
6 C' [% `4 X5 X9 Svar loggerBufP = new LoggerBuf.Params();
- c4 G' Z5 |/ }$ A2 x: SloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
4 O# W: Y0 s0 F/ E' X1 hloggerBufP.bufType = LoggerBuf.BufType_FIXED;% v2 }, Z3 X( t1 X C; u
4 ]$ S9 O3 _- i K" cvar appLogger = LoggerBuf.create(loggerBufP);
, p( O" T# |" g( y. W' g. J' {! }appLogger.instance.name = "AppLog_Core1";2 [% X, u" ]. c) i8 L, T3 x9 m
Defaults.common$.logger = appLogger;
0 n( S( j, H. Q8 ?+ BMemory.defaultHeapSize = 0x8192;
! `" Q4 z. y; M3 r) a2 W% QIdle.idleFxns[0] = "&LEDStatus";; I8 W8 ~$ g- A) k, R
Cache.initSize.l2Size = Cache.L2Size_32K;
3 K" S5 |* v8 P3 L1 L$ O! [% V
7 c4 P7 { f, {4 [$ Y8 P2 k |
|