|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
4 _6 x: f0 T% \: x- i7 O4 q3 c我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
/ g4 B; I3 p2 F @9 v) |(不过疑惑的是,为何单独DSP仿真就没有问题呢?)/ E8 f4 e* {$ I
% t7 d( ]" t% ~* z4 i7 N, T, S
是不是需要在DSP.CFG中进行配置8 ^! y4 V8 v1 K. r5 d" Z: e0 G
我现在的配置为
! g) b: I. {+ o) O, E+ P" C* P6 n$ _9 x. | t' Q: d1 D$ u3 s
/*
+ p! y3 R! K" o5 N1 Q * ======== Operating System Configuration ========( P, l' p+ @' q4 r7 D% E' ]
*/
( ^! X5 U! h+ D3 L$ u% k, Q9 H, Q* h6 j! I
/* no rts heap */
: ]4 j* e9 b; C. m. C+ tProgram.heap = 0;
8 G: L1 m* J- Y8 b' _+ h! r/ tProgram.argSize = 100; /* minimum size */4 V2 s" K& k9 o# a* q( ~
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
" u( c9 _! r% H0 ?+ M. {$ Q0 l8 K' U- q8 y1 G2 {8 I8 _& T
/* create a default heap */$ V' {- H9 Q" S/ G! |
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
" P6 E' Y- s9 _& E# ^var heapMemParams = new HeapMem.Params();
2 h- n; B9 u6 SheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
$ d( ^7 f) W/ b6 r$ b& K4 M
( w5 e0 n3 k/ V. B) [( A7 Mvar Memory = xdc.useModule('xdc.runtime.Memory');
, j, `- |8 @3 a3 ^1 bMemory.defaultHeapInstance = HeapMem.create(heapMemParams);- n! I- S3 R8 f" s8 ^1 e
( o/ P3 Q- g- J/ j* U/* configure System module */+ z* D; D& \2 H2 i& l
var SysMin = xdc.useModule('xdc.runtime.SysMin');
$ p3 }% Z8 z" Z# Q6 K- jSysMin.bufSize = 0x1000;
( O3 w3 v8 w/ p0 z& gSysMin.flushAtExit = false;
$ B* p7 i7 A2 h" f( F
S) s* y p" e# @! @. u; W) ~& H, Pvar System = xdc.useModule('xdc.runtime.System');
+ f2 f, d5 Y, ^. T; P; w1 J# vSystem.SupportProxy = SysMin;
! c4 B5 R6 x, o* n1 W
! T2 W, Y' W3 I* N% Z* X/* configure SysBios to use the lower half of Timer 1 */
9 M, H2 w/ s svar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');. O. d1 h* B* y3 r0 @ d! J
var Clock = xdc.useModule('ti.sysbios.knl.Clock');1 g4 ?6 w7 {# T9 s& ~
Timer.timerSettings[1].master = true;0 J- p- k1 ^& c0 v
Timer.defaultHalf = Timer.Half_LOWER;
! q! @" u, L! L1 A) rClock.timerId = 1;) R( ?+ T' r, D
8 e9 B4 ?5 Z+ ~ E
: ^3 [+ `& j' h' D L2 g2 P/*
5 `+ q, W3 C _! i& w' O5 T: t: y * ======== Miscellaneous Configuration ========. z% H' b4 W0 U7 k j# B7 `% i2 ~7 [
*/
4 u/ d# g# h* k+ d% W+ y3 B$ T \- M+ ^
/* set default diags mask */& ^. s m4 P1 {' D+ h
var Diags = xdc.useModule('xdc.runtime.Diags');$ I& x. \) F! {7 Z! w4 x/ |
var Defaults = xdc.useModule('xdc.runtime.Defaults');+ [2 v( E+ g6 {9 v
2 t+ l& p+ G8 Q/ q. n
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;. d+ {2 h" A$ k, m. l: ], j8 \# m
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;( q6 |0 [4 ~* N- u: s* {1 B, n+ A
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
/ ^# h( y" r. ~" qDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */$ h3 K: p4 @. L {" ]/ V! j
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
& L$ e n+ |: v, SDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;2 b6 M6 F1 ]* l
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
5 ?6 k0 A1 |+ ?% v% B5 e, {Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;, ?1 `0 o+ H* A" L# i# A
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
6 l! @1 P- w! s/ C% eDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
, t w0 E! I+ P0 q1 U# NDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;1 F0 P7 U% f; ^9 ], D
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;( Z4 p5 \8 b) m( k ~. }7 N4 o
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
& f/ B' s' l% b/ k9 j9 `$ rDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
( @' q2 Y6 ~8 g, p- C5 C$ b( h. Y
b7 a2 _. k/ S5 d& ~; a* m/* override diags mask for selected modules */
, T6 k: C% D+ {& txdc.useModule('xdc.runtime.Main');
+ e- Z# d! r# ~4 X4 e6 y% {Diags.setMaskMeta(& \6 ?/ f# M' M4 R! Z2 R
"xdc.runtime.Main",$ B' W/ l) g) C. G( V, D. l/ K1 q
Diags.ENTRY | Diags.EXIT | Diags.INFO,
4 A, F3 T+ k6 a Diags.RUNTIME_ON9 @! L' J: o" v& p' {( b/ F
);4 ^) T% _$ X& Y" e* t. @
' h% Y6 m: x/ o- t1 \$ X) svar Registry = xdc.useModule('xdc.runtime.Registry');
4 s" w2 y, N& n* T8 s' _5 `1 TRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
4 g" k8 ^4 m1 r7 n, BRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
$ Y# o- G8 a7 c7 g. J HRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;) p" k5 J1 h8 p6 V6 D# l
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;- E4 R) y; f: T- s6 D
! f: e0 U y6 |2 Y/* create a logger instance */- h, p9 k) { J% k
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
) }6 I; ] q9 [$ C7 wvar loggerBufP = new LoggerBuf.Params();# {' j6 R6 K _. d" F! `% U5 c! _
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */- X# {8 N/ u8 N, J' W5 N$ x1 ^/ w+ G
loggerBufP.bufType = LoggerBuf.BufType_FIXED;! n2 n4 L2 h$ u$ F- S
) c0 n, G4 f7 c. a/ M; pvar appLogger = LoggerBuf.create(loggerBufP);' Q! k& O9 \; W0 s) d2 z
appLogger.instance.name = "AppLog_Core1";
; B1 P0 t2 V2 tDefaults.common$.logger = appLogger;
8 K1 z( b+ c& q0 d% uMemory.defaultHeapSize = 0x8192; ; L9 u w+ b# ?) Y
Idle.idleFxns[0] = "&LEDStatus";0 w0 K+ |2 K" U
Cache.initSize.l2Size = Cache.L2Size_32K;
6 {! h" R2 e& A" h; @( X/ w! A+ T! g
|
|