|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
& i' z0 ~2 j7 ~5 t6 V( u+ M我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
6 N+ F' Z, R! Q% A2 e ~(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
! q, G/ _. q3 c$ P" j
+ p- a/ f- r- r" l8 L& C" X是不是需要在DSP.CFG中进行配置
! H: r# Z# n) d- \1 u/ D/ C我现在的配置为
- h7 W% o% c- O4 X: d
, w d+ j( @3 e A- K1 V m/*# ?$ Y( l5 M; H5 f1 z9 _, n
* ======== Operating System Configuration ========. Q; K5 x [3 x- m; I. b5 e
*/
6 `7 O- E) a# H% g( S& C
# [9 k* q4 P% H3 }& ^8 p" B/* no rts heap */8 b8 x+ y7 X6 p4 ?3 [
Program.heap = 0;
# ^9 g) y& I2 t4 J' MProgram.argSize = 100; /* minimum size */
9 e; V$ }6 Q5 B: {% p0 {% lProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
( _4 [# A& O6 i% d$ {5 M6 v
O/ Q9 U, x0 u4 ?* B; A' j/* create a default heap */$ B: X$ w4 l8 L' x8 `- B+ H
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
. i# F; Q D! L0 p: [' ivar heapMemParams = new HeapMem.Params();: [9 T* T9 ?4 i+ n
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
/ ~! ~1 t3 l7 t1 j3 b3 u+ O3 h
- U9 x. d- G$ }3 Y) g, q+ }var Memory = xdc.useModule('xdc.runtime.Memory');! b" B; E$ h- V
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);- p7 y& }, C' c% P. ?- R( M; _* q
# m$ _* w0 W1 R* B; I4 U
/* configure System module */
: _* i s8 b$ a3 _3 v+ T' \var SysMin = xdc.useModule('xdc.runtime.SysMin');# w! \$ `2 S' c- u& G7 B3 B' q" w
SysMin.bufSize = 0x1000;
( s% O5 ]# S% j4 {' SSysMin.flushAtExit = false;
O8 \$ B% U$ i( ?+ s( V
/ T) Z9 [6 ? z, t; W7 A+ [/ ?var System = xdc.useModule('xdc.runtime.System');7 j+ k8 v' l! P3 [4 M
System.SupportProxy = SysMin;& I6 V' ] |! g5 {
& j! n" ]! i2 T/* configure SysBios to use the lower half of Timer 1 */
" W" E! i8 B; s4 P; Ovar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
) z) T( z' |# s8 Lvar Clock = xdc.useModule('ti.sysbios.knl.Clock');
a- o$ X- u% w) E8 rTimer.timerSettings[1].master = true;
. y% h0 L: j7 E; d/ Y6 E- ~) y& STimer.defaultHalf = Timer.Half_LOWER;3 t. U, y( H; _8 U! w7 W. t- Q1 U& J
Clock.timerId = 1;
A3 I6 Y& x% M8 E! l; R2 u0 W0 M* x6 p
' b# W$ t0 t( {/ ^2 B
/*
# f9 a; U- j6 y' _* I4 n) | * ======== Miscellaneous Configuration ========. g) `( A/ `/ j* h6 G5 B" V
*/4 K1 M6 ~+ \. Z$ E Z4 i* q, T8 H
$ d) d& K5 {4 r4 i; V4 z/ ~( A& H/* set default diags mask */
4 N, F" N' I. _0 C' s8 dvar Diags = xdc.useModule('xdc.runtime.Diags');2 C+ J% n- c9 W3 G
var Defaults = xdc.useModule('xdc.runtime.Defaults');
9 j. E6 B1 a! @. D1 }* c6 t1 r- p6 q, o5 |
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;6 B, t4 {& p7 D; `1 G. F" \4 j2 _1 ]
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;: N8 R6 D: U; Z
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;3 W! b d; V+ J8 K M# v. e* }( S' M
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
4 N' {9 O. \- r6 r% u8 VDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */2 w* M. A, e; I" ~3 y2 U1 ~
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;! r9 k4 Z- q" `& @: P- u
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
+ @+ b& `# C) N9 kDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
+ S8 m/ Z4 {$ |9 j3 R) M/ aDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
$ M2 L. y* A# Q% y! o' [$ |( I* [% UDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;) |: |0 f, s+ j$ J$ J0 s/ o
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;0 X8 B. G7 r$ v' Q
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;5 C6 J8 t! a/ I1 D4 |
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
# A. l* e/ J- yDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;& D) Z# V/ [2 U# T! G
% z7 K$ s% M+ F' a; {2 t
/* override diags mask for selected modules */' ^% P; ]% }6 O0 m8 {/ U9 ~& B7 _( E0 N" w
xdc.useModule('xdc.runtime.Main');5 t4 t3 J3 _0 V: A0 y7 O
Diags.setMaskMeta(- @% Q7 s9 s, y3 `; W% N" I
"xdc.runtime.Main",
6 G, x, G8 f# i# S: Z, v" N8 \' ? Diags.ENTRY | Diags.EXIT | Diags.INFO,3 A* W0 b' K) k# M
Diags.RUNTIME_ON, ` e# U! h {+ n) h; Z
);
1 b# }! C- ^ N$ S
# x1 h( t2 [; H0 n- i6 C; b7 Wvar Registry = xdc.useModule('xdc.runtime.Registry');
" s c. [3 }' p% U- J- `Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;/ W& X' m+ D! F, ]$ ^. \: X$ c3 H
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
: R) V1 X9 t! {9 T8 \: w1 X& URegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
0 R: q, i& I/ F2 m( k3 f0 {Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;& D9 Z! `, C! s6 U/ X0 W# f5 R7 z
# s3 _% {" e0 H+ X/* create a logger instance */
- U$ h8 r& u+ ~, {var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
/ |" l% H" {! }& [var loggerBufP = new LoggerBuf.Params();) S% s. w3 p" x2 G" O/ p/ C3 Y
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */+ ]4 y2 {8 Y# O8 A
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
. E& Q' W& ^. z
; H; l: i" z* ?) z% x8 Zvar appLogger = LoggerBuf.create(loggerBufP);8 R0 J) K% G0 y0 E W
appLogger.instance.name = "AppLog_Core1";
/ O& i3 |" R, l3 F* s6 J' n/ k0 fDefaults.common$.logger = appLogger;
+ s: C3 r& w3 i0 {! YMemory.defaultHeapSize = 0x8192;
& u' L7 _$ c1 c0 z6 xIdle.idleFxns[0] = "&LEDStatus";
2 X$ s. _: _. T5 y; N4 o% ^Cache.initSize.l2Size = Cache.L2Size_32K;$ k& @. [* ?: L, ?9 d1 I
! k% M. c% W9 Y p0 `
|
|