|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明- o4 m8 N; c8 j
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
9 V1 C2 D+ Y7 {1 Y7 @' X(不过疑惑的是,为何单独DSP仿真就没有问题呢?)& X; h" B7 s, A# C: S
% x! z/ M7 K) _4 o* V7 Q3 E是不是需要在DSP.CFG中进行配置5 L6 O) }/ O5 I/ P% F
我现在的配置为1 [2 o+ C- A: M6 D ?7 g
8 o+ {* Y( Q; b/ n+ ?2 n& T4 {/*
* I: ^0 T* h. S4 ~ * ======== Operating System Configuration ========8 x& N8 y7 A! }0 T! g8 T! D
*/+ B; j- a a4 [) [/ n: d
$ T: N0 j5 ~, b. N+ Q
/* no rts heap */, s. X( J9 I& Y# \
Program.heap = 0;8 O( _, B4 n) i2 b
Program.argSize = 100; /* minimum size */) r5 {- Y) Q. o# A6 ]: h' p, O1 H
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大; ~) x6 g* q! [& A
) T/ a: b5 Z$ I4 s# ^! L
/* create a default heap */
0 j, i# L% G( S* {0 d: k: Vvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
2 S; ^9 j7 s* D) z; Uvar heapMemParams = new HeapMem.Params();
9 t) E X7 L" I& {" @heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大0 z# U. {' h4 _ K. B3 \
F9 |# S0 r" D7 \# @% E* U
var Memory = xdc.useModule('xdc.runtime.Memory');, h6 w8 d6 ]4 N
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);: L; p" q! s: |5 u o
$ O# J8 l8 u$ }; t; g
/* configure System module */' E. O. x% {, M
var SysMin = xdc.useModule('xdc.runtime.SysMin');
' l5 [8 h! t* `' p4 H! PSysMin.bufSize = 0x1000;
3 f, T, M( I( e; a0 V$ zSysMin.flushAtExit = false;
, }& h/ }4 v( t# l) w/ ~1 A
# v& A7 w: m' D2 u5 t- [var System = xdc.useModule('xdc.runtime.System');! C3 b6 T3 _: P( M; R
System.SupportProxy = SysMin;
! t& v; o) z, r7 \! f7 _
* f! ~9 J$ T7 r- f/* configure SysBios to use the lower half of Timer 1 */
' Y/ ?& A2 v% E; _8 {5 n' rvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');: t; n7 E7 d. `4 T# e* V s9 ]0 I
var Clock = xdc.useModule('ti.sysbios.knl.Clock');' s$ y+ [, F; U) V
Timer.timerSettings[1].master = true;3 y7 a5 K# h" |) Z, @: O; Q+ t
Timer.defaultHalf = Timer.Half_LOWER;
6 \$ \* m4 }* bClock.timerId = 1;
) e$ F9 U2 a9 Z9 U# B& @( _% f. c/ p9 S
* D* B7 n8 t5 h$ b
/*
3 z, z& U7 J7 p* J0 N# j2 Q+ }. J" }% \% D * ======== Miscellaneous Configuration ========; l, C, D+ |8 n2 q1 C. p) V6 k
*/
D2 [. t1 ]) n" ?) i
4 b# z3 i7 t5 t) j, W6 o4 u/* set default diags mask */0 H1 F$ P* I* E* ]/ g. }
var Diags = xdc.useModule('xdc.runtime.Diags');. p/ [% _3 T" t( q" i u! G
var Defaults = xdc.useModule('xdc.runtime.Defaults');* m; x) L1 H4 g, S2 ?
. R" r1 d+ `4 T- G
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;8 ?" Y5 [! _. b2 K
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;6 b! S; o/ e' b% F
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;; [; L( [: v$ c: U. X
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
" _0 s' N! s# l: X( C0 \. Q- KDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */) q0 T/ d/ d/ i( o e$ n
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;9 N" |- @7 n x& K# \
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;4 o8 u |. O0 X% {( y' d- \
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
7 v, b" ~8 h7 `4 d) ?' }Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;% ^* P0 _0 Q0 [: `* Z9 G& z2 p4 W! o
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
% }2 l7 s$ v3 ]+ c+ P, y& UDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
* \/ t8 V5 h0 r0 CDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;. r. M) e1 f; a- g' S
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;) \$ l0 d- C9 X6 t% L0 A' {. ^
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;3 `7 T3 x, Q/ R7 X, c
$ O1 y( W5 I! |( X) f) p8 l0 F1 d7 a
/* override diags mask for selected modules */; q; N, n; Z' t5 E, q
xdc.useModule('xdc.runtime.Main');. l$ F; u4 o- `2 ^6 ?8 e) o
Diags.setMaskMeta(* @& v% l$ u% s" V
"xdc.runtime.Main",8 I2 S* O# w* j: d. L0 s: }
Diags.ENTRY | Diags.EXIT | Diags.INFO,, a9 ?$ @3 f) P! r" M& Y
Diags.RUNTIME_ON& h1 m$ ?, I2 S# m* u. I9 z5 m
);
/ y$ Z% z# `/ c! i# Z$ Q. ^/ w" L: t. Z: F1 D& p. J
var Registry = xdc.useModule('xdc.runtime.Registry');* w5 S( j0 I' X" Z, u0 ]
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;% z2 e5 r; J# y' b& Y: o3 U7 ], E
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
' l- }4 o7 q6 a* Q; J7 T VRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;& m9 \* s3 d, y$ O: l2 _* _: Z. U
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
% f7 l1 W4 F2 O
( T+ h, `6 h1 W. a+ P+ i6 V5 K/* create a logger instance */
' e9 F( r8 m H. m; qvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');6 f# p- N" q* e9 h- c; N
var loggerBufP = new LoggerBuf.Params();9 Z3 I/ D( [ A# O
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */ H# b) D" z7 P
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
7 v3 R# \! B# j
& Y* s; C6 z3 {% ? k5 ivar appLogger = LoggerBuf.create(loggerBufP);( Q3 h4 b( J* @
appLogger.instance.name = "AppLog_Core1";
1 z. k5 f4 F c) uDefaults.common$.logger = appLogger;% k. I+ O# {" Q* W! ~
Memory.defaultHeapSize = 0x8192; - d8 L! [' T9 [# V) c
Idle.idleFxns[0] = "&LEDStatus";
8 x: ]3 N) I& Y6 gCache.initSize.l2Size = Cache.L2Size_32K;
+ e( C# \& M! k$ V, X5 S" X& V; d! ?
" U9 @9 g x8 {6 D* V) N |
|