|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明! e) [ `- m9 P/ h+ J1 X; {4 m' ]
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下+ n/ ~5 Q! S% a6 O* j0 C% j/ ^
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)5 N* l* b+ [+ @5 Y$ {' G3 H* R
0 Y( `/ s7 P- w是不是需要在DSP.CFG中进行配置
9 y0 }: I' s' K# C4 G我现在的配置为
6 J0 d. F1 j- S/ U6 z c, z
6 P. S# b8 W5 D' F6 J/*9 l. H) J& [9 @ ]' B. z8 w8 t
* ======== Operating System Configuration ======== u6 ~: Q# ~, q( a1 _8 e3 H
*/1 [: t& b% Q, r2 p& y+ [
* l# s" S" O3 J. D# R2 u
/* no rts heap */
* Z3 H: Q, I3 J$ XProgram.heap = 0;
6 w, ~2 w( R# S+ k+ [: RProgram.argSize = 100; /* minimum size */- O/ G5 m; x* J7 p7 S
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大# H4 |6 S9 y, B: @% w
! I3 e& R& p) ?$ e- b
/* create a default heap */
( U6 h& ], B, }( Y. C" i ~3 x9 avar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');8 S. r3 W$ k0 ^# @
var heapMemParams = new HeapMem.Params();
9 l3 \+ g& K1 J$ ]6 eheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大: S. t' y, J9 Y3 w
f- k% f/ P2 d Q$ w3 q
var Memory = xdc.useModule('xdc.runtime.Memory');9 q3 A' Q& L, `6 e7 F6 H5 Q! q+ y, X5 S
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
6 y( b+ F% C) [1 V" \
0 @6 L6 q8 o* b- v/* configure System module */
6 d0 S5 b5 }) N$ F$ z' b7 c6 B5 S( |var SysMin = xdc.useModule('xdc.runtime.SysMin');
, J! k1 Z7 J. [. Y2 m; |SysMin.bufSize = 0x1000;( E/ g! `9 u2 n N% D3 ^8 J. M" a; i! r
SysMin.flushAtExit = false;
2 C9 T" a }" N9 ~2 l3 b. I! O) w
- q; A$ `$ }" ]1 f( _+ `" C: I# ?% Wvar System = xdc.useModule('xdc.runtime.System');5 {6 K2 D+ G# c1 `. w
System.SupportProxy = SysMin;: b( k9 X- M4 c9 q' p( C6 T
# D3 z$ N' F" L: |! Q
/* configure SysBios to use the lower half of Timer 1 */
3 c" V: M6 l& N5 E" h8 Fvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
( r' h, k( z5 a1 M! o! o6 ?9 avar Clock = xdc.useModule('ti.sysbios.knl.Clock');& d5 F* z* h% F; h% O4 P
Timer.timerSettings[1].master = true;
5 f1 b" W$ i/ A0 Z9 c, [+ C6 @Timer.defaultHalf = Timer.Half_LOWER;& @. e1 m. q0 ]# C& B2 _
Clock.timerId = 1;
: c2 V- k) s5 B2 x6 `9 i% b
2 W5 L; p3 c5 y! F
& L7 o5 v3 E+ t( Q5 g: u& g/*
; a+ v& r# b' ? * ======== Miscellaneous Configuration ========' [4 Y; V% I7 a, Z
*/
* Y/ Y' O3 g- Y/ K+ l$ x, b5 F
1 @% h; X( y2 c0 ^4 Q/* set default diags mask */+ q1 t1 ?' w @. H
var Diags = xdc.useModule('xdc.runtime.Diags');
' H1 _3 q3 ?1 R- v! lvar Defaults = xdc.useModule('xdc.runtime.Defaults');
$ }) j) v s t6 T9 q/ z2 F
. W- ~& o1 o+ |9 r3 }Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;& u* c8 `( ~9 l8 d" u5 ^ t
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
( ^4 H/ L& |0 h7 m5 f" yDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;) L" K# ^% Q" o* k; N
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
: z( R- F: K4 W: N1 s ~# _4 IDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only *// B, x2 b( d1 t: w. R
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
0 m: m. N# T9 W( U$ |& ADefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
( C' U& H0 f+ _: Z8 y/ z! v# YDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
7 z k8 k+ ]( aDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;( _! a6 P; m4 s2 @& C' O* t
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
* c* k: K9 S0 y) J( j- q" K; x5 SDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;/ f. {4 T% A" q) c, a' J7 l! I
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
* y% L% `* g( q# E2 ZDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;! b' C' h* S& j% K2 p$ Z; Q. F
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
8 u. c1 B9 ^& [/ m6 T# j
) O6 e2 q: R; S; N. h+ i/* override diags mask for selected modules */# t$ O$ z P$ f( o- J
xdc.useModule('xdc.runtime.Main');
, R3 c d5 R4 I+ k1 @Diags.setMaskMeta( X7 O& w+ S# _; N$ j8 k& M# G7 C
"xdc.runtime.Main",& z3 h6 x- m" G: y7 M
Diags.ENTRY | Diags.EXIT | Diags.INFO,
% j( P7 y0 Z* v" g: T8 Z0 X Diags.RUNTIME_ON: {& s/ v E4 ~* T" D' p5 o
);' w) [& Z- Y5 ^7 @" I$ Q0 w9 d' N
9 l, {4 C, V( H$ l4 m0 }
var Registry = xdc.useModule('xdc.runtime.Registry');6 i" f! W6 Q; ~6 z
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
2 K. l1 H4 B5 J5 PRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;6 r, u3 p! W8 Y( I; X: N5 B T7 B
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;+ X; }* H# I2 K5 _% m- d
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;) J! `, y( q; V- z6 j$ ?' N
; g3 {, A# e( P4 G/ A" M/ Y/* create a logger instance */
; v s* B0 ?' ?3 r. u9 \: w5 k) _var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');2 w( F/ \9 g$ J3 ~+ N, J
var loggerBufP = new LoggerBuf.Params();
( c2 P) h4 @& C7 i0 u& n6 qloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */7 X( z1 Q7 F' Y1 t) B) C7 e7 s/ m
loggerBufP.bufType = LoggerBuf.BufType_FIXED;, D- m+ u- r7 H3 H
3 h( l( X# r6 d8 ^var appLogger = LoggerBuf.create(loggerBufP);
1 R9 B4 Z/ m- N2 _% ? W6 E yappLogger.instance.name = "AppLog_Core1";
$ z+ x3 Q$ Z( Y$ a2 s& ODefaults.common$.logger = appLogger;
7 e8 E7 \9 J8 W$ X& P# p7 MMemory.defaultHeapSize = 0x8192;
" Z+ y3 r" d$ w' }3 PIdle.idleFxns[0] = "&LEDStatus";; P3 f0 q8 l% V! L; r
Cache.initSize.l2Size = Cache.L2Size_32K;
J4 e+ s6 Z. e
, f8 n( Q D" N9 r# @ |
|