|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明 j4 H6 k( K; {. S) E3 U
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下8 U7 L, j* U: F# s
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
7 p0 c9 S" p: P7 G I( O5 V4 r$ S; X' w$ C" X# S" m) J
是不是需要在DSP.CFG中进行配置
# I1 `2 N9 F. d) o# R& K! r+ s7 S我现在的配置为
, {# z* Z0 b% T
Y1 C* H6 |& F/*
, B& s. r, b, y. B * ======== Operating System Configuration ========
& K* i; m1 s2 {' N */6 S4 h! P( P! Y# ^8 o" T
3 K( ]) E! F7 [+ Y- ?' M
/* no rts heap */
& P) m8 d: k. o1 JProgram.heap = 0;
: l0 C* E" _2 H6 k4 jProgram.argSize = 100; /* minimum size */
5 B; t* a3 D& \& M n3 j8 F6 x8 }Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
* u: J) a1 S8 Z' I- ~5 i$ G
, V3 Y2 f4 Q p- W" O" [: K/ e/* create a default heap */
7 {9 ?1 q8 e8 f2 k8 @7 S7 c5 evar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');! v: Q8 V$ R6 a: H7 c
var heapMemParams = new HeapMem.Params();" M" ~9 c9 H" Q/ m' O1 E0 E) T. x7 k, p, O
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大& A W. ~, e# _3 q. b
4 L! V: M% N) uvar Memory = xdc.useModule('xdc.runtime.Memory');) c! X0 c- _2 x4 U; \' F8 ~
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
, B! J- I4 S* M, V, i" B/ V( [) F! d0 `- [6 n
/* configure System module */
7 _% A S- Q4 {4 Tvar SysMin = xdc.useModule('xdc.runtime.SysMin'); U4 j( A8 S* `# A3 c
SysMin.bufSize = 0x1000;# E6 M- y8 g+ V* R% E5 j
SysMin.flushAtExit = false;
& B: R, Y" m" z) x3 @
w/ E& `' F$ Qvar System = xdc.useModule('xdc.runtime.System');# J2 C# s" |7 p+ i# `
System.SupportProxy = SysMin;
! v, v" t: `& k
4 [. A. x6 H! m$ p0 l/* configure SysBios to use the lower half of Timer 1 */
) f4 X1 H# C Xvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');, Q( ]( p0 ` T1 W }$ B' h
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
* d3 D1 `( o0 u" C' cTimer.timerSettings[1].master = true;
) {2 q: m; S& l* ^' iTimer.defaultHalf = Timer.Half_LOWER;
% l) i* k* p( o1 _2 i/ U- cClock.timerId = 1;3 e' n+ Y; g; W6 E1 M% r
( F( G4 u& ]% A% ~. w5 I. W' \' [2 @$ F" u1 w2 N2 p3 M( _% ^
/*
6 U1 F5 Y7 X4 U * ======== Miscellaneous Configuration ========( ` [. V5 k; e5 X
*/, v# q) S8 \$ R: L$ d+ l8 H; }
- q* N) m, q* Q# S- ^1 I" `* |
/* set default diags mask */$ B: B" r O8 b) {0 y
var Diags = xdc.useModule('xdc.runtime.Diags');
9 G4 D! }0 Z% M. Q, ^& tvar Defaults = xdc.useModule('xdc.runtime.Defaults');
0 ?" o8 M3 I2 H( r0 t
; t8 z8 q1 B$ k, CDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;, l- j6 ]% `9 F! I2 D) Y0 p
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;, e; d- ]3 J+ i: S+ Q: u
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
5 z, a2 O) E% W. _; G9 y: ZDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
8 U6 s8 C1 ]! y" f% bDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
6 {1 [% j* K* Q: [Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;( L$ g7 k3 X& i3 y" T" ~
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;% ~4 t2 b/ G3 s- z5 U- ]( `
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;7 i# A( r9 V- |5 q
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;" I; m' x* D( {! m
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;, c( j" h9 k4 f
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;9 t" P# a- O: N1 w- m
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF; z: L) b, L/ J3 E6 R
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;* a& X" c6 P- M& f2 Z- L# n
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;9 C9 y% B/ X- }6 `
" M! l0 w4 }: I3 Z2 @
/* override diags mask for selected modules */
/ b' p: i$ D# [& h& i, Txdc.useModule('xdc.runtime.Main');
) Q) v1 k1 s; c9 t1 b& k5 s' vDiags.setMaskMeta(9 @/ z3 u* w7 u/ P- f' E
"xdc.runtime.Main",9 W3 f/ x, Q2 E# C
Diags.ENTRY | Diags.EXIT | Diags.INFO,
7 ]0 [. M0 t0 \4 T! V+ P Diags.RUNTIME_ON
+ R; Z# y% M! B5 i h);2 [2 Q1 S2 S5 |3 B$ y6 P
E2 v) Q- x; S
var Registry = xdc.useModule('xdc.runtime.Registry');. c# L4 H, \) I; [7 S: G! o
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
+ X2 V' t& ?6 _ U4 E3 B/ @. d! TRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;& r1 `. i' q; G) C4 K( J
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
+ M, h2 i& c- {0 e8 nRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
0 z4 E4 E g' w* H; b1 \; _, r- M* G$ n8 ~
/* create a logger instance */) ?+ G+ e4 m6 n
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
/ z: b: `' k A( @) X S0 [+ Yvar loggerBufP = new LoggerBuf.Params();* c Q9 q/ P! D! C4 n3 `
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */8 X* C8 \7 w% x: V3 i1 m) c
loggerBufP.bufType = LoggerBuf.BufType_FIXED;1 w8 C& }( }0 O3 _" x" P
- n' |* B* W% |2 f1 w8 ~var appLogger = LoggerBuf.create(loggerBufP);
$ h2 |6 _9 P. R6 g2 x# NappLogger.instance.name = "AppLog_Core1";/ S7 J2 e2 [' N
Defaults.common$.logger = appLogger;' J/ n5 [9 U9 ^: k1 L% G
Memory.defaultHeapSize = 0x8192;
* m+ @8 I& X/ P% m; N: p y3 XIdle.idleFxns[0] = "&LEDStatus";
: Z2 w" V: A3 P% TCache.initSize.l2Size = Cache.L2Size_32K;
8 U: ]; r) M8 x% [- q
1 Y! {2 c* U7 q* c |
|