|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
1 p# S4 Q, K: r7 H4 H. m9 t t我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下) R2 ^! w0 F" r. b" |* H
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)7 W5 \& U) U2 t" `0 E3 `" q
s' h Q3 F" j* e1 ~
是不是需要在DSP.CFG中进行配置* F$ e2 i2 [$ T' H
我现在的配置为
5 p: ]6 M. {& p
! Y$ z, `( y% Y2 B/*
3 p2 }4 B5 |5 R' t, n' ^/ Y- N * ======== Operating System Configuration ========
) N, l( E* J/ T Z$ h T. | */
2 ?$ ?$ l( Z3 E( q$ x2 G. A6 a" p& \( e8 w* s3 T
/* no rts heap */
: A6 I/ h( s" M# j: X; q" aProgram.heap = 0;
- a3 r2 \1 H. tProgram.argSize = 100; /* minimum size */! G1 C" f& [- d0 w
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大! {' x4 q2 w* P+ G3 C
p0 r8 }3 W# r! Z/* create a default heap */8 h+ D, x& t1 a4 F' u. ^' w: W; C
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
2 @$ ~; I) j7 v. \0 E) zvar heapMemParams = new HeapMem.Params();
6 v7 B: ^+ B" D3 g8 ^& sheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
5 g: D O% H% s' b S) x6 C& L. z8 @( D. L! R3 V
var Memory = xdc.useModule('xdc.runtime.Memory');. I9 [4 \" I+ s/ }; R
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);8 W% S% e, P* z, |3 u. z0 G! p
" w5 N j9 k! f. W2 L% G
/* configure System module */
1 Z5 H7 D& H% Zvar SysMin = xdc.useModule('xdc.runtime.SysMin');
" @/ R% D# X+ v6 ^- sSysMin.bufSize = 0x1000;+ c' t! e1 f% O0 M' I
SysMin.flushAtExit = false;
3 D- U9 E* t/ B/ g' m9 k+ V" Y: e, ?1 i2 M+ a$ \; Z7 e5 \
var System = xdc.useModule('xdc.runtime.System');
# s; x8 z) R5 p$ eSystem.SupportProxy = SysMin;
3 c! \/ H/ z+ m# Y% \& y
0 w/ @9 V) M# O/* configure SysBios to use the lower half of Timer 1 */# `, ^! t! f4 h) x% w! |2 D: L5 g
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
4 d9 a7 k# \ f" F) g( b. ~! H8 \var Clock = xdc.useModule('ti.sysbios.knl.Clock');- F# U7 X, t3 |. U' Q0 f0 Z4 X9 K+ K' J; ~
Timer.timerSettings[1].master = true;
- L( E) M- H/ y9 _0 o" GTimer.defaultHalf = Timer.Half_LOWER;
# U0 Y. \# l& L5 aClock.timerId = 1;+ ?, G+ c% m+ m' s, x8 `; ^
' t( ]4 @! |0 o2 e0 a* w Y F! ]7 f: O0 Z7 Q" n
/*
0 I ~6 V/ w: i, V1 z4 H * ======== Miscellaneous Configuration ========8 u+ U' l+ z }) k+ V, q. j
*// D e. S. B# T: W
+ W3 F' o2 D9 W
/* set default diags mask */
2 P! U# X. \& |; L$ wvar Diags = xdc.useModule('xdc.runtime.Diags');
7 w$ A2 [9 I7 `( v2 o9 D4 [2 Lvar Defaults = xdc.useModule('xdc.runtime.Defaults'); a! q( f6 O2 X0 j% {9 l. A1 P8 A
( C" J7 o. d9 d7 `* y
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
9 y- M* Q$ z* ^* H* r7 o0 jDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
* f9 f# L7 X; @6 F4 `9 U& ~- aDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
2 H* H, W2 I7 w' b7 I) b NDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */3 F7 b. e. N+ ~. B3 C" \
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
( Y, w. A/ E/ g$ F; I5 z, b! dDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;; z; K& _& z' s8 X; R M
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
# T; }6 G: c) MDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;4 E! K/ }: P. J+ B8 v
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;, B. X4 F V, P, n
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;# M5 S9 |! j! K; E, P' V
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
5 \8 n; i9 I7 R: Q; K& B* RDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
: j) _" X, ^/ ^Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
) L7 D; G3 E( zDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;1 g, \1 B. N: m; N5 R
- ?6 `- m$ S7 a- j/* override diags mask for selected modules */) a& f5 C9 t a1 Y& b5 N$ R6 c
xdc.useModule('xdc.runtime.Main');7 y$ l3 L$ J' `& Y- E+ H& T
Diags.setMaskMeta(
6 U5 o& |; C* P3 B; s "xdc.runtime.Main",
, Z6 H: g1 m' \' @) S Diags.ENTRY | Diags.EXIT | Diags.INFO,
: o3 P3 { P g, B Diags.RUNTIME_ON
( Q( \. @: ~5 _+ c; });
! B9 Q P. g4 M7 q- K
; R" }+ t# N0 c8 l4 `. \! j- H& M3 qvar Registry = xdc.useModule('xdc.runtime.Registry');# \* \$ Y, A& {9 C
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
/ C8 c& T% d5 c4 E) NRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
" ^: N5 {4 D4 J1 C) C& |% H1 j1 xRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;2 P# i6 z6 `: v/ U
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
% ?' t4 I( i5 G7 }# ^$ E: ~* W3 {- g) e/ S9 _
/* create a logger instance */
4 m4 I* e0 I3 B: s0 s* y. C( Nvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');& C5 l+ @1 ?# {* v/ y' h
var loggerBufP = new LoggerBuf.Params();
6 c( G9 f+ z; J9 {loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
7 _. _% s. v0 K( aloggerBufP.bufType = LoggerBuf.BufType_FIXED;
8 ?& x+ N& [8 i6 P6 o1 b h2 b4 s# X( S. f4 V, d9 E# ^7 E
var appLogger = LoggerBuf.create(loggerBufP);. _: f0 r( q& {. r4 ^
appLogger.instance.name = "AppLog_Core1";
4 Q( Z1 n7 i0 R# F, W) q+ }* }4 E; SDefaults.common$.logger = appLogger;/ W) V' i# r3 p/ N( q2 h2 a5 C. o
Memory.defaultHeapSize = 0x8192;
- P. L' H9 x* c9 ]; gIdle.idleFxns[0] = "&LEDStatus";) \# e/ ]. h5 F" _% D" p: ]
Cache.initSize.l2Size = Cache.L2Size_32K;
' B& y, e' c$ N+ |6 i5 _
" b) P$ v/ N3 m+ t9 N: j& Q' ?. j |
|