|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明' ~2 e0 `8 X* u
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
0 E( N8 Q) \; A: q3 s(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
W' b) S9 t% e
6 O3 S, k8 h W是不是需要在DSP.CFG中进行配置
% h: ~' }, P5 o2 b" N3 S7 H1 a我现在的配置为
9 [- R* h& {! a2 G" `% t `5 ~( q' o$ f% Z& f1 G5 ^8 r5 j
/*6 ]: \4 Y+ ?: f+ |
* ======== Operating System Configuration ========' w" f4 ~6 k5 R/ C* l) K/ [% C
*/
- o. Z/ P, Z* l, S. V, l; g/ F( S+ {8 M& ~ { R; M# A
/* no rts heap */( N4 z2 \0 I$ k) j) m/ u" E
Program.heap = 0;" [, o2 _: h, D: b
Program.argSize = 100; /* minimum size */
& Y. R8 x0 ?; w: l( s; FProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大9 T! ?. [1 i$ ^2 `. r/ C
& ~9 w1 U7 ]8 Q1 r7 j/* create a default heap */1 g" }' ]6 P. m# ?: S' L; k
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
) \# C' L* m* |# r3 kvar heapMemParams = new HeapMem.Params();
* Y' r7 s% E3 x# H, N3 I7 Q |heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大8 S7 n, [9 A# x! z+ s+ N
1 `! B6 x. ]) f8 Ivar Memory = xdc.useModule('xdc.runtime.Memory');6 _) y) I. p. J, ^) c
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
5 @. ^$ W$ V1 m% L2 S- |" x; x1 m$ J, o
/* configure System module */4 D; U) j, V/ m% I
var SysMin = xdc.useModule('xdc.runtime.SysMin');4 c! I6 v6 Z0 y& i
SysMin.bufSize = 0x1000;
3 Y: S4 m6 X5 G( Y8 s. sSysMin.flushAtExit = false;3 X) C [7 b8 S. ^! @ a7 E9 N' T- Y
/ g, B' D3 h" [* _7 l* @
var System = xdc.useModule('xdc.runtime.System');
3 b" w, X1 p& G$ ^# B9 \System.SupportProxy = SysMin;
2 E, H9 u* B2 F1 P/ E& @# j$ x+ n
/* configure SysBios to use the lower half of Timer 1 */
8 Y3 ^: L8 Y, C3 ovar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');# L Y; ?. _+ h# `
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
. q# B( E+ t2 h% [; o* OTimer.timerSettings[1].master = true;) t+ N5 u5 {+ n# |
Timer.defaultHalf = Timer.Half_LOWER;7 Q, y( B" h' P' J' M
Clock.timerId = 1;+ w) P3 R4 t! X% d
3 M, X8 I; G2 d
6 S5 p0 L, s. D0 R
/*+ Y' |; S, D' R( M
* ======== Miscellaneous Configuration ========9 D$ k/ w0 H0 n
*/! B9 T2 z0 R; K) f4 d: K
( d; p" a! j+ b8 s/* set default diags mask */# [/ w0 B8 F# C
var Diags = xdc.useModule('xdc.runtime.Diags');
3 q7 g6 w0 Z' I* l1 a" Gvar Defaults = xdc.useModule('xdc.runtime.Defaults');
' G2 y5 @% c0 P4 F% _; R5 ~8 C; }6 `3 {8 g, a5 ^( i
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
y% }" {8 I3 I$ Z$ ^Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
6 e$ U1 l, ?3 E# X# Q sDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
5 ]5 U6 A( V* }Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */6 ?/ ^# j8 A4 g+ Q' U! o V. O2 D
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
1 N5 Q; e! o( O0 `& \Defaults.common$.diags_STATUS = Diags.RUNTIME_ON; s' C8 d1 Y9 y. W) a
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
1 T7 {7 Z( ~4 t4 S, D) ?2 [- u" nDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
$ X0 o% ^1 z+ H$ h9 q' hDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF; |: l9 [# b! u+ O. n
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
% `7 X7 q. ?' S2 f; V1 MDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
" `, E/ F G. z8 N2 X& W5 `Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;# ~0 i# i3 F8 a% u1 z) Z: x
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
5 p* \% @) P @* @8 ^Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;) q# L, c/ c" P4 v0 A& y( _2 H/ C! D+ {9 Q
# t- ] [: g/ _. b
/* override diags mask for selected modules */
1 S1 h" ]8 Q* }: ^xdc.useModule('xdc.runtime.Main');
/ w$ r# T/ x, T, |7 E/ WDiags.setMaskMeta() R0 w3 X' b) a J1 R* F& x: Z
"xdc.runtime.Main",
; B; J3 G" C0 k' \. f Diags.ENTRY | Diags.EXIT | Diags.INFO,
5 V1 [% W* P' Q2 z& K Diags.RUNTIME_ON
; z" ?" h/ J6 [+ X! z. i);
/ C3 `6 ]; T4 _ U5 ]: I5 n
' X" [9 I4 P3 H4 C" rvar Registry = xdc.useModule('xdc.runtime.Registry');
: Y4 r2 }/ [; \3 ORegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;; ^' }. i" |8 G- T$ t
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
9 K- b$ @8 z. C# O: pRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;' k- N) ^! g7 Y/ b7 ~6 Y, i
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;6 {7 x1 j$ I3 ~, _( ^' O
" x' |* u8 J0 U( z* ?
/* create a logger instance */" q3 \* ]8 s6 D% d$ u& u0 e, }& ^; [8 ]
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
8 X- ~8 g. @ G; u7 p! r# s% `. \var loggerBufP = new LoggerBuf.Params();0 a8 O; S* F( s( B
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */) X& |9 W& ~) Y( r+ V
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
! _ K3 d3 o H- \) Y7 B" z
1 b4 x3 `, F& M$ E- ivar appLogger = LoggerBuf.create(loggerBufP);% ~' e: r; \' A( e! H
appLogger.instance.name = "AppLog_Core1";
8 \ G1 q# Z$ [6 u; H$ x9 E* h& i& r' XDefaults.common$.logger = appLogger;
% F; y4 P0 Y4 b8 `9 R; q% FMemory.defaultHeapSize = 0x8192; 9 D1 }' W2 R1 y! P
Idle.idleFxns[0] = "&LEDStatus";, R$ T) _& Y/ o6 [, p2 J
Cache.initSize.l2Size = Cache.L2Size_32K;& j2 L0 y) P. G" b
$ Y" P5 ^# ]5 d8 C( r
|
|