|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
' W' \/ F( r$ v3 ^+ ?7 ^+ [. z+ {3 K我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
; M* o5 |( Q2 _(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
% t0 X0 b7 {. J/ G$ j6 h
4 k2 S2 @( C- S$ c$ C, G% s是不是需要在DSP.CFG中进行配置
* I* F* n2 a- `- P我现在的配置为; g& Q2 ]* N$ v2 Y+ U7 @
6 {/ j5 i# }. `
/*' t+ d8 X% Y! P; w
* ======== Operating System Configuration ========! L; o3 l% l3 o
*/
1 }* v+ }) H" b# q! t% M0 Y, G" x# `4 n6 p
/* no rts heap */$ K9 Q. L! J2 a
Program.heap = 0;/ k3 R! w4 h7 ^& I
Program.argSize = 100; /* minimum size */& {& w) m3 L& S/ I9 @$ ^' L
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
7 _6 `) S3 N- t; {% U
, |) }- \ \" w3 X8 M7 ]% U/* create a default heap */
2 e3 c0 Z* T, ]0 P) k- S" L+ ]var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');/ v3 {0 j1 T- q( @+ u6 I9 K
var heapMemParams = new HeapMem.Params();
% `0 t( Z. i0 H D4 j, n# T. u! \8 gheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
) ?/ Q) }+ Z1 S# \. u" N* V" F5 ^* S# o) h- ^1 a1 B2 p0 N* }3 ~" \
var Memory = xdc.useModule('xdc.runtime.Memory');: S V& T: j6 ^$ z+ z
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
# p1 J" a, A9 [8 _: c3 U, T" D; ?1 X1 v6 b. ^; E. _
/* configure System module */5 s- l) t0 _6 L8 W9 F9 }4 A
var SysMin = xdc.useModule('xdc.runtime.SysMin');. T) p$ f7 @' M- u# d5 n
SysMin.bufSize = 0x1000;3 L# B! e& [1 _) E; q; ~
SysMin.flushAtExit = false;
$ c8 e" E" \8 Z6 Y
) K& P" y" J+ G2 Z7 Tvar System = xdc.useModule('xdc.runtime.System');" w3 t! a+ W0 V
System.SupportProxy = SysMin;
' k. T: D6 q- {1 E- o7 c& L0 X
6 H( M" Q( {+ W! j1 E( @/* configure SysBios to use the lower half of Timer 1 */
$ Y3 n/ r( P/ J: G; v4 M& F7 wvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');9 U s9 D9 E4 k/ R3 M" n* O) R
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
p! _: ~/ k6 y; u5 YTimer.timerSettings[1].master = true;/ P- X4 W; t; w. z! C
Timer.defaultHalf = Timer.Half_LOWER;
0 F$ ? t6 Q3 P9 V# c; T! ^Clock.timerId = 1;5 v9 q9 e& u* d
v& x8 R9 g* E; V2 S! z' V" a3 Q/ {
/*# T8 d) E3 Z" C5 H+ m8 @% ~8 _
* ======== Miscellaneous Configuration ========
8 u- @! w4 g: {8 R- Y) }( o- m */0 \4 z! \% d" D9 K4 F" |" ^% N
" `% T9 b d) Y4 R2 ^* f7 M/* set default diags mask */
: n. R& [: I0 n4 \9 F# H- u: E! L# xvar Diags = xdc.useModule('xdc.runtime.Diags');
; M1 ]% R, W3 ovar Defaults = xdc.useModule('xdc.runtime.Defaults');7 ^% M3 g M; j- U/ n
& C; N8 u8 ]" K' TDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;) m" w6 G6 {, Y* S% R8 [1 c
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
( X) K/ x2 _6 e' a5 gDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;( ?4 _0 X2 ^1 g8 G- x( s
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
& i1 `% k+ X# z8 ?' jDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
* {. E& i4 V- W1 kDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;7 e5 j3 o) ?/ ^4 j" s _' o/ s
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
" L7 C5 [# H/ [7 R% q8 }Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;+ P& x" `5 q, L# ^6 j
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
; J8 R% c% k, A1 B" l1 _* JDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
! I4 b ^# o( A- a3 ~* O1 F9 ?Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
W: f: e* F/ N) S ^Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
) M% L, i( d5 e9 z. R. M0 Y2 s! QDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;5 K8 u, g5 {3 R% w6 m% `$ D g
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;/ |( H, G2 ? _8 K5 y+ u9 H
! n# s$ \& i* f* X9 R) w( ?# k/ k
/* override diags mask for selected modules */
& J0 x, w0 T7 n; w) D) E8 Sxdc.useModule('xdc.runtime.Main');
. f& Y: ]! Z' d) i: l' HDiags.setMaskMeta(
6 V; C; |' [) B+ R3 P0 z "xdc.runtime.Main",
5 L& o- D( E" V1 I Diags.ENTRY | Diags.EXIT | Diags.INFO,0 q' `% e& K9 L% Z
Diags.RUNTIME_ON( y M: t5 ^' ^! ?9 c! O4 t
);
* j! t" g0 w+ L$ }/ ~7 X" t' n5 Q7 B- v$ E: m
var Registry = xdc.useModule('xdc.runtime.Registry');
& i+ h8 i+ h4 o. n* y7 NRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
1 ^& Q3 U$ x5 Q2 ~0 g# p: ?Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
& e3 M9 Z9 Y2 O5 {) M9 J" GRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;$ i$ t" s! {* Y) S Z
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
2 P% n7 f$ [& z( C4 m
8 @7 Y% T: v' l+ g/* create a logger instance */
7 S: Q* N3 L; ]' \5 z: Vvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
& m: u6 S) T1 \: Jvar loggerBufP = new LoggerBuf.Params();
" N" ?( _2 [& i8 ]+ yloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
6 G4 D) ~. B9 h2 e! {( gloggerBufP.bufType = LoggerBuf.BufType_FIXED;
+ ^7 v9 B0 H+ n' |) G7 U' Q, C, N1 L. d; o; F- N: G0 e
var appLogger = LoggerBuf.create(loggerBufP);
) J4 ?% H% b4 M/ ?appLogger.instance.name = "AppLog_Core1";
& p0 {* M" ?/ ^Defaults.common$.logger = appLogger;7 C) t1 o+ Q' }. ^9 I, P G7 ^8 I
Memory.defaultHeapSize = 0x8192; - u7 I) ^" X& o& t$ r9 L
Idle.idleFxns[0] = "&LEDStatus";) }( r1 p& c: ~0 X# s
Cache.initSize.l2Size = Cache.L2Size_32K;
" ^5 A- N. Q) Y% w* J: B
8 z: g6 K! H! X ?( y- G |
|