|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
2 C4 \$ e0 Q$ u- g* s! {* m我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
0 K- w; i' d" j) h$ D$ @(不过疑惑的是,为何单独DSP仿真就没有问题呢?)1 s5 M; a% |# m9 [6 \6 l
1 X+ } T$ S0 F9 n是不是需要在DSP.CFG中进行配置2 F% `5 Z. [! e4 j3 ?
我现在的配置为8 L$ S2 }; p0 G6 g% h# Y6 \; }
: ~1 j$ R2 u8 n0 u; C# {
/*
1 D6 l% Z6 ~+ F& S" s * ======== Operating System Configuration ========7 { e1 m( Z2 A5 R$ H2 A) m N+ I
*/- G; `, k" e; [# j/ \) S: v9 o
3 S( P7 X+ H) b! B# |# D. Z1 O/* no rts heap */
: j" [, c* H! G& J, }* EProgram.heap = 0;5 N7 P, _2 C5 T" R1 A0 R b
Program.argSize = 100; /* minimum size */0 I: Y: O0 [, Q) t
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大( F+ N( U2 F5 M7 U6 D0 f
* u. H4 s. V5 r7 _8 ^9 q, Y1 ~: u/* create a default heap */* v8 v8 E6 K; |" X$ L2 W
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
$ i" V0 r3 v$ O. Q4 p' |$ Avar heapMemParams = new HeapMem.Params();
: f- B( a7 C7 y( ~4 @- ^, wheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
- G8 j7 Q8 Z4 J+ g' N1 e( |6 o
- X- J' y+ ]0 q3 O: jvar Memory = xdc.useModule('xdc.runtime.Memory');
8 |$ `; t) H! B. @+ w. UMemory.defaultHeapInstance = HeapMem.create(heapMemParams);3 c" z. l& y. |) b# j- y
! e2 d* Q# q% _+ s+ {, Z
/* configure System module */5 \& }" q3 y( B+ ?2 J! u
var SysMin = xdc.useModule('xdc.runtime.SysMin');
% f$ z! S* @' @8 G2 t: ESysMin.bufSize = 0x1000;
$ m: f: a' o. Z- W; ]) {% PSysMin.flushAtExit = false;
$ M$ I4 L5 p# _
& b; \( P" I R+ R; Nvar System = xdc.useModule('xdc.runtime.System');; R/ I# W4 G3 Q
System.SupportProxy = SysMin;
. Q+ V4 {4 b. L0 P; n
1 C" U9 r9 |! l7 u2 C. g+ m6 O/* configure SysBios to use the lower half of Timer 1 */
( l+ s& v# ^0 `0 z$ l, Bvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');4 I1 P( M3 B% E2 o
var Clock = xdc.useModule('ti.sysbios.knl.Clock');6 U5 p3 \! V+ N; }" H3 y
Timer.timerSettings[1].master = true;
) y+ B+ S. W; @. J/ R9 Q$ `Timer.defaultHalf = Timer.Half_LOWER;
% T# z; ^4 n, P; ?8 }2 i) pClock.timerId = 1;! w( F+ O( P- h5 o7 r
3 r4 U8 F6 I2 T% r2 {4 i# D L0 F& A7 d& G$ ~2 n$ W
/*
$ j2 w4 p d9 ]4 s1 I! f! x * ======== Miscellaneous Configuration ========; `1 M) h% l- ]& @" W
*/
% T" g; }0 ?" p/ K2 S7 V+ {# u) L5 @8 R7 k
/* set default diags mask */+ G8 Z' Q6 Q9 v. w# ^
var Diags = xdc.useModule('xdc.runtime.Diags'); e/ Q1 O; e* z2 b: g. D
var Defaults = xdc.useModule('xdc.runtime.Defaults');
7 ]6 G4 S3 o0 h% H4 S
' I; B& y s1 [1 \Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
7 M- o+ r+ J) \4 M8 p1 `" \! eDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;$ h/ @# \ x4 ^$ e8 L% X9 z1 V
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
+ b- q/ Q7 N, g: N0 v% n' XDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts *// O. V) W% S( H9 j
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */& O; @/ e) \4 f2 E, w# R
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
6 f$ E0 T5 q: z. C, `5 e- _! [3 [Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;' I7 a3 O: O( Z+ s, b. T
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
4 Y) Z' y, `1 R8 D% ?) r3 w! mDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
$ {7 q* Z: l2 SDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
, j& f% c8 R. {Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;) X" G8 |& u1 @8 K& f+ D( I# M
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;/ [/ _* C9 A) ?. p
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;1 H# n0 b" ?) R$ {, u, k: |
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;- U) ^6 I3 p* A# F" v3 S
9 J+ p6 T, I' r8 u2 y, Y/* override diags mask for selected modules */! a9 M6 k7 d1 K0 u' W3 B2 r& F
xdc.useModule('xdc.runtime.Main');
9 J! [1 J& f0 m4 tDiags.setMaskMeta(
5 c3 m" Q/ z6 `; x( i, s "xdc.runtime.Main",0 B3 P; X. f$ k6 N+ z! l. p
Diags.ENTRY | Diags.EXIT | Diags.INFO,
$ D) t( o ?( E3 Q% L Diags.RUNTIME_ON
/ ]2 ]$ |9 k9 q) Z5 b: J& g);# U, a3 y4 Y6 y+ M) K* B, w
: d' P" [1 C; S: Wvar Registry = xdc.useModule('xdc.runtime.Registry');2 H, r* M) H O/ y5 _; @
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
9 g+ z' i+ g) I7 v9 U' nRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
0 F$ s/ O- W2 g% PRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
) A+ f- @+ w/ s' P7 kRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
/ y y% w' t7 @/ a2 b4 T
. ?# x4 Z% ~$ T! @/* create a logger instance */6 \3 a" p( P. b
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
/ n/ Z3 k8 I2 U8 pvar loggerBufP = new LoggerBuf.Params();
' i! `" e7 M- z5 `' P( ]" e1 G6 QloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */1 m7 O% {7 @. F3 X& I7 n; P
loggerBufP.bufType = LoggerBuf.BufType_FIXED;/ l2 B$ R4 y5 G, J' a8 ?
5 Q" F' K7 X1 y0 {$ S, n* hvar appLogger = LoggerBuf.create(loggerBufP);
) F$ \; P8 F& Q& [( }appLogger.instance.name = "AppLog_Core1";
& m, U/ c( `/ T& j( \4 aDefaults.common$.logger = appLogger;# n2 K R& g8 D& s! W1 L
Memory.defaultHeapSize = 0x8192; ; u% [$ M* c0 l' j* Q
Idle.idleFxns[0] = "&LEDStatus";
/ T9 u: g+ o4 x' w5 \- D3 HCache.initSize.l2Size = Cache.L2Size_32K;
, ~5 M0 _% x* \& ^0 I @9 _8 m2 O+ N3 d, d/ L0 V' L; a8 ]
|
|