|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明4 N% R0 Z: p: r( R; C1 @
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下8 O7 L7 R7 ]! t2 l8 [ D1 J
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)4 c# t) V6 d2 `! k! M: a7 z- Y
- S; h" W& b* q" y是不是需要在DSP.CFG中进行配置% z! n+ U8 b f. F$ W
我现在的配置为, u- o$ k6 z" z# {) N& t( S
5 q5 H0 M( |! j/*1 n/ N% q6 J1 W2 z, @
* ======== Operating System Configuration ========
8 B( w/ ~1 N/ b# d# |* E *// k, w9 a0 |- j
2 t2 n) y p! m$ `. D' Y/* no rts heap */2 m+ \1 N! w: R- V' _0 q1 l% \
Program.heap = 0;
# `! o: |9 l+ A9 l, zProgram.argSize = 100; /* minimum size */
7 F( D' ?/ D2 c7 P _& v4 O/ QProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
) y, {: L8 Y5 j" X% O! a1 d
# \+ a& x, ?% V/ n1 @/ @/* create a default heap */
' ]/ b9 s9 ^! Y, e. s( |: Uvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
( l: q9 Z6 P* h, B/ Y0 u; Svar heapMemParams = new HeapMem.Params();, P c+ S( A5 K$ s {
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大. P5 k- {6 B7 j5 l' t
" ~6 [7 i: K) @* ~var Memory = xdc.useModule('xdc.runtime.Memory');
& b. _: H' V$ p/ v% ZMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
' M8 F# w5 C' B# N, q/ y: q4 l
) ]; Z2 L' G) D/ j3 t5 V J8 H/* configure System module */! o+ Y: g9 q6 F5 X2 M+ X
var SysMin = xdc.useModule('xdc.runtime.SysMin');
5 C2 u) ^3 P! H' A3 F) PSysMin.bufSize = 0x1000;
4 |, K# o$ [7 C7 \4 E4 A- S$ v% m CSysMin.flushAtExit = false;
) V5 N2 R" e4 D) T. A1 }6 t
- M$ y$ m% i2 f: Kvar System = xdc.useModule('xdc.runtime.System');
* f# ~7 [5 c5 W: H& y# ~: r/ P3 NSystem.SupportProxy = SysMin;
2 B6 |5 b/ M. C7 |" B" |2 H
3 u7 m* I* [) `4 i/* configure SysBios to use the lower half of Timer 1 */8 a2 R# _* p" w' A2 `
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
! \) w. M+ s) i0 n7 X1 J" svar Clock = xdc.useModule('ti.sysbios.knl.Clock');
) x6 P. u; ~ c& `9 Y, q4 {Timer.timerSettings[1].master = true;. c! d( H/ Y$ y. B( ?
Timer.defaultHalf = Timer.Half_LOWER;1 ~& u, y) R3 V _8 @9 j
Clock.timerId = 1;: I! s: b' B6 r
1 S. Y6 u% |) W' z/ {" z/ {2 I$ [2 u0 ^9 h) F% o9 ?" s5 v
/*
3 }( ~* t# E. b * ======== Miscellaneous Configuration ========; E2 C' L: A7 j8 `# y
*/
9 a0 u' Z; X! N
8 x& S3 R( o0 b& [% N/* set default diags mask */
# P$ H; M( b f; }$ C' P( Y! w' Evar Diags = xdc.useModule('xdc.runtime.Diags');
6 x& R) ~9 |( u* E* Y8 @var Defaults = xdc.useModule('xdc.runtime.Defaults');
9 j0 }5 M; R5 x( l" Y$ @2 b; _
2 A& `" P" F9 B- {" T4 aDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;6 u5 o6 G j$ v4 _
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;* V% W8 B$ Y5 C# ]2 N6 z
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
2 X9 f* Q2 }' M4 @Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */$ I: h) |, k! j5 n
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
$ i' t7 ^) f% P! f9 ODefaults.common$.diags_STATUS = Diags.RUNTIME_ON;, r& t R- V$ b1 r4 Y2 |3 j
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;& v" q- v1 `$ P0 ]
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
, g8 d U* X; s% IDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;, G- ] V/ v2 J
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;8 Z0 o% r7 p% o% w8 I
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;' m6 ~- h6 Y; ~5 r# W2 m- x
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
K; D9 z( ^' X3 s x" l" J& mDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
& F; v! w1 Y2 wDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;4 z8 E% U2 r3 M9 `+ _7 T
# ~, g9 ^, {' P( v5 l/* override diags mask for selected modules */# {# S! C; p: x. I. k0 p1 Q. z
xdc.useModule('xdc.runtime.Main');
) P1 p) s" I( X0 p H+ N' W- _Diags.setMaskMeta(% K1 B6 Q% z* y) J- y$ E
"xdc.runtime.Main",* o% y$ v/ r1 a$ b2 k) @: `" ]
Diags.ENTRY | Diags.EXIT | Diags.INFO,$ w9 N1 t) |4 y5 @( P6 L" a
Diags.RUNTIME_ON
0 h! q5 v$ s" r% u);: z8 m2 F. }/ d- i( K4 j5 [+ I
: n6 D2 T; s1 L5 |8 P. svar Registry = xdc.useModule('xdc.runtime.Registry');
5 B7 C( H2 B9 q, vRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
3 U2 H8 X2 r. z4 LRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
+ T3 s5 s; o$ C. {1 iRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
" j) ^2 c$ |4 ?3 GRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
- I; G, K8 S0 i4 g3 e; d: r" ?, q4 L+ a: N) ^
/* create a logger instance */2 I5 w# s& X$ i2 N& r
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');9 ^ D8 o' J/ p! g) W- {
var loggerBufP = new LoggerBuf.Params();
: ^! S1 X3 H6 q' R/ iloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */! Q( _2 p, h' w& J- T5 Z& |0 y' m
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
( P7 P4 G- n5 s3 q
2 x" ]: k6 O7 ?) v4 |var appLogger = LoggerBuf.create(loggerBufP);* Q- H, w2 b$ x6 L
appLogger.instance.name = "AppLog_Core1";
" C+ H- }+ p, E2 R$ X9 w: }Defaults.common$.logger = appLogger;! _# g+ N6 l( h
Memory.defaultHeapSize = 0x8192; ' e' N3 Y3 x0 d% w' S: o. r5 Z
Idle.idleFxns[0] = "&LEDStatus";) y4 k9 U. |; |7 e! M0 a7 y* _9 J/ r
Cache.initSize.l2Size = Cache.L2Size_32K;
0 V. p/ ^' _0 R# ?' @) n$ l+ g- c4 J: m, h& P0 d9 r. X w
|
|