|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明/ b/ W9 {! I K/ Y8 S( u
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
! |# A7 p% @3 y(不过疑惑的是,为何单独DSP仿真就没有问题呢?)0 p# [0 x& N( {/ G9 E1 M& r' X1 |# l
' G) P6 J7 `8 h2 ~% Y
是不是需要在DSP.CFG中进行配置
0 J5 x6 B6 K% H, c+ Y9 M) W0 G我现在的配置为2 q) f4 I4 x Z' W9 k
7 V3 i8 L$ m X) @" Q1 h/*6 j) {+ i# ]* s
* ======== Operating System Configuration ========$ p8 A! ~; L! \6 |
*/
6 c, n. @/ j8 C, o
) l5 e; T! k( E A! t) P/* no rts heap */- X o" J8 Y2 y2 p/ r1 p
Program.heap = 0;6 a0 ~" i% O* h$ `0 X A
Program.argSize = 100; /* minimum size */
! ]' B2 O6 b( m1 E+ wProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大+ ]& F" ^* w) T1 T5 U) i
, b; |5 Y' S! I Y9 F/* create a default heap */9 n5 B* J$ w- N9 o9 q
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
. w3 E# @0 k+ j" Z+ g+ @1 T \var heapMemParams = new HeapMem.Params();
' L3 [* D# Z) w; Q- \& A+ ?9 zheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
|3 m4 e- E! P6 i2 m: { O" j0 q! X
var Memory = xdc.useModule('xdc.runtime.Memory');
! N6 r: e' P6 z! m0 lMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
* ~' L: q7 f) ~: j$ g1 v9 z+ d& u9 L7 |! X6 W \% g2 Y6 V2 w
/* configure System module */4 |" [1 T/ A. b3 K
var SysMin = xdc.useModule('xdc.runtime.SysMin');" C9 K* j6 @ b( Q/ J
SysMin.bufSize = 0x1000;
+ E+ F, g2 n% P$ WSysMin.flushAtExit = false;
& l6 [9 I- A% g8 g( ], T) p5 c
* V" Y! Y& T. e/ Q) ~/ `var System = xdc.useModule('xdc.runtime.System');% Q$ c% |- [' e) @* S
System.SupportProxy = SysMin; X z* C" a+ Z% @/ R1 J
# c4 W( D7 f) D3 b/* configure SysBios to use the lower half of Timer 1 */% D7 l }" ~3 n, p
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
6 }/ d, T: Q6 O, Dvar Clock = xdc.useModule('ti.sysbios.knl.Clock');' n2 b: j b( N& U$ P7 N) B
Timer.timerSettings[1].master = true;
, u7 d. D( Y' f6 }9 w7 QTimer.defaultHalf = Timer.Half_LOWER;
" Y; ^: r$ O+ @' U# mClock.timerId = 1;: t& r1 E* V/ P! ~. o7 b/ J4 w# K
# A) c, }% t& S( `4 R5 i
) `* [5 w* f7 G/*
, X7 R ]3 H; n * ======== Miscellaneous Configuration ========1 D& s T1 j$ X* L# \, K& X" F
*/( u# E% E# G7 s' H( v2 S* M
$ x7 \! }$ L1 p, H3 Q, M5 L
/* set default diags mask */7 w( k/ y0 V: H f) l$ F! F* K
var Diags = xdc.useModule('xdc.runtime.Diags');- L% Q O) k0 h- G+ m" h% |
var Defaults = xdc.useModule('xdc.runtime.Defaults');
3 B4 u9 k) V1 Q3 G1 {$ C% p. t6 p5 d, G/ _' c u8 ]7 i% M
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;6 l/ G2 G$ N f, c% }9 H$ J7 O
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
) c6 u, D/ b, Q8 \* c# u; ?Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
6 c% D0 I4 s# w+ [Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
% `5 f9 u! ~6 y5 w; z2 eDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */8 \) {! T' W, U' j4 Y. X
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
' z7 F4 Z" C9 a- c! D+ w7 ODefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
, p; U5 ~2 A* b, A$ s. }Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
' M2 f" W% R- O% i, w8 S! _! MDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
- X; b, `* a9 Z" _, uDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;( P. \# H) ~% ]3 f1 y. }
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;& f- C% }' v& i; y( S
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
+ {# R$ \+ h! |( Q- D' ^+ Q+ _ `Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;0 h( x( W. s: I
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
! b7 k- e& |& ]9 b9 I
$ ]% {# r4 S+ h0 A& @2 ^* D/* override diags mask for selected modules */
: M: n3 W9 h! Z7 J# D7 H4 Vxdc.useModule('xdc.runtime.Main');; H. C6 [) P( i" O& g
Diags.setMaskMeta(' y W. \. {* }) k$ C/ @* b
"xdc.runtime.Main",$ l/ v( Y# m2 l& y
Diags.ENTRY | Diags.EXIT | Diags.INFO,
6 H2 c; w; t( `* J Diags.RUNTIME_ON# _! H* e) }. Q* H: X+ L
);
, s. n B1 z& l" Y* e. V# j, ~7 n7 z4 G: y2 X8 X* f: e
var Registry = xdc.useModule('xdc.runtime.Registry');
T8 Q7 d1 P% y7 bRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
; L* R5 x5 X$ e9 b; \Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
" Z; N4 U; J7 h; h! }4 GRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;6 m. s, M' e7 ?* X, T. N/ u0 \
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
( }/ _' H6 Q4 i4 |
0 Q6 R! P* Y1 P7 m! F/* create a logger instance */
8 G6 p% j9 ?5 W3 `* b8 w" X! I. jvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
' n$ _+ v/ l! t5 O) J( e( F/ M$ [var loggerBufP = new LoggerBuf.Params();
) @, e9 h. A8 B0 e7 VloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */0 H+ v9 M- w) a4 V2 {- P( w
loggerBufP.bufType = LoggerBuf.BufType_FIXED;- z6 K1 B/ ?& ?/ W; u( y
( J4 n% N6 r; u8 y' \var appLogger = LoggerBuf.create(loggerBufP);' S' t8 \- e$ D a0 _9 w; D2 y1 P }
appLogger.instance.name = "AppLog_Core1";
. H. Q3 u- {) X, ODefaults.common$.logger = appLogger;6 w9 k# r% ?. `! ]5 B
Memory.defaultHeapSize = 0x8192; " p" t$ [: v9 ]0 P1 @
Idle.idleFxns[0] = "&LEDStatus";' f$ f z0 W# H' F( O" L
Cache.initSize.l2Size = Cache.L2Size_32K;: P, c# v- Z/ y9 F7 N: ~
$ ]) ]* `6 a8 T7 n+ I4 C
|
|