|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
$ A" ^5 P. Z3 y' S我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下: ?# i1 X3 }* T, r& s5 D8 x
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
/ h% G9 S& s$ L) _8 e+ g# ?6 I: _& h
是不是需要在DSP.CFG中进行配置
1 B+ o+ S- @! I, M. ^( X我现在的配置为) W/ W$ Z& a+ w3 w
' J& ~4 Z |5 \/*
# ^9 ?" v' F& `. k/ ?$ R * ======== Operating System Configuration ========
& G# [- H0 r; g& V2 m *// d1 g) N9 C2 f2 o. E
! t+ M2 c& ^) P+ B" C" x# h/* no rts heap */3 j8 N. t! R% u$ c
Program.heap = 0;* r) ?) E" y+ g; v1 {
Program.argSize = 100; /* minimum size */
) M$ e; v8 z! {Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
! k0 K1 `1 w! T& V! s2 g0 O2 N/ G& C ^9 p
/* create a default heap */9 F+ P8 w! \/ b$ F2 z8 y' w
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
/ S$ v$ K2 e6 c! G$ B% z. Nvar heapMemParams = new HeapMem.Params();5 F9 v4 h8 f8 C
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大6 ~( L# ^+ X/ p- B
: o- l6 q9 p- n! u% l& q& pvar Memory = xdc.useModule('xdc.runtime.Memory');6 h4 n+ j% {0 |/ y; ^4 }7 \
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);, t0 f6 f1 J* g7 m' L. [- }
6 f. j2 u. C8 H' ^7 E/* configure System module */
: ]- [4 l, _1 a1 O) Jvar SysMin = xdc.useModule('xdc.runtime.SysMin'); I! ~, `$ @0 s" M
SysMin.bufSize = 0x1000;
9 c# s' q) Y' L5 f1 lSysMin.flushAtExit = false;
+ G# w' i8 F, B/ t: Q" M& i7 { }9 `# I& i
var System = xdc.useModule('xdc.runtime.System');
4 F' {# a2 d( b, {/ G3 xSystem.SupportProxy = SysMin;
2 v! {7 l" @* O( r7 F& U+ R
! ^- k+ r! `7 R8 A( ?/* configure SysBios to use the lower half of Timer 1 */
3 s6 Q; [" Q: |/ ^& e( i; Z; yvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');/ a3 @+ B3 V- n
var Clock = xdc.useModule('ti.sysbios.knl.Clock');) T M4 K5 b8 U4 b; v3 d$ j& Y% F
Timer.timerSettings[1].master = true;
5 h U% v* h% j' Y7 ?3 K( A- cTimer.defaultHalf = Timer.Half_LOWER;5 b- G4 ^" w7 x( l* h b" [( `' C
Clock.timerId = 1;! u: d* e7 Z( k6 @1 X# j) g
& ]1 g- P- m8 Q6 q W! R- A) r
/*$ m3 g; @/ H$ f! _# p
* ======== Miscellaneous Configuration ========4 X9 \9 ~% N7 z% _2 @
*/
4 Y+ v: R. n4 T } y. w
" k& p- d! \$ }( U/* set default diags mask */3 O" K9 K* d w# m3 G9 ?, W
var Diags = xdc.useModule('xdc.runtime.Diags');; ~1 m/ m8 P- l' `$ [
var Defaults = xdc.useModule('xdc.runtime.Defaults');
6 C! m" Q; W. `+ Y% U/ x l- ~, w4 P, ?1 X9 z$ B
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;" E, u/ w, }( U! P$ ^' @1 c
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
& n2 r+ c. G! F \Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;- K: p; a- z6 [- M( b
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */% L: `% j: c- B
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */$ G! x1 Y8 J+ L) Y- t
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;/ |8 T; h2 |, u4 F
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
3 a2 h& _1 }2 m* GDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;) X! T" k* N/ `2 S: S7 l
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
! Z/ ]( V+ f L/ ]2 gDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
# O( B U5 c2 H# O/ t6 t& X0 G1 J2 I5 PDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;. U# o) q4 M& a4 ?2 t
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
$ b3 K1 U; [* W# ]+ zDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
, Y- {3 W6 _8 ZDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
6 ?- `- g6 A1 G7 v
# E& D4 Z5 a. V# e: [/* override diags mask for selected modules */
: S$ D6 Q( M# |. nxdc.useModule('xdc.runtime.Main');
; W0 c0 D3 z, {" p1 ?Diags.setMaskMeta(0 u" \2 Z f% \' ?8 ]9 U8 D
"xdc.runtime.Main",- _; `& [% v& c+ N: C( a2 Y
Diags.ENTRY | Diags.EXIT | Diags.INFO,/ k5 m2 n/ b$ T8 L' y
Diags.RUNTIME_ON
3 i) T. T& ~" k( z);
, M0 c* N1 }1 z0 L" E
) L$ Z2 L1 u2 h$ f2 w9 tvar Registry = xdc.useModule('xdc.runtime.Registry');, G4 ^8 M1 {# z, `/ G o
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
f4 o% E* q; Q2 p8 Z7 n; QRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
: W0 I8 ?0 f w" X0 E2 GRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
( [4 } Y" k% x( b ]* E7 O: TRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
6 R# |% n3 b7 ~
3 T. {9 H+ {: k" p/* create a logger instance */
) D# m9 R2 o' l1 B5 w0 {var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
' _. {; f- B( l7 K9 g1 t X, gvar loggerBufP = new LoggerBuf.Params();! ]( x+ t _* ^1 l
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
: V0 Y6 C9 @! ~6 ~% jloggerBufP.bufType = LoggerBuf.BufType_FIXED;
, ?( s: [4 N- b5 }0 ]8 l! \( B; D P
+ X3 p: `5 B% W6 \/ w8 Dvar appLogger = LoggerBuf.create(loggerBufP);$ D+ _; Z' R- q$ D$ A) \4 T! F
appLogger.instance.name = "AppLog_Core1";. I$ W! i3 x$ ]$ d( f# X* R2 y; t, s
Defaults.common$.logger = appLogger;& [. I( g! I" T. V8 n/ g; u6 y& B
Memory.defaultHeapSize = 0x8192;
; [& H4 C4 r5 TIdle.idleFxns[0] = "&LEDStatus";
5 l1 ]6 h8 D1 I7 [Cache.initSize.l2Size = Cache.L2Size_32K;6 i& i( w# ^- z& ^6 R/ q$ O! d* Y
# @) d. B( D$ T4 U+ ~. R6 u, s
|
|