|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
3 h/ n' Z1 h" b4 e _5 U7 W5 N" J我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下. E2 I! q9 B$ S5 G" f: @# g" w7 R5 Q; w
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
5 \& Z; S0 u9 ]2 o' Y6 Z
4 b9 L/ ?# r8 F9 _1 H) c. O6 ]' B是不是需要在DSP.CFG中进行配置( {: z0 ?6 v/ b7 W: k: T( J4 m, x
我现在的配置为
9 B0 x! n4 ~( [- K3 M V/ h( ^7 u+ K' g- |0 N5 w! P
/*
q8 K3 I" c5 ~: P2 D2 Z5 a+ l * ======== Operating System Configuration ========5 h; O+ F" h/ E- f
*/! ?$ E- W+ Q" h' k
$ K w( @3 P( n$ S/* no rts heap */
, p5 i {+ v! z: K! r6 LProgram.heap = 0;, H8 `# b; v; g" @
Program.argSize = 100; /* minimum size */+ [2 w) C" h- C9 n1 t, x
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
6 e) F( `0 a9 s, ]1 H3 o/ M9 t- K4 B
/* create a default heap */1 P+ J+ z+ V8 j) ^5 o" e. D
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
/ N% L0 N- Z) z2 G2 Fvar heapMemParams = new HeapMem.Params();# Y4 M# v1 C! r, g
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
2 l( _9 [8 o D. A- Z; a
- ]+ }* [9 b" R" @var Memory = xdc.useModule('xdc.runtime.Memory');. k) z& S0 F3 [. c# X
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);4 j$ S; q. V) R$ g, W- @; X- p3 U
( y7 S5 W9 M" P4 `: Q* |) [- U2 ?
/* configure System module */& n' ]+ Y* {' i# g" e
var SysMin = xdc.useModule('xdc.runtime.SysMin');
( M: L6 `( e. D( e7 d9 {0 n3 NSysMin.bufSize = 0x1000;
( q# w' X' F" SSysMin.flushAtExit = false;
! k+ G. J4 E: u5 i" \( W. M7 `6 W" Y$ ?0 k2 U& V2 @- a3 S
var System = xdc.useModule('xdc.runtime.System');) s% ?. F0 c6 L$ {
System.SupportProxy = SysMin;
8 R) D, d/ S0 p8 G/ X' ]6 T& X% |6 e) H' k$ w$ e
/* configure SysBios to use the lower half of Timer 1 */
0 u5 K: A9 p9 Q% l L+ f$ g2 h% cvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
, V7 W/ M& O% xvar Clock = xdc.useModule('ti.sysbios.knl.Clock');% `0 M j7 a |) e) H" C
Timer.timerSettings[1].master = true;$ v( R0 R3 R; L! z& P n& x
Timer.defaultHalf = Timer.Half_LOWER;, P$ }; H; i+ }
Clock.timerId = 1;8 h+ @8 ~( l9 K
6 G1 H) V: @8 s: {' B/ z# u# ]! t% t: _% r/ {) ~6 _; W
/*
& u; I) c" t Z' l- S * ======== Miscellaneous Configuration ========
& V! ~) ~& Z6 w/ s */# V: R( }0 O( M# L: G0 b
- F8 ?& g n [% Q* w( m+ m/* set default diags mask */
7 {' d3 P2 F6 Q, x8 c* |, {var Diags = xdc.useModule('xdc.runtime.Diags');
3 ~* d) a3 j: ivar Defaults = xdc.useModule('xdc.runtime.Defaults'); Z/ u0 V( D1 K* m! j( T) k0 J2 i
% u* E3 r0 a6 \, Y8 U
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;9 N- N: t1 c* n& |$ B( K f- e
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
/ h% U% C" F3 y3 @7 p& bDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
7 R, v2 f* e3 ~8 T8 Q7 n0 E% _' VDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */! B) l; U3 s* o2 y& c' P6 e ?
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */6 u) N2 H# B1 o, q
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;1 k7 u/ @# N& @3 \6 |+ O# W5 t/ E" r
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;4 {8 M" I6 W! L% |: D- @+ y2 z; h
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
2 u1 w N+ A, D0 Y, j; A! p/ {/ YDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;: k u& v! b/ V P8 P4 `
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;6 R( M8 o" r6 ?3 P
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;6 G! d/ t- j+ s# I9 h
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;7 q$ \1 ?8 T+ O# W [ F
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;* \& x- ~4 J% z2 I& _4 p9 e/ g
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;1 `% b5 s W6 f. k4 q# {0 g9 i
& L" o; j8 r, x
/* override diags mask for selected modules */
% N, X% j% U3 b& ]0 wxdc.useModule('xdc.runtime.Main');
- J$ l% i% P) B& ^" BDiags.setMaskMeta(: K( C/ K- }1 S1 P/ }
"xdc.runtime.Main",6 O# [- S/ `" A: p& T/ H
Diags.ENTRY | Diags.EXIT | Diags.INFO,; {, S: R" p! c6 \/ g0 U
Diags.RUNTIME_ON$ d3 i) E" L: f; t" G8 z4 f. Y
);
; D3 D5 w0 g: m$ o
9 c( Y( |6 D+ Y- m. B5 q: b$ O( \var Registry = xdc.useModule('xdc.runtime.Registry');
, }7 F# L: W9 H# v3 O! ?2 y7 mRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
% U$ B& b) u8 d, T: {+ }Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
6 a1 u/ ]3 R8 y6 K! a0 @Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
$ k0 q: [; i* p+ K6 w7 g% F4 c1 HRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
% }! g7 O/ V1 ]
# p8 W; M# T! M+ }- o: Z [' [/* create a logger instance */
* p; W0 l- W7 _var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');' F% S7 o1 t9 n+ M4 {% _
var loggerBufP = new LoggerBuf.Params();
q9 i+ R; ?' G" PloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
0 m N, H" `# l* B3 J( \7 H5 {$ rloggerBufP.bufType = LoggerBuf.BufType_FIXED;2 |, ]1 o0 w+ D+ a
. h* r3 o3 q+ e4 I4 j! {$ K
var appLogger = LoggerBuf.create(loggerBufP);5 }1 t$ `5 j- L$ ^# }: y: O
appLogger.instance.name = "AppLog_Core1";
, p0 z, u. D3 TDefaults.common$.logger = appLogger;; B+ w! N: C+ M# w$ f w! G( W
Memory.defaultHeapSize = 0x8192; . |4 t6 N8 d4 b. n' [
Idle.idleFxns[0] = "&LEDStatus";
) H3 ]& F. s5 s; O8 y& V/ |" wCache.initSize.l2Size = Cache.L2Size_32K;
" [9 O0 w8 X% y/ T& j$ T( L& o2 a# t& x Y3 I; H
|
|