|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明0 ?9 n- k6 g& m- `; t
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
4 H/ O: [" @4 S2 ](不过疑惑的是,为何单独DSP仿真就没有问题呢?)
" V2 g: i0 n) n! v, G0 G3 F+ e, ?4 O6 F& T0 _$ L' d/ l. f
是不是需要在DSP.CFG中进行配置- C2 ]: F3 M4 p& p9 I
我现在的配置为0 ] h5 S; k. O' z( ?( o x
: r& H, h7 S G0 j/*- f; v4 L# ?7 B3 Q# ^+ E( o
* ======== Operating System Configuration ========0 }4 R2 C5 F1 l' X2 D; e& n
*/
6 w ]1 f L( R% H* X( F- G
. }& r% Q+ m% ]3 f/* no rts heap */
( o0 j* r- l1 v: b, h- i; r* HProgram.heap = 0;
7 P# N' ]$ _) Z$ {* T2 m: eProgram.argSize = 100; /* minimum size */, K( Q6 s) N+ l# `2 `
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
# C( b. o* `8 I- L- O0 |1 w9 s D. p' u W. e
/* create a default heap */
: O% |' ^ s* U4 h, ?& Q1 W# mvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');+ L: y8 D# l: O) S3 g
var heapMemParams = new HeapMem.Params();/ ]2 L) Z' d5 j& t' m) F3 o
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
9 ^! X( C* x- k
, ]2 G: G* g% |* w" E$ U- m5 Kvar Memory = xdc.useModule('xdc.runtime.Memory');0 t0 N [$ W( U* Q( }5 X) K" X
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
8 s- {6 N1 B% J) v& D$ N/ D
& v1 k( F! i' R- H/* configure System module */0 y1 [5 d0 ^) a( H2 w
var SysMin = xdc.useModule('xdc.runtime.SysMin');
) k, G$ j; t" n% USysMin.bufSize = 0x1000;: m; @9 p' i* q) k& U
SysMin.flushAtExit = false;
. G, M" U: V0 x0 m. ]1 b4 [6 y, r5 y+ I9 m. M/ z! K t q! c
var System = xdc.useModule('xdc.runtime.System');2 Q; j4 t b* \, q
System.SupportProxy = SysMin;
6 Y- v+ ^9 g0 g% L3 i; D
& f0 O W9 _. H2 b+ {2 C4 |, I/* configure SysBios to use the lower half of Timer 1 */
9 ~' q( b! y" S1 r; Z; \% wvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
# V3 R$ l7 x; B$ G& rvar Clock = xdc.useModule('ti.sysbios.knl.Clock');7 w% Z4 q8 L' q1 P
Timer.timerSettings[1].master = true;
$ o, s+ w/ g# l3 n5 fTimer.defaultHalf = Timer.Half_LOWER;
. h z |; f3 V# {2 T3 ?5 _Clock.timerId = 1;
3 i; e% {+ x% x2 w0 O3 ?2 {8 w2 D' Y
6 V ~: K8 V0 D0 A+ D
/*
' g" E5 t* p2 k$ y% y+ | * ======== Miscellaneous Configuration ========
5 e% e' v5 z) g) W( F */: |! b7 S- K" s
# m& Q+ v2 S* v7 r/* set default diags mask */
/ ^! i2 Y, C0 V) r$ q$ d6 ^5 gvar Diags = xdc.useModule('xdc.runtime.Diags');# h7 a( V4 [0 b) U* g% I0 F t
var Defaults = xdc.useModule('xdc.runtime.Defaults');
7 f- y6 j0 v+ T' ?) s/ M" T* d3 i$ @1 d7 |" T2 O4 a
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
/ j. I* R' W' iDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;4 |; i0 P$ P. g. y" H
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;% A' S4 x' z0 F
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
5 {* U/ @& W6 q3 t9 CDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */+ S, u8 {" g1 v
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
' ^5 K% G8 E7 LDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
: U4 b+ C5 W# G6 iDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
' z2 w5 I( Q) C2 z" c [" wDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
, T; `5 ]1 a8 VDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;% r! {( o, h9 n6 l
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;! i1 f, j' l2 T! s5 r
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
* Y2 Q9 e) B# _9 K4 c- Q _. oDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;4 M8 \8 p4 |2 T8 R
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
( V3 K1 W) j8 J" T5 G5 ]- C, T2 F+ c. T7 G
/* override diags mask for selected modules */. f1 N* V3 ]- }/ P' { n. }( ]
xdc.useModule('xdc.runtime.Main');
2 f! i w6 ^/ t5 ADiags.setMaskMeta(
3 o0 V/ |4 H9 ^0 B" y @% ` "xdc.runtime.Main",
* T* O8 q% {; ?' W: m, g Diags.ENTRY | Diags.EXIT | Diags.INFO,* [: G& }4 J/ W N, \1 G8 p
Diags.RUNTIME_ON: w# v- E9 I, X2 I
);
@. X3 E( ]7 o: b! d- J4 V7 Q
0 ^" {0 O7 q6 y! y& F/ Rvar Registry = xdc.useModule('xdc.runtime.Registry');
( x" D3 w$ P5 P: f) N* k! n7 rRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;% S& B- ^( }' p+ c& }
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
, \3 G* {1 B3 @0 ], Y5 [Registry.common$.diags_INFO = Diags.RUNTIME_OFF;" ?9 C! _9 h/ F) M2 d1 h; I
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
2 N8 T7 C# ?" Y, M9 O! ?4 Z3 `. X9 \: b) D( z
/* create a logger instance */
" X, h4 \% ~8 ]7 D/ A8 ovar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
7 V4 V0 y% d. t6 D3 t3 D1 A9 Ovar loggerBufP = new LoggerBuf.Params();) c& O( O( Q4 u, m! B y; b
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
* e7 l( H( z9 Z6 _& VloggerBufP.bufType = LoggerBuf.BufType_FIXED;
) z; ^3 q$ b0 [2 m% |1 B7 f/ `8 u% i# h8 b+ z- i
var appLogger = LoggerBuf.create(loggerBufP);
: j. D) A4 P4 c" Q6 \7 W; sappLogger.instance.name = "AppLog_Core1";. A3 X4 H2 h' ~8 k
Defaults.common$.logger = appLogger;+ Y% i, A; g3 Z1 M6 y" O& A
Memory.defaultHeapSize = 0x8192;
* D9 m1 Y' Q: e$ d; g( qIdle.idleFxns[0] = "&LEDStatus";
( r4 J4 V1 x. \8 \% O! ^+ fCache.initSize.l2Size = Cache.L2Size_32K;1 g, `, W6 T8 I- r! J' x
# f- X; {8 D/ |- `; K- Z
|
|