|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明' o8 w5 a7 O+ {1 i
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
- W6 D# m8 Y7 T(不过疑惑的是,为何单独DSP仿真就没有问题呢?)9 O7 z; z: j, ^+ R4 n# ?
3 n7 y ?3 t, M. b是不是需要在DSP.CFG中进行配置0 O9 m! v3 w8 \0 |" |6 C0 e
我现在的配置为
# D- B/ x& s; {" G2 {2 o. f5 H, y# \- ]) K0 n
/*
# A9 E- D0 V1 Q2 F * ======== Operating System Configuration ========: [$ L* J$ o0 w; F) B
*/% o( e' N2 b: h' |, Q G
2 a8 }! X7 g4 D5 i$ A
/* no rts heap */8 X) E1 z! ~ i6 @( O. x
Program.heap = 0;- f( g7 p2 E; a! L9 \) H
Program.argSize = 100; /* minimum size */9 [4 ?' K5 `5 i, ~9 F
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
+ @& l$ q8 ?; S8 Q* X7 m9 m! J: Z2 s X2 J0 W7 k: s- k) J2 |( O7 B
/* create a default heap */
0 }( q F9 e* R! N% x8 qvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
( f3 M5 g& j, h1 {& [ f* e& x# kvar heapMemParams = new HeapMem.Params();: w) W3 m' \4 {4 k% S/ F
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
1 z* m) j i2 q2 K6 E( l" w; m& u3 r/ v2 a
var Memory = xdc.useModule('xdc.runtime.Memory');
8 l/ d% W0 [- d5 `: ^$ e* ?Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
/ B. Q3 z; @+ j* q, c) Z2 [% q8 }: W6 ^; C4 _" a3 c h _) _7 \
/* configure System module */
% O( q2 O m; Y6 avar SysMin = xdc.useModule('xdc.runtime.SysMin');
# N) T# m9 _$ J2 ASysMin.bufSize = 0x1000;; _, N$ z: W& s4 k" u
SysMin.flushAtExit = false;' a* w& L+ T M/ f7 ?# w8 W6 B
$ G2 ^: K* B5 o" C( Q5 x, C$ G# Yvar System = xdc.useModule('xdc.runtime.System');
% R9 `% P" v( J+ iSystem.SupportProxy = SysMin;9 q2 x7 ?4 c$ m [: k
0 U6 Z# Z2 P3 _& k0 l* ]
/* configure SysBios to use the lower half of Timer 1 */- J4 G& U6 n9 x' h, U" Z) A
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');2 q' z5 K; A) [- o( v S
var Clock = xdc.useModule('ti.sysbios.knl.Clock');* L; A& I. g& g' c- ^
Timer.timerSettings[1].master = true;% Y: \) B1 q4 L0 d" `2 H' N
Timer.defaultHalf = Timer.Half_LOWER;
3 _& v* h) F3 o. D1 q0 W: `Clock.timerId = 1;( |0 @+ F5 k$ z
2 Q. {1 @: i" t
v; T! c- }& N# V1 G/*
9 S1 a; H' l# Z1 y" C * ======== Miscellaneous Configuration ========) F$ C, a2 w4 r
*/8 G/ Q2 q0 d- n. e% [
" I$ b( E/ t" P4 b
/* set default diags mask */0 }: b! ~6 R8 q& l8 Z
var Diags = xdc.useModule('xdc.runtime.Diags');
( F# _6 C7 G* q: [1 \var Defaults = xdc.useModule('xdc.runtime.Defaults');
/ A1 u7 {. J y* ~9 k9 c# k
' [7 \$ R) |- tDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;; K% Q! S6 U2 c) Z# G
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;9 a- i/ ^6 |+ S; p2 Q( N
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;5 X4 C6 E, _6 b* N5 R
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
" _9 d" Z t I1 C# B8 ?Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */8 A$ Z" M6 r: n) K
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;* h3 f- {( Z/ F3 b( d4 M A
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
4 B; G3 H6 h3 W6 N6 ]6 }Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
2 ~$ g7 q- O7 f8 TDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
+ ~9 z. M# Z4 x7 ]' G g, hDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
" g$ e2 g" a; `: B( _/ qDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
8 {3 K6 V3 Z) ?Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;, b* {7 {/ B9 w& O9 D5 }4 i9 l0 i$ x* u
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;. x0 V8 p+ _" f0 z
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;& H2 @1 Y" }( v- w ?) B; a/ e
- ?( ^3 V& B$ V
/* override diags mask for selected modules */5 V, k% W- e2 t: g1 T
xdc.useModule('xdc.runtime.Main');
, X, ]( b- |1 O* V. cDiags.setMaskMeta(2 |, k4 u0 T; w% s* u, A
"xdc.runtime.Main",
, U' j l) k6 j# I# H Diags.ENTRY | Diags.EXIT | Diags.INFO," U( z$ N1 d% |; C& S
Diags.RUNTIME_ON; l1 a% q! _% m
);
, Z. d7 E4 B9 @5 q: [% m# m7 i, ?, Y! H
var Registry = xdc.useModule('xdc.runtime.Registry');
6 l. N; L# D4 A- n# jRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
2 t( Z' T C) j2 V I8 Q6 }- SRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
2 m$ N; e5 l/ f! ~$ h& qRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;' m5 z1 M3 P& K) [1 e, S) M
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;- Z: `$ v2 B4 N5 S3 @2 Z
Y$ d6 z8 U. h/ S
/* create a logger instance */
% i7 o' U' c+ g4 U8 ivar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');7 M$ k5 w. }* ]
var loggerBufP = new LoggerBuf.Params();
8 X' B. J; _* u* i5 ^$ S, SloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
# V7 k# [( T1 @7 b, `loggerBufP.bufType = LoggerBuf.BufType_FIXED;2 g3 J; I8 ?8 v- S
. s# `) X, I B( Gvar appLogger = LoggerBuf.create(loggerBufP);
& o( }0 O1 o. {9 p! P7 S, eappLogger.instance.name = "AppLog_Core1";) B7 Y( f5 R) z5 D, e$ d
Defaults.common$.logger = appLogger;
8 M7 o) ?, c3 sMemory.defaultHeapSize = 0x8192; 8 ^+ ?% u* v& t/ i/ q# c
Idle.idleFxns[0] = "&LEDStatus";
. k. H& ~- x" g' D) A* BCache.initSize.l2Size = Cache.L2Size_32K;
0 k0 N2 c* j( E0 L" ^- ~& x+ A$ g3 [! Y
|
|