|
沙发
楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
0 r% K: f$ `: V$ }7 A2 c4 S0 t. |( ~我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下- k6 m% d9 f! ^! t
(不过疑惑的是,为何单独DSP仿真就没有问题呢?); f3 o, W( w3 G# E
* l# q2 J/ V4 ~4 |$ q7 K
是不是需要在DSP.CFG中进行配置! K5 w8 [- I& R
我现在的配置为
2 I/ E- o- f2 W, d m& C4 s+ y: ~7 f; d8 R
/*
3 n& Q+ H* s! a' ^& P * ======== Operating System Configuration ========
$ o1 T8 \) |$ l! H' U6 a+ I */+ Y' P3 L' X, j6 Y3 h
/ Y- E6 h. J- T5 Y1 C( B' B& R/* no rts heap */9 a! Q0 U/ p Z
Program.heap = 0;
2 P# f/ [$ U- y) t9 eProgram.argSize = 100; /* minimum size */- u: J$ f- r- F* A" C5 s
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大# k& I% o6 L7 P2 t( B# g
% m6 E; V3 r4 S) x
/* create a default heap */. y3 E. l+ x5 s1 N
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
) X5 H1 X B, P( Y: Jvar heapMemParams = new HeapMem.Params();
6 P( Y7 ^9 d5 o& BheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
" K6 s+ \" \" i5 q. r1 Z+ R0 G! S1 S" C0 A
var Memory = xdc.useModule('xdc.runtime.Memory');
3 [8 U7 e X3 m: n6 f$ Y) OMemory.defaultHeapInstance = HeapMem.create(heapMemParams);0 T5 k- Q" I6 ?% w
$ Y8 R; y3 o" L6 i/* configure System module */
! t" t# O5 P% c! rvar SysMin = xdc.useModule('xdc.runtime.SysMin');
6 w1 }, G+ Q3 i" V ~' p/ ySysMin.bufSize = 0x1000;
9 L$ c$ z4 a1 k. b' o! j. BSysMin.flushAtExit = false;" n: U: V% ?6 ?$ `5 q. N
) p* O# ]3 M. y
var System = xdc.useModule('xdc.runtime.System');
; x8 @; h; a/ V( @. {4 qSystem.SupportProxy = SysMin;) R( s# C) r" M1 G+ L8 ^6 C
+ s2 i) v8 N& c# L6 S
/* configure SysBios to use the lower half of Timer 1 */
! Z' `, H% S( {) K5 [var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
: I- l8 M$ }9 Z7 |% Pvar Clock = xdc.useModule('ti.sysbios.knl.Clock');
5 ?3 H% j- B) \Timer.timerSettings[1].master = true;
, {4 y0 n1 J, e7 F7 s$ `- _; K: nTimer.defaultHalf = Timer.Half_LOWER;: r& v6 J8 P0 L1 [6 h5 @) V8 C
Clock.timerId = 1;
7 S6 ?7 J0 {; Q: ]1 P P+ M# p" O) `9 J/ l$ s5 Y; N n( F9 I1 C! i
" p6 g p$ j) e# f# }$ _; r/*7 F' `# j7 d1 R* Q5 D
* ======== Miscellaneous Configuration ========
4 w4 q2 t0 S" { */
3 H# K0 N' T: c9 Z: D3 \: ]4 C1 O7 n8 {- ~7 B* v0 J n
/* set default diags mask */
7 r G( m5 H$ _: f9 U7 P( \" Yvar Diags = xdc.useModule('xdc.runtime.Diags');
, J% k4 ~1 S7 } e/ [: p- I) l: Qvar Defaults = xdc.useModule('xdc.runtime.Defaults');
$ h/ m/ |, d; F% n! \/ I* }5 [" r0 o" G7 f
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
2 t/ x" U- Z% w @9 L- w5 bDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;' i5 A# T, q$ p8 f1 `$ H( c1 [
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;9 s8 F- o; Q6 l2 c$ I3 F
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */) r4 `7 {# f! V: m1 ]
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
8 C) X$ F! {7 c* lDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
: ~: f+ U p+ m1 E" ^9 @5 Z; _/ q. UDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;. t9 a3 I5 Z3 E+ l$ L" ?% p; V3 V
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;/ @: k( f* ]: X% p& V
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;! j3 d) v& {& p) \0 J9 `, Z
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;1 S) l6 T7 h, N! H5 }
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;: p- v5 Z( f1 ~# r( x
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;2 q. S, t7 C$ }" L: J G
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;$ {3 {3 e9 I& h
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
' B- t$ ]! C+ [ Z
' H4 V9 F, f4 w) I9 H. y4 h. k4 j/* override diags mask for selected modules */1 o" \# ~1 ?! r8 O9 q
xdc.useModule('xdc.runtime.Main');5 e* \7 ^$ ~1 c; N* T! g% w
Diags.setMaskMeta(
: ~# ?) ?9 U8 P$ g& `: |' l "xdc.runtime.Main",
5 R1 U' q4 T4 N+ Z' p, \ Diags.ENTRY | Diags.EXIT | Diags.INFO,. W$ n6 c, s' P. x, q$ R# M
Diags.RUNTIME_ON
# E5 Y8 y6 @, R$ l; L) W/ B# A* @);+ C. s! ^4 Y" j, ]2 U6 c
8 u: x+ ~7 x# [5 {, V5 P3 q
var Registry = xdc.useModule('xdc.runtime.Registry');) x4 b, @' t# y3 P* L; s8 J! B$ X) i
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
* V P0 s- A0 l7 n/ K8 zRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;# c+ J" `# V6 y
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;3 e2 t+ D) h- R2 i7 w
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
, _% m' y- t$ q6 J
7 i7 b. J3 f" ?0 E4 n& p/* create a logger instance */
. t( N. N& I, P, u% O; ~: z, h. Cvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
( `* Z* L( V% D0 J1 d3 \var loggerBufP = new LoggerBuf.Params();
' ^- G/ `/ @# f& b8 \loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */' \" n+ S6 b6 l V: K" L% S* Y
loggerBufP.bufType = LoggerBuf.BufType_FIXED;( b, C( Z4 a# v
. B7 ?) W' H1 K3 O1 E7 w$ v# ~var appLogger = LoggerBuf.create(loggerBufP);
" m0 }6 h: b. rappLogger.instance.name = "AppLog_Core1";
. R0 x; y" G4 F- w$ iDefaults.common$.logger = appLogger;8 U/ p! A5 q: D2 [; i6 M$ V; N7 l7 l
Memory.defaultHeapSize = 0x8192;
+ j7 m/ P; U6 B/ d8 n# NIdle.idleFxns[0] = "&LEDStatus";8 x* N3 B9 J$ z0 s" S& w( e/ i( E
Cache.initSize.l2Size = Cache.L2Size_32K;1 _" L9 i9 W( H% d
* s2 l# b; o S( q
|
|