|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
$ w O$ n# _. x$ d) l$ \: v i* `我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
Y# l4 a) R) `(不过疑惑的是,为何单独DSP仿真就没有问题呢?)6 t4 S6 j3 G+ ?/ L
! H9 m2 S4 Z9 s是不是需要在DSP.CFG中进行配置; Y! O" B/ N8 E0 N( p
我现在的配置为
0 Q/ c; `$ ~- B1 X0 A% K9 y
7 [, V3 R" j# S3 T, ~/ H0 j/*
+ F2 J5 G# {( v3 P9 E' h. n1 x' I * ======== Operating System Configuration ========
0 o" v" J; N4 l */
- K4 R2 J, V7 F# n
$ U% Q: N a+ \/ }6 c- M* P/* no rts heap */
4 w8 c( \5 N0 |3 M/ x8 a/ k" H( vProgram.heap = 0;# R/ B6 n. M! s5 B: k5 q3 C
Program.argSize = 100; /* minimum size */1 y8 Z0 g' u4 a$ n, y
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
1 q/ S0 p+ l+ S' j0 d. {3 z0 Y
) ~3 V2 b* O) Q) v& q/* create a default heap */
+ ~0 A/ S* t7 e: A) evar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
/ d- e0 [- ?* @, b5 P, Qvar heapMemParams = new HeapMem.Params();4 k8 C7 R- X; ^9 q
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大+ B/ f- D. L0 b/ @% {' u& I" d$ A
3 x4 j- L; T- ~8 Z' n* v
var Memory = xdc.useModule('xdc.runtime.Memory');* G( w; D2 T! D7 m S% i; F
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);, ^/ W; h5 C0 T p7 ~: H
$ |/ k* }( F, A3 ?/* configure System module */
* w4 u" s r; _var SysMin = xdc.useModule('xdc.runtime.SysMin');
3 C1 E% U8 g$ o. G& P: o9 ZSysMin.bufSize = 0x1000;
# @# |) u* i, g1 _" l1 q" d" MSysMin.flushAtExit = false;
& h1 |/ @* K* n% i: X
+ H& l& R, }0 W _3 Bvar System = xdc.useModule('xdc.runtime.System');7 p& n6 G5 ~" F3 u, @3 [2 G
System.SupportProxy = SysMin;
3 x; n; D# X) s4 D( i$ f$ e B
. i/ f. \! X" [! A/* configure SysBios to use the lower half of Timer 1 */
! ~1 S" @! x& q1 fvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
: [2 _4 w$ K; Q# [3 pvar Clock = xdc.useModule('ti.sysbios.knl.Clock');
4 _+ C$ i/ }! }- O& m+ D% PTimer.timerSettings[1].master = true;* c* {' h; @$ f X% h0 J
Timer.defaultHalf = Timer.Half_LOWER;5 X3 K1 V# a; {. A7 W
Clock.timerId = 1;3 r" k6 \- j& Q. ?& x
5 g/ g$ ^* e& M
) ?) `8 c4 ~' X9 e/*
$ B/ p% \) j; B& W [" |3 e) P' ^ * ======== Miscellaneous Configuration ========5 I$ X8 f; i- [( a1 N( _
*/& i m! i6 W$ g6 Q0 U, n j
" c+ D2 n7 h, [; s* \
/* set default diags mask */6 y# r4 D6 @1 ]0 [5 D3 G( T; l
var Diags = xdc.useModule('xdc.runtime.Diags');& u7 n6 z! T' c' J* a# o1 o. X& h
var Defaults = xdc.useModule('xdc.runtime.Defaults');
, D2 k' o4 b% a8 Z ^" \5 `0 v' v
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
, s* x3 Y* x# V! N% h( @Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
4 l! |1 k* V' ZDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;6 @/ c8 D+ l* \. m+ Q
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
# r6 w% l+ g5 v4 _Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */0 y( k; t: R3 ^2 K0 Z
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;2 n/ n: A+ r/ u! `- N
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
0 V9 s" H$ K: Q( X+ O2 Y% \Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
% b$ q7 t4 M4 j _9 MDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;6 ?, U4 K# W9 Y
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;% b2 I, a- R# e$ W" F' z3 p1 J: M
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;& _4 T/ P9 K; d$ G, s
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
3 v/ J9 H+ D9 B+ d3 N0 C1 ~9 U/ jDefaults.common$.diags_INFO = Diags.ALWAYS_OFF; }; b7 ?. o H5 t7 S! T/ K
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;! t: e |! K- w1 u3 P
a& m; T6 s/ `: f3 O' h/* override diags mask for selected modules */; |- H- r5 w7 W* t
xdc.useModule('xdc.runtime.Main');
* j$ N2 s, d1 n ~3 aDiags.setMaskMeta(
8 V6 L4 {6 g7 L! O D9 }* R: F "xdc.runtime.Main",
" y- w! c. Y7 P+ i O& t+ L; t0 b Diags.ENTRY | Diags.EXIT | Diags.INFO,/ _1 w: k+ t" ~4 q" u
Diags.RUNTIME_ON
g8 Z: i: o; R0 q- y o1 }7 H% x);8 y2 u5 }5 T, |/ K0 q' ]& ^
- w2 L0 h( ?9 Z& e- Fvar Registry = xdc.useModule('xdc.runtime.Registry');3 \, [& \! L9 u3 F, u/ \* I2 B
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
+ u6 y9 G$ h( U+ x- w. O2 iRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;% N8 i! ?7 W& A a! [
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;; u7 P1 a$ d2 D& s$ L) B
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;: Z+ v- {0 w: Z ]- T! y: C
6 x5 q$ T% |6 k2 w
/* create a logger instance */* E1 P. z+ ]! o( s+ e8 \' _- \
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');5 u* y1 j6 E* [3 }
var loggerBufP = new LoggerBuf.Params();" V0 i$ J; v% n% j
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */9 x7 @$ }2 B4 U2 |2 A
loggerBufP.bufType = LoggerBuf.BufType_FIXED;/ v& T2 l0 x$ x
5 R4 y3 O( S7 Y9 F+ M. {var appLogger = LoggerBuf.create(loggerBufP);
6 B+ B4 S& |% R: Q7 mappLogger.instance.name = "AppLog_Core1";: Y n. q, ?7 v5 o
Defaults.common$.logger = appLogger;
( q! R! H1 R* K/ G* j4 rMemory.defaultHeapSize = 0x8192; ) d" m) v8 K1 n9 x. c
Idle.idleFxns[0] = "&LEDStatus"; z! O8 Y9 l% A0 x
Cache.initSize.l2Size = Cache.L2Size_32K;
" u1 J v5 C0 J0 t5 a1 {
- S7 O( ~# \' e9 b- u |
|