|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
8 Y) m* V4 N5 [5 a n我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下0 h. K; {0 Z' ~. \
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)0 y7 F5 M7 p8 ?$ y
7 L) G8 V" k. l% J/ \& x" w8 ?, _是不是需要在DSP.CFG中进行配置
4 l9 S' o7 ?6 ]" _- a1 Z% g3 b0 I我现在的配置为# m& h S* n2 B! C$ \$ J
0 y6 l/ l, M& \# E/ f$ ~/*; S% w4 q a1 @+ ?
* ======== Operating System Configuration ========
l) c- W8 m( h */' h5 z3 J+ K" g5 ]! P7 b
" n) W$ r3 [8 u( o
/* no rts heap */
9 w( A2 g, d5 }& z+ t' ~( @: uProgram.heap = 0;; R8 W8 L2 o b% C9 o
Program.argSize = 100; /* minimum size */0 a& n0 u; w f V; H( u
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大- e5 i/ J9 N' p; n% ?2 p
. p% E" _6 K, y5 k2 I% N* S2 E" a
/* create a default heap */3 e2 ^5 V' b" ]( }0 Z+ S( m; y& y
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');$ ~# W& v) W6 N7 Q9 X' i/ \9 w
var heapMemParams = new HeapMem.Params();0 a" N6 W: X, j% z; Q& v! f
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大$ ]& V8 S) @5 z0 T+ ~4 b+ r- L
: \, c( n, r4 J gvar Memory = xdc.useModule('xdc.runtime.Memory');1 l0 K+ T% a1 `- Y7 H( S
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);: t i1 J' [5 j4 a
+ o+ a( f0 W. ~
/* configure System module */1 I R8 C& P' A Y8 w/ p- e
var SysMin = xdc.useModule('xdc.runtime.SysMin');/ Y! ]; L( @# o* J: x9 y9 H) \0 K
SysMin.bufSize = 0x1000;
( ~, A/ y6 F* SSysMin.flushAtExit = false;, D% D$ F$ p3 Y5 B) x
/ i4 q4 J% ~2 H+ K9 X1 Bvar System = xdc.useModule('xdc.runtime.System');4 l9 P1 P+ \$ y( A
System.SupportProxy = SysMin;
, `# \ @ {, l" j( R7 l5 X2 C: y8 n, e8 `
/* configure SysBios to use the lower half of Timer 1 */
9 n2 A/ m# Z$ A3 a$ ~5 a9 rvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');$ h; Y7 Z, k6 Q0 z$ z7 n8 o
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
) ]4 j! t, h$ ~1 |# c4 bTimer.timerSettings[1].master = true;
* y, I/ D5 ?. e9 n5 n( E; wTimer.defaultHalf = Timer.Half_LOWER;( m, _% k* v# |* o# O
Clock.timerId = 1;
: A% U0 s" ^& D- e' t. H7 g, E; w
' j6 L8 R; \7 I' q5 j% y2 E2 Y C+ o( d; K. I2 S4 _) G
/*
8 M Z( t% x- b, d, ?" ] * ======== Miscellaneous Configuration ========* F/ B4 ?2 J R1 h) m
*/
9 ]3 L9 E9 w ^9 \5 } u5 b- O1 }2 z& H2 d
/* set default diags mask */
( Y9 @, z* @. c& ]2 q& hvar Diags = xdc.useModule('xdc.runtime.Diags');1 j1 p2 m: d7 t; A0 F
var Defaults = xdc.useModule('xdc.runtime.Defaults');
6 q: y; ~/ d/ S- [; t" w0 \' t3 h( ` U( v- k$ o
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;- `5 q/ p% u1 ~7 d- u5 Z- x# r$ L' p. y
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
& f% z2 v. S j$ l2 P1 r' kDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;/ S0 y( b# T, W! a. Q
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
# [. z0 o4 N, i, G6 q/ EDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only *// S6 m2 D) C, f
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
7 i$ F2 p5 V$ b2 I0 i$ FDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;6 d% Z, }# d' ]4 R7 T
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;0 m$ m' @5 h0 {' {, T- L3 J' q3 P
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;- v x" |) d5 e' V; Y* p
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;% V: E6 ]+ n. j" J
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
; p& A8 U C9 \Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;7 I9 x3 Y' q; o# `) M% R7 L+ K$ Z
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;3 }" \- a3 J: k/ ?1 s
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;5 w6 |0 o- H+ [5 n6 U8 K
* \1 y, g5 Z% x7 x/ s8 o4 b4 Z/* override diags mask for selected modules */# m6 }! ^9 \' v. U4 y
xdc.useModule('xdc.runtime.Main');' r8 j3 d) n! _$ p( o7 N1 z/ Q
Diags.setMaskMeta(
( x% C* g! b7 R" ]! g5 h$ O9 H3 v "xdc.runtime.Main",% r+ x& C9 G, a
Diags.ENTRY | Diags.EXIT | Diags.INFO,
$ H, R8 O: c" b3 c. W F/ v Diags.RUNTIME_ON
& P/ [( E7 o4 d2 J);
8 @0 u5 A3 S$ |; L+ `& j9 @- M* Z! m
var Registry = xdc.useModule('xdc.runtime.Registry');$ H/ a! C P5 G$ n( u' m
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;! I# b$ Y- E5 ]3 {* C
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
e5 o/ s c2 w; }Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
, e" p% I r7 G+ tRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;* h0 o) B% ?3 {3 ]( \# r
! C3 n. b( M C: f G9 f/* create a logger instance */
2 P) |, t1 U' \! t! @7 Ovar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');$ f! C9 {0 Z# }! _+ J* R' y7 |! P
var loggerBufP = new LoggerBuf.Params();
& ]' a) X' ~- b' u, n8 Z" \loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
1 W1 o* t" O4 TloggerBufP.bufType = LoggerBuf.BufType_FIXED;
- @5 X; G, `4 ]2 s, j7 ^! U% ]4 u+ z- b# G" b
var appLogger = LoggerBuf.create(loggerBufP);
o/ h' g2 p% n& V- r0 } bappLogger.instance.name = "AppLog_Core1";0 ] [ x( B! X$ e+ U9 g- U2 h9 D
Defaults.common$.logger = appLogger;
0 ?% h6 S; N# _3 FMemory.defaultHeapSize = 0x8192; 1 O+ Q9 d7 q; x* { u( U7 u( K
Idle.idleFxns[0] = "&LEDStatus";" R% C o7 e* |. \( u
Cache.initSize.l2Size = Cache.L2Size_32K;, Z, U( N3 t& O X+ _1 Z; G# d
9 C5 X4 Z9 ?# @5 t/ \; H
|
|