|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
! _, ^+ w* j2 y( ~我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
- ^0 {# R& F+ g: Z- a(不过疑惑的是,为何单独DSP仿真就没有问题呢?)8 g8 c2 b6 N/ D8 ~: z+ F) ^
: k1 Z% C, x2 T8 f& V是不是需要在DSP.CFG中进行配置
8 d. q% v7 D+ W/ W% R3 l0 r我现在的配置为
! u% q @$ [% T' a2 [' R- m6 ?, q* Q6 V1 c) _8 R( w
/*, N! ~( R9 r/ s- t) c
* ======== Operating System Configuration ========
* c2 s, _$ F& h) x& m8 {) M */; v& E- z: Z3 [& M
$ L) \* j$ {) j6 H" d
/* no rts heap */
* ]. {) W) Y; A5 B6 ?7 uProgram.heap = 0;
& S% O. w7 p0 \5 f( aProgram.argSize = 100; /* minimum size */& z6 g; Y, Z6 Z: s+ y0 C* z) Z5 f' ?* g
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大( M. o" p% V9 \. @& ` V& }
, ^1 J* n0 h4 c* r- f) P. |/* create a default heap */3 v* d2 q! t/ Z' Z4 ?4 Y
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
9 U* e g1 r$ \4 S+ gvar heapMemParams = new HeapMem.Params();
# ~, X: Y2 I ~( P, i3 p6 S4 X2 ]heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大" |1 C& r& v$ a3 i
1 p9 b) }) W# N7 r6 f( p
var Memory = xdc.useModule('xdc.runtime.Memory');
+ _% a! C; ] m. H% CMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
) {$ y' O B0 }) L/ j
' a% h! N- c, a: n/* configure System module */# Q% N/ ?- K# {" N6 X
var SysMin = xdc.useModule('xdc.runtime.SysMin');
8 j- g E8 Y( G2 X$ B- LSysMin.bufSize = 0x1000;
2 B9 X0 G0 E% C* [8 z3 T2 RSysMin.flushAtExit = false;
! D" M' n9 ?' i# ^3 q, b, o8 j& o( ^, D
var System = xdc.useModule('xdc.runtime.System');
3 \, ^9 l$ b, d# _3 |& oSystem.SupportProxy = SysMin;" b9 d# t1 _2 O" a
* K; w H G5 R+ V3 L' A1 a7 x
/* configure SysBios to use the lower half of Timer 1 */
9 [4 ^! H- U- Xvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
3 R7 h, Z0 M! o$ U/ s) ~var Clock = xdc.useModule('ti.sysbios.knl.Clock'); W' e0 k3 m& o, o) ~ j% d
Timer.timerSettings[1].master = true;( i+ W" `# W6 M; ]* K9 I
Timer.defaultHalf = Timer.Half_LOWER;
8 w5 e5 Q0 F V2 V; T, {; PClock.timerId = 1;- y% N. V5 g5 D1 j% y2 h) X
/ _$ O! T, h) N4 [4 u
' p" E# Y2 b' f- N7 Y/*
& V" y7 C( s0 h; V& i- J * ======== Miscellaneous Configuration ========5 J( w9 Z; r( y. s
*/
5 l8 `1 b, e. A" u, d ]
X( G5 x8 \, Z+ [ r3 f& h/* set default diags mask */
- y5 R- g( h7 m$ g' Tvar Diags = xdc.useModule('xdc.runtime.Diags');
. N; |$ Y! p% Y) k4 s3 d6 zvar Defaults = xdc.useModule('xdc.runtime.Defaults');! A! }9 s# H& ~0 h0 k
I% H* w$ M0 Z x
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;+ @: {: m3 W o7 G) Q: n& S4 N9 _
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;, T+ A2 J A( o8 I) P: O t
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;1 t; e% v4 U7 v) {6 q
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */" c* @# `' Y3 F8 [
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */1 _& E; Z$ s; v! K" k
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
5 q6 A) Z* i" ], a e! XDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
3 w) D; m5 q- S; f! ~Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;3 {& M$ g# q% v2 h% I9 z
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
: ^" G* h. k) m- i# O9 JDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;# m0 i& x# O* X, P- _
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;; I" N( z! y' t, ]$ B
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF; A/ v' [5 z. P9 y) F9 [; U
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;) v8 h7 h" W# ^
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
+ g/ ?: F6 k8 ?/ I% o2 ^: l
. O( l: ]3 m3 t2 }6 P/* override diags mask for selected modules */! U$ ~7 \8 h" U2 j; X8 Q
xdc.useModule('xdc.runtime.Main');
& k! H2 y4 O0 e+ r+ c: }9 MDiags.setMaskMeta(; ]# \) U" u$ Z
"xdc.runtime.Main",
( |. q: i1 x% Y4 M4 k Diags.ENTRY | Diags.EXIT | Diags.INFO,6 a. k4 F) A7 a2 U4 Q$ n+ A
Diags.RUNTIME_ON
P/ x( e- a# J- W8 E);& ~/ l( @6 v) W. o$ N
5 }; n* i0 c9 P
var Registry = xdc.useModule('xdc.runtime.Registry');3 a$ u! [5 a. k" }* c9 D
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;8 J2 B8 `& F$ G) ^# O
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
$ I: q: F O- T# vRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
2 ^: N2 V1 E" l# b$ N9 Z. xRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
7 t7 A! |5 _9 v2 t2 N8 O- H1 O% [9 t# o
/* create a logger instance */% e7 G; }$ {# D8 ^; W
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
' P! O& o" a, N7 {; r& U) w9 evar loggerBufP = new LoggerBuf.Params();& z6 Y$ F7 I4 m
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
+ D0 u1 g1 u2 h' t8 c! j; ?& K- h" VloggerBufP.bufType = LoggerBuf.BufType_FIXED;
) r# P" t5 k- q# ~5 R+ a$ z
% }+ |0 r& k" H7 A: h3 lvar appLogger = LoggerBuf.create(loggerBufP);
7 S0 G0 I& ?; XappLogger.instance.name = "AppLog_Core1";$ a4 f0 D6 b8 B8 h/ n" Z: _+ e! \8 X
Defaults.common$.logger = appLogger;
) _# o& C8 `5 N3 w! i2 gMemory.defaultHeapSize = 0x8192; . E& }! i2 T, [, e( |* y
Idle.idleFxns[0] = "&LEDStatus";
, A7 H) N% ^! K% yCache.initSize.l2Size = Cache.L2Size_32K;0 G& u+ y2 b, J6 c9 e
" P6 y) J9 h( g8 v
|
|