|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明9 y! k5 M& a5 y& Z. Q" @
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下% n4 f; @' ^& v# U [- {9 h, b0 D2 i
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
- V) u. D! f, [$ Q" X" v" i. f6 Q) j/ F% r( F
是不是需要在DSP.CFG中进行配置
* h+ x: |" z) g; G, R7 X我现在的配置为
! b! o4 B- y1 t0 I) ]; ~7 _
$ ^ ]3 f9 l; b; O- a/*
2 P( b& b9 a, K' W, P% V * ======== Operating System Configuration ========
S7 U& b' E! |8 R */
4 g( }9 A- J% _8 Q: r s3 [3 a+ |) S- A8 l* P1 S" E% P
/* no rts heap */
8 n. H! b& l; @Program.heap = 0;) x! C- |& S0 Z0 Z
Program.argSize = 100; /* minimum size */4 L5 a! r5 G: M$ G" q
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大* t+ d* {" B, o7 g
, a2 Y9 J& D: I) g. ~, v/ C
/* create a default heap */
. O9 T% h4 X) w# Tvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
8 |; O3 _7 F& T' [8 I8 H7 \& S" Xvar heapMemParams = new HeapMem.Params();) o) u( z5 q w$ W' H: C
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大- j& r0 l* X' s( A1 \
# f/ } P; P; P! P& L# N# S! wvar Memory = xdc.useModule('xdc.runtime.Memory');% h7 `+ M* [3 l8 v2 `* t: L
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
, \( g5 s' Z0 m+ ` r% V
1 z1 ?% ?! D' [* X( e! L. T/* configure System module */& ~4 H6 C- Z x; @$ V6 P7 Q3 \3 _
var SysMin = xdc.useModule('xdc.runtime.SysMin');( b: ^( F: }' x7 m5 z7 H1 j
SysMin.bufSize = 0x1000;
5 e* q7 Z) |1 j3 C+ ?SysMin.flushAtExit = false;
% Y! j3 F0 p2 f! M: k9 X, v( k6 p8 ] F) h3 Z6 `! p7 F9 {7 u( j, R6 h. H
var System = xdc.useModule('xdc.runtime.System'); f* z3 z0 `: X; m8 A( d- q( X3 r
System.SupportProxy = SysMin;$ W2 W0 J2 U) w- o: K) X2 c% r
" a$ P6 {" N2 ^ s* [3 L7 @9 I/* configure SysBios to use the lower half of Timer 1 */( d# Y, B7 D E0 X/ G. V" R
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
1 c; s5 ] c3 j; M; Dvar Clock = xdc.useModule('ti.sysbios.knl.Clock');
& w' d% c/ Y. k& q" b7 r7 J8 j5 WTimer.timerSettings[1].master = true;
+ C( C5 x1 l5 w: u: mTimer.defaultHalf = Timer.Half_LOWER;
- [- v, r* I3 t. ~1 P6 O. I, i9 ~Clock.timerId = 1;
D$ O3 O! [: Q0 s, s4 I" @8 n
7 d! P! S2 j% a9 }: y% b) ^, D- |: ]3 U7 `$ p
/*8 ?3 M& R( m( k4 W- |
* ======== Miscellaneous Configuration ======== }' _5 c, `& o) m
*/
7 Q2 O* r# y5 O5 [# p
8 ^3 q) t- h0 s/* set default diags mask */
4 V* Z# K! J- j4 y! f9 H: A7 M' E Vvar Diags = xdc.useModule('xdc.runtime.Diags');* p0 _, H( \* F( o% `- F _
var Defaults = xdc.useModule('xdc.runtime.Defaults');' ]! f# }% l% U) y
; s6 \8 w. C6 Q8 C; h' DDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
6 r5 y! a/ `0 l. M8 {3 a9 FDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
% E! H8 q# Y; { J7 vDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;6 [5 \8 o" G- ^8 i8 i
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
; B4 {3 l7 t. t4 jDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
6 S4 S$ }; ]' U% PDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;, j8 {! l* [( O
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
6 d' v+ L1 }# Z9 i" ]Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
; u7 a3 ]8 a) r5 ^4 {1 EDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
* u3 E4 ?4 m5 |9 _0 x- c7 a- IDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;, O. l0 e$ J3 z
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;8 S4 n" T/ I5 F$ a4 ^% P! ?, m+ Q
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
]* |/ f0 S7 I& j- f1 ]5 }6 NDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;! G; x$ L: }( {. N! @
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;8 v3 i0 ~ P+ x7 T* a" D
. z/ J8 s9 u6 c+ v+ g( [6 O
/* override diags mask for selected modules */
! }3 r8 ?; V0 M' t- l5 c$ X9 ]& |/ Lxdc.useModule('xdc.runtime.Main');
1 O" U* s1 p( a2 U8 K$ \Diags.setMaskMeta(
( ?/ L) f! l/ y i: l0 ~7 G "xdc.runtime.Main",
% j3 ^! h& G) M; ]/ n Diags.ENTRY | Diags.EXIT | Diags.INFO,9 h2 v3 L3 Z& J! @
Diags.RUNTIME_ON
" g5 a) [: k! ]- M' _);$ Q8 w' Z/ f2 b; X/ {: _
9 R% ?( R2 u& i7 S; q# v" o
var Registry = xdc.useModule('xdc.runtime.Registry');
4 n* o8 q n& T3 A1 GRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;+ u6 m& B' w; X/ y9 O0 s4 y: t8 q
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
: l6 W1 U1 m1 P) ?+ Q7 H$ F+ l h$ DRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;$ t' T+ i* K/ ]) q8 T$ V
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;! Y. H' p2 H" l {- S' B4 t; d
) B' ]6 Y2 N# t/ h$ {6 z
/* create a logger instance */9 a6 R& [. C U) A; p
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');/ ^8 c4 @- \1 m: U$ b. }2 z; V
var loggerBufP = new LoggerBuf.Params();
6 Y/ O" ?9 u. w( O% qloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */9 \3 f" w- {- F
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
+ r9 f9 C& R. t0 s, V P0 }2 L2 f7 g1 C, S0 Z
var appLogger = LoggerBuf.create(loggerBufP);6 |, u' n6 n2 q8 k; k# R% I
appLogger.instance.name = "AppLog_Core1";3 H/ H: l" S! _, `* |* ~+ J3 ]7 y
Defaults.common$.logger = appLogger;0 q. f: P; ]' ~$ S" G
Memory.defaultHeapSize = 0x8192;
& G4 F; S Y, z2 X( ^8 i: G, z5 N2 WIdle.idleFxns[0] = "&LEDStatus";) D9 R3 W( _/ f2 x
Cache.initSize.l2Size = Cache.L2Size_32K;
4 ^+ E$ Z0 ^# J4 E& W) I o6 m% z
|
|