|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
! T+ M0 w1 k H% L) z我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下8 E2 f ~3 f8 V2 l2 M0 v: ^8 B
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)1 @/ x" A6 N! g# C, x5 b
0 d; t0 u E, v6 C( x, v9 F是不是需要在DSP.CFG中进行配置) Q. ]7 c, _5 J. ~1 m2 ?. L2 w4 [
我现在的配置为1 l j+ |3 \# g p' v4 I& y$ T( c! u
& c3 `& e' H3 e( A. F6 f4 t
/* T# ^2 W. J/ W7 G& Q
* ======== Operating System Configuration ========
$ K0 h; L' H L/ X- i, P( F */) r* e1 T$ x& ^" t+ i( ]
) F' j: n) T; ^' |3 h# c! S, B4 K
/* no rts heap */9 V1 {5 D1 T* G- q
Program.heap = 0;
7 A! W- Y1 ^$ Z* ]7 o* I9 }Program.argSize = 100; /* minimum size */5 ~/ e5 i" y% S: d, r) }# G) |
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大3 l/ M( \) X, h1 J% k
; E& A2 u6 K6 I3 w( |: S) {, V
/* create a default heap */' a) V F! Z+ t" m5 q% M) ?
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');3 c/ l$ \$ _# j; ~5 p. H) S
var heapMemParams = new HeapMem.Params();
3 [) M" N% b Q1 I+ C- ^8 N, J3 vheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
2 d# X- r! s, E/ Y6 `2 Y
o0 \! U2 Z# Q; N0 N% k4 h9 rvar Memory = xdc.useModule('xdc.runtime.Memory');
" D5 r. G V: Y, n5 a" S; XMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
. {8 W1 f2 ^4 K9 b: c! F* N( T4 L4 }3 t* j5 r9 e1 Y3 \" E
/* configure System module */
% p& r1 e' v+ J0 h2 P8 X% T) r) U- Ovar SysMin = xdc.useModule('xdc.runtime.SysMin'); C1 E/ \; u0 ^1 W9 t
SysMin.bufSize = 0x1000;$ s Q1 U4 _! q& F, ?% f. j% G
SysMin.flushAtExit = false;
, P( P) C/ w- Y- O. F9 ?0 ?: L: K5 ~4 S
var System = xdc.useModule('xdc.runtime.System');% ]# S. S; @; x4 z6 G
System.SupportProxy = SysMin;4 P* @2 F( X4 y7 n9 K) m3 L
$ ]/ C! Z/ a0 f, J' @/* configure SysBios to use the lower half of Timer 1 */
9 Q7 ~. [/ _- u( [* W4 Tvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
% K4 j* k9 R/ c8 Hvar Clock = xdc.useModule('ti.sysbios.knl.Clock');# w- v& _0 _2 V! F
Timer.timerSettings[1].master = true;
. O J3 s2 j0 \7 L. W, n& y3 STimer.defaultHalf = Timer.Half_LOWER;
- Y8 ~! r# M+ ~5 H1 @+ h! vClock.timerId = 1;) g" w! O' g3 X6 U8 X& M2 |/ j
( u" m$ S& U E* G2 t9 _9 T
$ G1 n8 W4 R9 Y# s- p$ d0 G' t
/*7 R$ u7 E7 P! t' W) |7 E% f; J
* ======== Miscellaneous Configuration ========
0 R, |$ c' ^- `2 A1 q */
: {8 L& X* f9 q! g3 \
9 u; H# _% ^( D0 T h9 u- E0 G+ D/* set default diags mask */
3 G+ q X3 ^9 x4 N) {& ]4 h+ Tvar Diags = xdc.useModule('xdc.runtime.Diags');
* q* X }* P6 @4 r& _var Defaults = xdc.useModule('xdc.runtime.Defaults');
# o% @$ o7 J! i6 ~8 j% }. L& s& K
# L5 \( N) _" h) R6 m! DDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;; V$ `( e4 X- W7 X2 N
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
- |) Y$ g+ t3 a, q0 CDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;$ E; ?$ B* a: T% L' f/ v
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */! \$ T6 e& O6 _, G% l
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
% o2 C) E4 |7 q* GDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;+ j5 \% G% l% z$ i
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
0 `$ ^- q7 c0 V8 vDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
& H; f' T+ F% V, y+ E$ t; cDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
; c1 U- q' m! y$ Z7 M6 X" ZDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
: K7 F( {! H% Y6 }6 U! D" v% EDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
) u' Y8 Z# r" aDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
2 Y& o9 u. k, I% J! [4 K& p3 HDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
! j* \, b" x! U5 \Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
* x6 v4 O" s8 d; q& T* P6 I4 X0 R# w1 m. I, q
/* override diags mask for selected modules */( R0 v* r- h. z8 r- o
xdc.useModule('xdc.runtime.Main');
& Y, ~/ t4 y4 b0 D& L) jDiags.setMaskMeta(
1 I0 y: |9 m! V* } "xdc.runtime.Main",( L/ R( x- q# L/ F5 z
Diags.ENTRY | Diags.EXIT | Diags.INFO,) L" x9 m B# e% {% f$ g# Z
Diags.RUNTIME_ON
( }9 s. A1 v' y& p);
: D2 _8 q; W4 Z3 o- S6 j; z! d! P% l3 W& Z( M* }2 W ?
var Registry = xdc.useModule('xdc.runtime.Registry');- F+ v" M% X9 t; M4 k% H. D( O( I; B
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
. u! C# Y5 Q& B( H2 nRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;/ {# y# N- g3 L
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;* e$ Q o" j( M. X: Z2 Q+ v, e$ A4 X
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
' D( y( R9 | h8 @+ n- [. n! J. G& H- Q' |5 z% p: J: a z. F1 h# I# w
/* create a logger instance */
7 E8 T5 `& G$ S. t( Tvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');. p! h3 w& d3 y$ i/ w* J& S* ]5 q" r4 J' k
var loggerBufP = new LoggerBuf.Params();
2 R8 `% ?% e7 Q7 OloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
; y" N3 b# |: I5 TloggerBufP.bufType = LoggerBuf.BufType_FIXED;% n$ U9 Q. ^; k' Y- ^, x3 L( k
% G8 j$ {) D s1 w+ D7 r
var appLogger = LoggerBuf.create(loggerBufP);5 w0 X( x6 ^# Z
appLogger.instance.name = "AppLog_Core1";8 L: Y5 v% h( t$ g9 O* N
Defaults.common$.logger = appLogger;* Y; N' y; d/ J( O9 Y
Memory.defaultHeapSize = 0x8192;
0 ^& `- Y N% L) N, p% Y; v: @Idle.idleFxns[0] = "&LEDStatus";& V5 j& o# j7 d8 u: V3 m
Cache.initSize.l2Size = Cache.L2Size_32K;4 r- n) o% F/ l% s* ]
$ w6 b) B4 J& C |
|