|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明- k: o; ]( [, z( b
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下, c& x* \2 }8 V9 z
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)' m+ C( l7 X/ @' n* u9 I1 ]
. s' ] v7 C+ `- {- q
是不是需要在DSP.CFG中进行配置! [4 R' G8 w. I" c% k1 y
我现在的配置为
8 o) u% _+ H9 i# h7 j' L4 t" X V$ G! u
8 `5 @6 a; E: j O( s/*( m$ u1 H% g. h2 `+ v
* ======== Operating System Configuration ========
1 e; T- ~8 z) e! j% t5 N */
7 M% o T) q0 T
" m& d/ q: @# l% P/* no rts heap */6 G4 ]2 B1 C5 g
Program.heap = 0;
# v" v6 Q* W9 p+ OProgram.argSize = 100; /* minimum size */
- J0 |# L9 y; c2 `4 [0 AProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
/ z# R t+ ?/ f. S0 K3 x2 s) u) j8 C0 d2 J" C% l* V
/* create a default heap */
) x- I$ n5 v$ F# ~5 b4 Fvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
3 m2 A! O( E, N7 v5 A+ h9 g5 p Wvar heapMemParams = new HeapMem.Params();
6 i; K: r; t* n( L$ O1 V* MheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大: R E. F. \' h; }" F
1 p; A. B! z/ }% h' ?
var Memory = xdc.useModule('xdc.runtime.Memory');
+ G; V$ I p$ ~, S+ i5 dMemory.defaultHeapInstance = HeapMem.create(heapMemParams);" l, w. I. L5 W8 f Z- v" d
D" m* ~; H0 T; D8 B7 V! l& B2 Z2 h6 e
/* configure System module */5 v5 J8 |8 \' A% N6 K
var SysMin = xdc.useModule('xdc.runtime.SysMin');9 q7 w& U, Z7 t8 J4 H
SysMin.bufSize = 0x1000;
2 {: J* ?" l. B: pSysMin.flushAtExit = false;2 n! M2 A6 q" F* V/ v, U
' \* I9 f* L) N. \* w
var System = xdc.useModule('xdc.runtime.System');2 H8 U9 s1 ?) E o/ f1 ~
System.SupportProxy = SysMin;! h1 h- l4 b- R) Y
, l- _5 Z9 t( y, x% t- D8 g1 u
/* configure SysBios to use the lower half of Timer 1 */5 C3 {! C/ i( d% E5 G
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
$ _! B9 M/ z4 ]6 q. g+ p1 {# Y( wvar Clock = xdc.useModule('ti.sysbios.knl.Clock');+ A4 e' q# P3 `2 s. q
Timer.timerSettings[1].master = true;7 B% i- Y- F4 s$ O( y0 |
Timer.defaultHalf = Timer.Half_LOWER;. }! P" N# x9 S9 l
Clock.timerId = 1;4 K3 i% H) C0 n# U
( l' I) _ b2 y4 W1 P. Y( j1 K( r0 Y- J; B# [1 h3 x" Z. Z- Z5 ^
/*! t/ U2 o, ?2 ^7 V
* ======== Miscellaneous Configuration ========
2 Z. m) B8 F, f4 i) h */
: u& b2 H' c% o
+ Z l4 @6 ? B0 w s/* set default diags mask */; z( P) L- `/ a. _( [
var Diags = xdc.useModule('xdc.runtime.Diags');" u9 h( N" l$ |/ G N
var Defaults = xdc.useModule('xdc.runtime.Defaults');
% n0 n3 ^; R$ X' d# E; v
' t3 S7 W: I; T$ r0 F! P5 z. hDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
+ ~$ O5 B% T8 Y, y3 ^Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;- t: z( B$ E( |9 r
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;# `# A h) G0 c! x& p! p* X' @9 B
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
4 M7 V/ G8 o7 k% ?6 f0 p4 YDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */) Q" Z# [- B6 u* R2 s
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
7 f- g0 g9 [& L5 f/ t9 }5 R: VDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
& t* k q& {) b3 J7 ^! TDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;8 z: R/ A. H5 l/ X6 O4 O8 ]
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
( D! m7 c. E3 m: ?& EDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;) U# T w3 N+ }
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
4 Q/ @1 u: y C& X! WDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;! r6 R( s4 r) ? R" ?
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
6 S4 R! u* J. t; KDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
4 `* A2 V( o. M* w9 O0 }% \. W2 @, b r" R
/* override diags mask for selected modules */4 k$ S& [! P7 x
xdc.useModule('xdc.runtime.Main');# ?( Y. ?7 w- `' k/ l6 M# L7 W$ r k: j
Diags.setMaskMeta(( I0 c) y$ l+ j
"xdc.runtime.Main",9 H6 j9 T% U. D& k
Diags.ENTRY | Diags.EXIT | Diags.INFO,, Q9 G4 O9 k) i3 }7 C4 J8 k. ]' V
Diags.RUNTIME_ON0 c8 Z4 u( a) [+ `3 I) O: g; n6 q
);
% x( J' O1 w+ j$ U4 }+ {, z
; t! W9 n, w7 P6 fvar Registry = xdc.useModule('xdc.runtime.Registry');+ ]: \$ Z% C' u+ I
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;' F8 t$ q; {7 s6 q5 D
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;# i2 g3 h4 @. T( ]2 ~$ q. m
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;0 z4 u: P0 G8 `7 l- u% Y$ n/ [7 ?
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
- `6 C; P+ U6 K9 |/ R" `2 Y2 Y8 M/ O% R. E0 h/ I% P8 V
/* create a logger instance */
) r( U6 S3 M0 _9 E W) G) Evar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');4 |9 X) v0 w9 j* l8 G
var loggerBufP = new LoggerBuf.Params();: m: c+ d8 u! c. h5 B* X. x
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
6 E8 g/ |* w m, o' z, a; XloggerBufP.bufType = LoggerBuf.BufType_FIXED;
, R0 `* }& Y! Q0 G: ^3 d: L4 V, G# P5 p
var appLogger = LoggerBuf.create(loggerBufP);
& U, m1 l: v9 X0 U& NappLogger.instance.name = "AppLog_Core1";2 g# g6 A9 e# t* }5 Z; I6 o- O) |6 a' L
Defaults.common$.logger = appLogger;
& e9 V$ U( O, U2 K# Y+ H. Y/ J7 xMemory.defaultHeapSize = 0x8192; / L7 U2 s8 p0 O5 T
Idle.idleFxns[0] = "&LEDStatus";- a$ @6 g' g) R( \, @" A4 M
Cache.initSize.l2Size = Cache.L2Size_32K;5 Z; H8 I N! _* U- u; h
0 `* N" ?2 Q, e& S2 j9 S$ {- K
|
|