|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
" M7 r0 Z& R( A& j我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下4 ]! K! u8 k7 b6 C- V6 ?) b
(不过疑惑的是,为何单独DSP仿真就没有问题呢?), C4 ~& {/ a* _9 n7 z; h
2 k* Q! y' s6 {0 _; h: [- U: v4 T
是不是需要在DSP.CFG中进行配置
8 w. k. H& g8 D! c6 i& V4 q% @6 Y我现在的配置为! d" ^* ?* ~' {
2 Q% X; X6 K0 [! X& q$ U1 |. q( ?
/*
1 `! c/ `9 J5 T * ======== Operating System Configuration ========# A# @7 y2 |' R$ U
*/0 e5 m$ }+ y0 L. k/ Z6 S
$ `1 `$ Y3 W# H+ s6 T/* no rts heap */
, J3 |0 D! \2 l5 [! BProgram.heap = 0;
' D `( r$ l) A0 e9 T$ ~: YProgram.argSize = 100; /* minimum size */
2 G# N: Y2 I/ c9 n6 s/ @Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大1 e# X/ O4 T$ }) H Z
" s' |6 p' w# n3 ^
/* create a default heap */
& U( W Y8 U0 _$ B( w) wvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');% N: m: C; j6 N/ ~6 y$ g% y- {4 ?$ `( Y
var heapMemParams = new HeapMem.Params();# h# T: f7 Z2 N6 x4 [8 T
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
& V @; }3 h5 K* \' C5 E! S2 K: P" V/ f) Y; D3 B& s4 ^7 S( V
var Memory = xdc.useModule('xdc.runtime.Memory');
. ~8 n& `* h$ N" u9 m1 D. ?Memory.defaultHeapInstance = HeapMem.create(heapMemParams);! ^1 F2 S& M) x v: i; u* o; P
6 W, ^6 O# }, T/* configure System module */
6 r9 K$ e1 s- T; M6 U; Lvar SysMin = xdc.useModule('xdc.runtime.SysMin');$ M# B: @; i; j+ o. r
SysMin.bufSize = 0x1000;3 X+ L" s! E7 y9 F: T/ [
SysMin.flushAtExit = false;
6 U& l6 {9 n$ i7 k# Y: q* R* C( O( S7 p* G
var System = xdc.useModule('xdc.runtime.System');
) M* _. b& b& O1 R5 V3 g7 ySystem.SupportProxy = SysMin;& ]/ P; D. }4 t# ], E c2 x* `- i
0 Y& |& H# F, r" ^4 J# S. M
/* configure SysBios to use the lower half of Timer 1 */
* |, \* P" ]3 V }5 T$ v- V) G; n3 G7 t* |var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');8 k( m! O' }! ?' t& k- i5 `
var Clock = xdc.useModule('ti.sysbios.knl.Clock');- E* \/ m5 B/ H4 r0 `: F& E
Timer.timerSettings[1].master = true;, A5 l3 }- q3 w
Timer.defaultHalf = Timer.Half_LOWER;5 m: v* m7 g4 }9 [0 ~: f3 P
Clock.timerId = 1;, e5 v. X' f6 U# o. F; L L: L
) c# I% r) c( T& Q/ R, r) G- n7 T! u, E
/*
; e4 W+ n( d1 n# x& h& E# c, A * ======== Miscellaneous Configuration ========: N5 }' K2 m" c% s$ }5 Q
*/
0 I4 d0 |& q6 j( z" a7 R( _7 a; G8 N+ Q W1 ?
/* set default diags mask */
2 j0 Z: x/ A8 |; H7 C3 }var Diags = xdc.useModule('xdc.runtime.Diags');( u$ N) T# t+ Q3 `$ L6 v! H
var Defaults = xdc.useModule('xdc.runtime.Defaults');; P7 X$ W% O. r2 U; H
8 @9 y" W# I* [3 IDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
0 N! j) u f% M, M& ^Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;9 N8 O0 M' x9 |# y
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;) u L! B$ @' L) {& `
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */: c& H' L7 ~; b- Q9 i0 Z! r
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
( x7 K* ] h* @% o: e' }Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
& \* J# k$ Q' s/ s: eDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;6 p9 E: U! U: _" p, C2 ~# t
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
- |" z! L( c6 ]1 |* G$ YDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
- R7 ?0 \, y. q4 m6 Y/ gDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;* b9 d7 d9 d' D, j# u0 ~; W5 @
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;2 q; b6 a2 G6 s( \: H4 V! O
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;3 r# U9 I' ~3 Q" O
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;7 d& ?& O/ ^8 M' Z7 k4 @6 n; i
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;+ W' [9 j1 J g5 P4 }
: A4 ^, S# I {2 W
/* override diags mask for selected modules *// t% ~% z8 c0 W7 ?; H
xdc.useModule('xdc.runtime.Main');
# M: l% c( R- Z2 [* o7 B0 n2 KDiags.setMaskMeta(1 f( W. l& ?/ r j$ U
"xdc.runtime.Main",
5 n/ ^/ [ ~ x* N Diags.ENTRY | Diags.EXIT | Diags.INFO,
* ]) X* S9 j% u, q& E Diags.RUNTIME_ON
% Q9 k2 c; q3 x0 X2 |: G+ _);
. Y( W4 U I. N- X$ p9 }4 S0 i g, S. N3 ]( _9 P0 t- c3 t& a
var Registry = xdc.useModule('xdc.runtime.Registry');' t) b# _: l% d# h: \
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;% M+ J; T& g9 Q0 X; ]
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
' ^7 W& h. c: [' CRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;2 m- r3 D. y! K8 T
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;, v, y/ I+ \! ~4 c) m
& Y3 y4 Y9 Y1 s3 P4 F2 T }/* create a logger instance */
3 n2 [3 T: {# y( V" Evar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
1 B8 i0 ]$ w1 I3 R+ F, C- Zvar loggerBufP = new LoggerBuf.Params();
* a/ i. O2 R% E- w% v% dloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
# i$ z% a0 i4 I+ S. PloggerBufP.bufType = LoggerBuf.BufType_FIXED;
' Q, L( ], I3 R4 B+ z# f- k i$ w4 X2 h( i8 X" L) M
var appLogger = LoggerBuf.create(loggerBufP);
, w) M. e( J* k& QappLogger.instance.name = "AppLog_Core1";. c& c& v; k1 f5 h
Defaults.common$.logger = appLogger;: G6 l; p4 K! Q) W
Memory.defaultHeapSize = 0x8192; : r4 d# |2 m+ @; r6 g# v
Idle.idleFxns[0] = "&LEDStatus";) t% S4 E$ O0 D
Cache.initSize.l2Size = Cache.L2Size_32K;
4 p6 p/ J0 e" q1 A9 j6 h
" ~4 x: \* X* Q" s' @" V5 W: c |
|