|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
& ~% d5 c y6 D @我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
; I- A9 f9 V% A G! Q(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
" E' F& e8 z! S, K4 H3 P' {
! M! `% Q2 I# ~: R3 @! b3 O. w是不是需要在DSP.CFG中进行配置
: o# d1 |" N: H* x我现在的配置为& O; ~! e8 O4 u! \
! p, z9 Y- ~ Z- i
/*8 Q1 {6 u9 U# B
* ======== Operating System Configuration ========4 M6 u& `/ L3 `& d. M( S2 g
*/1 `+ y# L, d: b7 B5 u9 f
% u4 H" s5 Q6 p- W/ x; q/* no rts heap */
. T C# d( t2 m7 \Program.heap = 0;9 W6 A5 m- Q1 H) O3 `9 N
Program.argSize = 100; /* minimum size */3 R3 n2 k, ~ _: I
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大% B$ H: v6 w$ ~; ?: g
) e v- [+ ^ N }& Z
/* create a default heap */$ |% ]# r* e1 f& C$ y! z
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
- K: k8 i" Q" v* Z- |" Z9 yvar heapMemParams = new HeapMem.Params();
* E2 d# _/ G- Q6 ~& ?' I; MheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
~! D" q( E3 G F) B
2 d! M# \ ]: lvar Memory = xdc.useModule('xdc.runtime.Memory');- J% i4 p; W" W! O
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
# p1 o' s+ x3 |! d- S3 j; {: B. R* W* L5 s+ i/ ? [
/* configure System module */, U5 l1 N, w( z
var SysMin = xdc.useModule('xdc.runtime.SysMin');
5 }: i- s! l3 }: d& [ T, nSysMin.bufSize = 0x1000;; M$ \, ]2 `8 i. W8 \2 I5 V! s) B
SysMin.flushAtExit = false;/ n! j X4 r, X! s3 s& _1 F* ?
/ z2 ~0 Q: P$ K& w7 Gvar System = xdc.useModule('xdc.runtime.System');
4 |" B& r) y- tSystem.SupportProxy = SysMin;! k0 {* n' u4 b3 |7 S' h* J6 r
5 _; B( H" L% V, A# [2 S5 B* j$ w
/* configure SysBios to use the lower half of Timer 1 */7 A0 i! \7 M& V) y6 Q
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');# n# Y; ^1 c4 A' F) F* E
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
; F" u& ~( E4 L4 m1 x8 _9 _Timer.timerSettings[1].master = true;! d( K) K" R2 b8 }- n/ E5 s
Timer.defaultHalf = Timer.Half_LOWER;
8 Y# W8 w, i" PClock.timerId = 1;
! y# U: v/ _% [ M* @, [
2 P% N' a+ y8 I' l, f
- [2 D- i( U; K+ ~/*" J5 l$ D' ^; f, E9 i: i: ~
* ======== Miscellaneous Configuration ========6 v( r6 ^+ ?2 n3 n
*/
. z+ F& d1 X T2 z7 e; [5 x" e% ]
+ d# p: ^4 q2 `% e' n P. a2 h/* set default diags mask */6 L5 q1 Z! ]9 e! E" I9 R
var Diags = xdc.useModule('xdc.runtime.Diags');
% W. u* x, f3 n- Bvar Defaults = xdc.useModule('xdc.runtime.Defaults');
. |4 j" ?+ v) j4 Y8 i- U
/ ~2 S' [( t ]* A! _Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;6 b4 q5 c: Q4 i- c9 x
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;6 K7 \7 A1 E+ H2 `0 N+ ~ V
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;2 R$ @$ i1 L: m7 D( }6 b& j
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */. L. p! @3 C8 x/ ^( r; u& \
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */- h* t, H+ t1 T2 ]' e, d
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
0 F- T3 W$ k* C( D; QDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;, _5 R# w$ w9 l7 p, F8 q9 e8 h/ N
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;' X7 ]; L" W9 f2 H4 V
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;3 e, _- G3 U2 v* j! \* o& S+ s
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;- T% X8 S* P6 Y- L
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
, Z" X1 q$ j4 y/ \Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;7 L& _. e$ F2 A$ F2 q
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;0 N r- ]# ~% k1 v4 x6 P
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;+ J0 e6 E3 T8 B2 u" s# p# |
$ t5 Y8 y- E0 n0 m9 A v
/* override diags mask for selected modules */( m9 M' r/ ]" Y0 s
xdc.useModule('xdc.runtime.Main');0 f6 B' v, g' K, J4 J- Y2 @' P
Diags.setMaskMeta(
( T% j+ @& d0 r6 x8 b "xdc.runtime.Main",: w! H; X1 [0 N4 g
Diags.ENTRY | Diags.EXIT | Diags.INFO,
8 ?6 I$ s3 G! C, A' x2 ` Diags.RUNTIME_ON/ P; d! j, D% a4 P; C
);
% \) E! n" g Z9 m T1 _1 B7 w5 W2 B
" x% x7 j+ L0 M) ovar Registry = xdc.useModule('xdc.runtime.Registry');6 l2 a6 i* p1 ~: Z% B
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;. @9 Y$ e! u! N0 L
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;, N! h+ g8 N3 b$ M/ T( X" E
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
& w) h4 v/ v/ k$ uRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
& e$ ^. k. a* J/ ?9 D2 j$ J; @+ Y/ g" I3 W" X
/* create a logger instance */& e3 T' h g# ?. V
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');; Q0 x3 N5 _ e- j
var loggerBufP = new LoggerBuf.Params();
9 A5 w" z9 ?! V! Y6 Y4 E/ ~7 `2 gloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */$ k1 H# x: o ?- x' K9 f9 v" a. S( f
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
+ U6 u$ \3 Y3 D- n: |+ \7 f2 K, \1 ~( {+ ?+ u7 i
var appLogger = LoggerBuf.create(loggerBufP);( ], i7 W' O8 i
appLogger.instance.name = "AppLog_Core1";- @5 }3 W/ S: L; |
Defaults.common$.logger = appLogger; d: y) ^) Q! y9 N9 E
Memory.defaultHeapSize = 0x8192;
. z3 } h9 G+ \0 V# s- zIdle.idleFxns[0] = "&LEDStatus";
r5 U# X6 e. VCache.initSize.l2Size = Cache.L2Size_32K;& P, ^6 |' g- y5 U' V
- |7 k( R5 N& ^+ y$ {+ |
|
|