|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明, p# D" c# e h" P6 |9 V
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
: F* G0 m8 y0 R$ o3 ]) o3 G(不过疑惑的是,为何单独DSP仿真就没有问题呢?) m0 P0 v, i8 E5 o5 ?3 p
+ H0 ^: A5 Z+ j* t; }7 r! Y- m
是不是需要在DSP.CFG中进行配置
" R8 M. g4 z1 c% c8 \9 n) B* X我现在的配置为7 [% H% z0 l: E4 F$ N+ _7 ~
' c4 ?( g( {/ J1 V% }' n- h
/*
1 e* Z0 Q5 y$ ` }9 O0 m8 T3 {9 c * ======== Operating System Configuration ========8 E$ H7 S& \4 L% s) c( C
*/
+ ]9 t5 [8 b# N3 |) J
0 ? @. n, |( k$ Q/ B/* no rts heap */7 d# `& A0 _+ {7 S* {
Program.heap = 0;* \" C3 h% e' Z1 k. g Z+ O
Program.argSize = 100; /* minimum size */7 n) m4 a/ G* U/ ]
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大' p/ n; y8 {& V6 m8 u
! T+ t/ {" R! f$ O' [4 d4 {/* create a default heap */
9 U# d, r# [8 a, C( Mvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
6 q+ b2 q( v; X2 R Kvar heapMemParams = new HeapMem.Params(); M, T. T$ f' w' x" \) w3 x
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
( E% l( T( N) c' {0 J; D+ ?8 T: h( j( ? h( l2 s- o
var Memory = xdc.useModule('xdc.runtime.Memory');
6 ~+ z; _: e: n, [' F2 r9 _8 J* VMemory.defaultHeapInstance = HeapMem.create(heapMemParams);8 M. @: P, A7 l8 ^ z& n. |
( U# r2 @+ b) n0 l3 K+ @7 b
/* configure System module */& g, z: U( C A" H3 P( t
var SysMin = xdc.useModule('xdc.runtime.SysMin');
. \, v0 e+ x) n# _SysMin.bufSize = 0x1000;9 V& W, U/ Q n/ q( d
SysMin.flushAtExit = false;
' L2 B' y) y* B/ D- c: Q5 }9 @$ k) Y: I
var System = xdc.useModule('xdc.runtime.System');
) ]' b6 \! A1 Q9 S+ hSystem.SupportProxy = SysMin;
' T! W" C% i) m) j
7 y, ]+ X) Y8 e- g0 a5 @+ j, C/* configure SysBios to use the lower half of Timer 1 */+ P$ @/ Y$ ^4 F+ w! n( Z
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');- g7 R. O' i* V- b
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
+ }1 q. A H/ y1 a0 D9 U4 OTimer.timerSettings[1].master = true;
% G: m" k" B0 q: |: H( A% ]/ dTimer.defaultHalf = Timer.Half_LOWER;
q8 B2 h9 M( O( v5 m8 A4 FClock.timerId = 1;# x p2 n7 K$ s; a
; K, }; m" {2 R% ?" ^# @6 b l6 A
3 {$ P L% X8 O7 s/*
5 D) C" I* h$ m% t7 |" d * ======== Miscellaneous Configuration ========
% V" W/ D4 p7 x% [ */
5 w, R* U# {! t8 r$ N+ x# q2 p- p) k+ h; q" f8 Q) f& v1 W! ~
/* set default diags mask */
1 Y; `6 c- a' y* _9 {2 Pvar Diags = xdc.useModule('xdc.runtime.Diags');' L( x' k; C# H7 w
var Defaults = xdc.useModule('xdc.runtime.Defaults');) M; S# t o V# T" v9 Z/ M" C4 ~
( h, v# v1 ~# ]Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;# C9 n" {$ |5 f. g: @8 I; a
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;1 L5 w$ |, i$ f$ z. a, d' ]
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;: f# i/ k a1 b+ E& _% S9 A1 d
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */# U1 q/ Y& J+ ^
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */: D& d* h4 @. _# P& k1 s
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
6 _9 g6 A4 ?# z( Y9 ?, @8 z/ hDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
) j* T$ m# S3 {3 O3 {* _2 T" V! mDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;! n* \5 ^( Q. y# Q& m. }
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;' T! n, \/ y7 X; U6 |
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
8 j& N6 f; @; p% FDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;% c% Y- \' Y8 m% j# u- {/ v" S: _
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF; E1 g: i) Y" r- a7 h2 K9 o! l! z
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;/ h' l7 t& C# j% y; B O& W
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
7 s+ ]4 \. N( |2 w) l+ F" ]/ x3 |0 T& r% [3 | L! V( w, ?4 P+ W. g
/* override diags mask for selected modules */6 J- P6 q: p7 _) S o* k7 ?0 d1 h
xdc.useModule('xdc.runtime.Main');
, c# g4 G+ y5 @; z7 [ iDiags.setMaskMeta(1 X+ R. y. J( m' k& P, [
"xdc.runtime.Main",
. ?; f8 R$ L1 r ]5 K( N Diags.ENTRY | Diags.EXIT | Diags.INFO,1 f, Q. r" X- G, ~2 Q! k
Diags.RUNTIME_ON+ k( r) ~- U# S; B
);
/ n* C' V, p; B, [1 s9 X5 h
4 P% [, Z4 x+ c( c q$ Nvar Registry = xdc.useModule('xdc.runtime.Registry');& J: k2 o# t: I# L3 w/ r7 l
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;% W: `1 N3 P& |* z- Y8 I" x+ }2 H! t
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
' V5 \) S, U3 ]/ B& @0 vRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
/ X* e8 a4 Z; l- q* G6 n- ]Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
2 D& R/ z3 u# F; v6 Z; [4 M" l9 K$ [- W( Z8 z @
/* create a logger instance */* D- p9 j W) G! l" h# [+ _+ k
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');! ^% l8 r2 f! i! f
var loggerBufP = new LoggerBuf.Params(); e: l8 l% k8 y1 \" L' j
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
$ W' w/ B I1 g2 f1 vloggerBufP.bufType = LoggerBuf.BufType_FIXED;. Y# O! P; {5 j0 U! F
; Z, f+ {1 d; j# F2 U/ @* M
var appLogger = LoggerBuf.create(loggerBufP);
* S; G. n( p- jappLogger.instance.name = "AppLog_Core1";
' T+ j( p+ w. G6 r$ fDefaults.common$.logger = appLogger;
& Q7 c8 ]% K8 ?" B, I( {; v8 }6 hMemory.defaultHeapSize = 0x8192; " }" F- e& r" e' A" i- d
Idle.idleFxns[0] = "&LEDStatus";
& V5 a% D2 u2 T2 [Cache.initSize.l2Size = Cache.L2Size_32K;
& r1 X* z0 @3 a
& a( k. Z0 c D |
|