|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明+ @/ I5 s4 X3 P$ V( x
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
1 |/ `4 @2 _9 e(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
' {# C# S, i2 K5 R6 @: g: c0 U
+ ~( V4 n# t j# ~6 j8 B' h" y是不是需要在DSP.CFG中进行配置
+ a& B; M1 s; _* V' o0 _' X4 G我现在的配置为0 S% f; h- _1 v' z0 m) I6 T# M
- V2 q) Y5 D4 ^1 n/*0 s, Z' z) {9 m' a! |2 s3 _7 z; Z5 ~
* ======== Operating System Configuration ========
6 A8 E& B6 Y& F9 C2 B& p */& ]& J: z. u; T4 i9 [" f+ Y
1 v5 m, E5 [5 z6 e; z/* no rts heap */& g+ h0 U( J ^2 f3 [
Program.heap = 0;& V* |$ h/ i b" Y* O
Program.argSize = 100; /* minimum size */
; T' R+ h W0 f6 K) s. LProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大2 g2 D; d" v# Q# ?/ s
% y2 B- N. U1 z |; L$ u" f
/* create a default heap */
# d. i) g; f( _$ U6 z# t: `, ?var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');" I4 H6 @) ~0 H3 h6 l
var heapMemParams = new HeapMem.Params();
9 a7 t" ~* y: W/ s; @heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大+ I6 W% l+ b) A4 A/ c( M$ W
0 n/ q: l* N( k2 X+ q5 i
var Memory = xdc.useModule('xdc.runtime.Memory');8 Z! f* B$ U/ X4 z- `+ c
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);2 G# R, B; ]- @& H. x( q. Q" M
9 j) x' d4 Q2 x/ o/* configure System module */# C* q; F0 r2 y B& C: S7 d: G
var SysMin = xdc.useModule('xdc.runtime.SysMin');- c; g; b7 Y3 T
SysMin.bufSize = 0x1000;
- y- i/ u3 q. j9 u! @8 K$ j9 ~SysMin.flushAtExit = false;
8 b' h$ L0 \+ ^
" w7 Z# I% x- \* R) r# ~var System = xdc.useModule('xdc.runtime.System');
7 i1 o4 H/ h( h S( FSystem.SupportProxy = SysMin;, `8 J9 y# W; e4 z, N/ u) s% C
5 i( u' H/ c! a2 T1 W% u# T/* configure SysBios to use the lower half of Timer 1 */+ M; k7 y6 d( K5 j$ I
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
$ l. l) }' Q% J$ G- l' fvar Clock = xdc.useModule('ti.sysbios.knl.Clock');% v# V. H3 Q- F0 u, E6 z0 \5 @
Timer.timerSettings[1].master = true;" t2 @8 p$ t! a8 Z9 } b% v/ u
Timer.defaultHalf = Timer.Half_LOWER;
0 n Z' q" c! G/ I3 ]Clock.timerId = 1;
4 O( n+ U+ A, ~' Q
: V6 b9 K* l2 ?: i5 N
% J: O- s: \3 |7 T Y/*) d; |7 O: n0 X/ S$ A8 {* V. n
* ======== Miscellaneous Configuration ========' J, q1 l6 ]4 f, n/ h* Q- H
*/, ~( e$ `# h4 B2 I/ W9 t: K; Q6 o
' X9 n; C8 p" G( i4 b. W* _
/* set default diags mask */
! Q* o4 @5 s- ^2 e x0 ivar Diags = xdc.useModule('xdc.runtime.Diags');
2 ~0 D! i1 i1 F7 W x9 Evar Defaults = xdc.useModule('xdc.runtime.Defaults');
4 U$ {( E5 @! b* {
+ w& q# t x) \+ Q/ B$ tDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;# X5 Q& C/ }3 { p3 ?8 @- F- g ^- c
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
9 X9 i7 q X- ]. h, ]% JDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;% }* u( q [% f7 f( s
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
2 q1 ^' Z4 D3 A! O( a6 [0 ODefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */1 d5 P8 P/ D# ^( }0 F. R
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
+ Z3 c- e* ]) f) vDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
/ ^( ]. }; d" p. D- WDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
4 h1 H+ Z- s# }$ J5 Q# qDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
9 B5 R9 q$ w, l$ U# f; l _Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
! q1 L) o# n/ [# bDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;8 |5 O& M% a0 N
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
' k% W. m3 P: P! _/ G- eDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
% W/ Z, Z/ f0 |* Z! mDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
* z* P! G: {# }' c( T- Y4 Q
# p. C; r: d! u/ q$ I8 j7 R: O7 Z/* override diags mask for selected modules */
' e" X0 Q7 U- `! j9 vxdc.useModule('xdc.runtime.Main');: _6 t2 P; F+ R8 M( l+ d
Diags.setMaskMeta(
( o$ L! O5 S4 t I. a6 s "xdc.runtime.Main",
8 e, X8 ~: k1 `& _% c5 q% d& A Diags.ENTRY | Diags.EXIT | Diags.INFO,
& f- Y9 c5 u* s; S Diags.RUNTIME_ON
! a' H. y7 u' o% \& |);2 H( a6 \. g% b# q6 ~" I
Y9 ]8 I1 u3 zvar Registry = xdc.useModule('xdc.runtime.Registry');8 |4 k* G# H. [# C4 M3 i& H3 {: D
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
; ?, I4 a2 s* B* o- |Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
3 W$ n/ h5 K m5 bRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
8 ~, m# r& d3 E( F- O' }. B- Z. i# sRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;) s7 B3 B& h3 {( O$ V
2 l* w1 z: O6 ]) K% [3 \- x3 `6 I
/* create a logger instance */
9 Q3 R' U% |- j9 F' D( u7 ?, Evar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');6 S' t/ f+ H& @: J/ V y" i% J
var loggerBufP = new LoggerBuf.Params();
& E _& T8 |9 K& H& A8 A3 DloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
0 Z h; l7 Y5 J9 XloggerBufP.bufType = LoggerBuf.BufType_FIXED;( N5 v4 D! G( l+ k2 d' z
2 L8 f3 ^9 P: v7 F
var appLogger = LoggerBuf.create(loggerBufP);; t9 p _1 G- X- |/ c1 c
appLogger.instance.name = "AppLog_Core1";
+ @. N4 I0 w: W, W2 m' gDefaults.common$.logger = appLogger;/ u( f9 i* e) N; ^( a- t* C
Memory.defaultHeapSize = 0x8192; & D1 G5 Q: p: Z; ^1 E( X
Idle.idleFxns[0] = "&LEDStatus";
8 G: D6 g; y6 }) ~% hCache.initSize.l2Size = Cache.L2Size_32K;0 F! [4 Y2 l3 n2 |! E! k2 N
2 a* c; `2 q6 [4 t
|
|