|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明* q! q Y {5 [0 p1 \& U: S! d
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
( d% D6 B$ Y+ Q* g1 P5 O1 a+ H(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
6 ~# }: d, O! C. P8 T5 C6 ], L/ w: [, d6 z$ g2 p Z1 c, |4 d
是不是需要在DSP.CFG中进行配置
" R% v0 X/ n5 E/ J我现在的配置为9 u+ t3 ?7 V/ q7 h
/ [6 U9 G8 g, a
/*
1 p* Z: K1 Z& g3 |2 K * ======== Operating System Configuration ========; }2 T# W( L/ X& `
*/" P. u, O" ]4 P% K
8 B/ J: \% i, a: q) J9 E
/* no rts heap */) [7 Z) f A5 W! y' s; A7 X
Program.heap = 0;! |% q. S1 [6 d; o& V& {0 |
Program.argSize = 100; /* minimum size */
6 X) f, m! f0 q& u Z$ l, IProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大: s/ H: j: [% }2 r v6 l8 f9 C5 `
' I; e3 r3 e* A
/* create a default heap */6 B2 e1 F0 Y+ y$ l' e0 b
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
/ U6 G/ D/ t8 ~$ }% tvar heapMemParams = new HeapMem.Params();: g g0 H3 T1 U
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大4 ^1 x) t e9 u1 {' M; T: L0 z
0 ^' l' K- `' Y3 `- B# e& y7 ?var Memory = xdc.useModule('xdc.runtime.Memory');+ |2 R$ D- K3 {; p
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);0 X/ Z! v* t4 k2 X* z* H$ `0 l
. d2 `1 x- D1 J9 `4 x. ^/* configure System module */5 g4 b) [ O% c# j+ s
var SysMin = xdc.useModule('xdc.runtime.SysMin');
0 r+ s" ~7 Q/ j+ g; LSysMin.bufSize = 0x1000;
; {( [# e2 t7 ~' e9 |/ W7 PSysMin.flushAtExit = false;
7 A" f H3 H& k/ k5 h- z7 s. h# B; k8 _
var System = xdc.useModule('xdc.runtime.System');8 h1 x. B: H& I
System.SupportProxy = SysMin;6 t$ D0 c3 f3 x& w, J
. e- m. g" ]+ K2 K- v
/* configure SysBios to use the lower half of Timer 1 */3 q' U- b/ N: v
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
: g" B) ~; Y( x ?; B/ Evar Clock = xdc.useModule('ti.sysbios.knl.Clock');# Y: f0 p" l& v/ t3 D, e P
Timer.timerSettings[1].master = true;7 F; |0 Q% Q. _ H2 M& e
Timer.defaultHalf = Timer.Half_LOWER;( q, \5 I7 e/ j; D
Clock.timerId = 1;
" y v6 e* S2 v! _2 u, h5 I* L, [. i7 a$ h: o+ {- {5 H
, o: m- @+ m7 {/*
6 K: I! b/ `" G! L: Y& `* Y2 ` * ======== Miscellaneous Configuration ========7 c0 b0 Y) N1 w0 { ?
*/ {0 Y7 I7 J" }7 ^; |; p7 M
# ?9 ]7 l R, I1 U
/* set default diags mask */# g* s) z) l% p, d, }& z. k/ y
var Diags = xdc.useModule('xdc.runtime.Diags');. S& w* Q2 s( G3 m
var Defaults = xdc.useModule('xdc.runtime.Defaults');
9 r! O$ Q3 r& E0 S) [; Z* S( F, _5 P- F
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
5 `8 p' V3 l$ h" w0 s+ sDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;! ^8 ~5 q( b* D
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;* e+ v! \; [0 p# C( p* j, x. A
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
+ C6 Z4 d# [. \6 \8 ^1 r$ b% IDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
* P! v- q* W( O1 i# ?; K9 _Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
/ M- T" }& \6 q$ K$ A) n9 _Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;9 {3 Y% H' f0 e, N3 E
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
9 h8 p7 s1 p: j% ADefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;; w. _' D- p' _" ~7 ]; s
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;1 B) V5 y, C2 z+ ?% d4 F7 _* y* R
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
" Y' N9 f! z0 U& ]/ V0 B7 dDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
! ]7 E# L' u6 w9 R+ c; s! SDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;3 @0 c! k) B2 ]; t6 D
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;% X# m& @- T" D0 c3 O
9 r3 S' y7 j: I' e: G
/* override diags mask for selected modules */1 u$ `7 o6 O: w' p! n- |
xdc.useModule('xdc.runtime.Main');: g' h' \' z* t" Z- t' u
Diags.setMaskMeta(3 q, W3 L/ y! D
"xdc.runtime.Main",
: R5 y5 F- c" X! ^7 ` Diags.ENTRY | Diags.EXIT | Diags.INFO,% x/ X) x% A+ [ A8 _
Diags.RUNTIME_ON
' X& o( J5 Q7 f) ~6 K2 T" a);- m/ f: L8 \/ i0 _; v
8 q( C. }6 `7 g
var Registry = xdc.useModule('xdc.runtime.Registry');
{0 ^% C" ^2 ?& ?# oRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
; k! z% b6 B) n9 h% rRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;6 y3 X" \. s) }1 m6 `5 Z- s
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;$ O3 V% m- u0 C0 m7 T
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
' w4 C8 z3 z0 ^! i& R
: o+ A" w* t. r5 j% B, Z/* create a logger instance *// @% {' H5 k5 C% d* Z8 ~% `
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
1 m2 D/ U1 A$ D7 k: X* z Uvar loggerBufP = new LoggerBuf.Params();' p" @+ }- K2 \. d7 R
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
7 G4 ~7 V! z$ m# floggerBufP.bufType = LoggerBuf.BufType_FIXED;
) ^! @5 z+ B3 e# Q$ m2 U
" h( o/ r, q: L! Z- rvar appLogger = LoggerBuf.create(loggerBufP);5 k! g3 M9 ?. m; S3 ^
appLogger.instance.name = "AppLog_Core1";
; X; d V6 u. z7 T" ]5 tDefaults.common$.logger = appLogger;) X- G! H9 M, q5 h, v( c
Memory.defaultHeapSize = 0x8192;
, U9 h5 V/ ?) K j6 t k& N1 pIdle.idleFxns[0] = "&LEDStatus";4 F( F) o% C0 z3 O- y
Cache.initSize.l2Size = Cache.L2Size_32K;
, N! s1 c2 G+ a
4 Q& m, e# A& q! i2 P4 T" V |
|