|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
0 T9 `+ K7 s: q, `& N我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
# `% x! z& j0 z6 w6 l1 B(不过疑惑的是,为何单独DSP仿真就没有问题呢?)- x& ~3 G9 Z* v5 S
# V; u& c) P5 u5 A是不是需要在DSP.CFG中进行配置
. _4 l2 s; B" J我现在的配置为
! B3 ^1 H" H6 w Q( i6 k+ x1 q
' l+ s$ y: n0 \4 j# U. Y/*
0 ]6 J& h" B& ?- X$ b$ n r * ======== Operating System Configuration ========1 b% p( N" N0 f. m k1 q
*/% S4 d y! m6 |1 ^* T) p0 e
0 d' `/ i: F; Q1 ?# F6 R
/* no rts heap */
( I" @; ]" H1 n- f! y5 fProgram.heap = 0;; q+ Z! u3 N! O w! J v
Program.argSize = 100; /* minimum size */, G+ ^3 x# c6 b
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
8 `& H# t# W% ` G0 F4 f, i: U4 f: q. G. F4 N! M) M
/* create a default heap */
) y g! W" q$ l% M( I1 e" W. Y; D' hvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');" x# A% \, v" _4 A" p8 `
var heapMemParams = new HeapMem.Params();: q% T3 r+ c+ P2 {
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大2 s) i0 r4 @# h8 ]3 F6 w1 `2 Y. k7 }
: A( c$ A& O" j4 |, Fvar Memory = xdc.useModule('xdc.runtime.Memory');
3 T! { I7 `3 y7 U2 zMemory.defaultHeapInstance = HeapMem.create(heapMemParams);5 q5 C: e/ ^: ]% p; a
+ L; a5 e: b3 [! e" w* N# C5 c7 A
/* configure System module */
) Y0 ?3 Y" m" L! f. X8 n' bvar SysMin = xdc.useModule('xdc.runtime.SysMin');
6 f% E0 _! m# r( pSysMin.bufSize = 0x1000;) _0 ~+ l" C' e0 D
SysMin.flushAtExit = false;
+ ^) x! {" \# {5 p
2 j7 l) g7 w; b3 l4 Qvar System = xdc.useModule('xdc.runtime.System');
. K5 r7 g, j# h: }" SSystem.SupportProxy = SysMin;& u8 K+ {* U" O8 w
2 j+ o8 ?, P2 K/* configure SysBios to use the lower half of Timer 1 */
' Q9 z, i A! W7 kvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');: P2 Q9 K6 h/ s7 L3 o* T
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
" e: c8 s6 Z' x! |. f$ }' ZTimer.timerSettings[1].master = true;
. ]5 B' F5 Q c$ aTimer.defaultHalf = Timer.Half_LOWER;) E( T: h/ A0 {+ h
Clock.timerId = 1;1 @9 x" H3 W, |( b
3 m$ x Y8 P4 O9 r9 x" M
# {8 A' F% u: S v" B8 ~/*6 f; |% N5 O9 J
* ======== Miscellaneous Configuration ========
" g! [& ^4 W- A9 {' X */
$ a5 N# c1 Y/ u0 U! T" ~# q$ E2 p' }& |/ ^
/* set default diags mask */
5 z+ B. _! ?* I g- Pvar Diags = xdc.useModule('xdc.runtime.Diags');) I; F1 b% z i) |8 ]' c1 p D
var Defaults = xdc.useModule('xdc.runtime.Defaults');
" Z5 ^9 R( q4 p8 R* I4 v
0 }8 Q0 b" `2 q5 pDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
8 e7 P, j; j5 Z, n7 v$ cDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
' }# G$ c( z" h7 HDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;$ N. @5 A% @$ t
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
* y \ M$ E- f: B: B% ?! nDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */* p) f, a5 u) I: H8 {; ?( c
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;, V0 d0 l4 {1 X
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;$ K" c% l+ r, r7 V2 j! t& _
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;' a4 l1 l3 S2 S$ s) z1 n
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
Q: g5 V% n; A# ~+ m* \Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;# ~ W8 l6 i1 E b9 a% ~
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
) V. d& D( [) m) ]) @Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;* c# N I. Y7 ?# ^5 P9 g) M, {
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
5 X% L$ c r! G& S' V! YDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
( z% p" ], V' u' V
2 @+ Y6 C+ t# }* f/* override diags mask for selected modules */
1 |& R8 J/ g5 p' x, X9 Yxdc.useModule('xdc.runtime.Main');$ H0 M+ }" H4 a, X' w
Diags.setMaskMeta(
5 ^) V4 ~: S% t9 w( i/ ^! [ "xdc.runtime.Main",
3 j* \4 V$ z5 u' a' |% ] Diags.ENTRY | Diags.EXIT | Diags.INFO,
; _1 a- x, i& c2 e* t% i Diags.RUNTIME_ON: b! x( g2 k0 R8 J' d' f
);' |6 ] ~$ B" Z6 q3 D9 ~
& }, G& |# t4 H7 Kvar Registry = xdc.useModule('xdc.runtime.Registry');8 v6 X: d' v& F; J' L
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
$ t- }' |5 _. cRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;# `6 E& o, \, T
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
2 d( E& G( J/ |$ a9 f( p; _Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
% U/ g* n H- r- t& ?
# z& a1 B: y+ r% ^5 W. ~8 s$ m/* create a logger instance */
- d, ^3 a6 g5 C" J% P# lvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
4 u# w: {: t5 r' x+ yvar loggerBufP = new LoggerBuf.Params();
& h5 U! l; m4 Z1 r; l, H" y MloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */' c& Y- p U, P0 G. d
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
A- e9 {6 |; A0 L/ {8 k' F6 }, H2 g B9 Y
var appLogger = LoggerBuf.create(loggerBufP);
) ?) @7 b; Z8 W: BappLogger.instance.name = "AppLog_Core1";0 l# ]6 n. `: r1 w
Defaults.common$.logger = appLogger;
1 }+ s7 {6 G. K* U5 C$ B4 ]Memory.defaultHeapSize = 0x8192; 6 u/ {/ f5 }# h" F( Y
Idle.idleFxns[0] = "&LEDStatus";* Q2 Y+ Q% q3 H# b2 v! W) a: J8 B
Cache.initSize.l2Size = Cache.L2Size_32K;
; ^& @5 d2 X2 R1 z# G P5 H* Q6 k5 `) p7 X0 d
|
|