|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明9 S# ^. ~. p! c W3 P$ L# m9 U
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
/ ?! M3 ~% D& A(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
8 |) ?. r0 ]& }+ F# U6 |) u1 z6 c) z3 H1 c# g$ e% ?
是不是需要在DSP.CFG中进行配置$ g9 H! _ [% d# n+ j
我现在的配置为
! K6 H6 ~! j4 y3 z: a8 }
$ }. q9 y7 t, t. h7 E# X, J/*
% ?1 s8 F( {2 Z * ======== Operating System Configuration ========0 v! C1 s* B; h+ \5 a9 x, h; F* x
*/6 _1 q6 v7 y6 b/ J, P7 u
/ @. f% Y$ j, K; _/* no rts heap */
4 [+ _* p3 Y6 E. OProgram.heap = 0;2 W6 M) O7 ^* P; f
Program.argSize = 100; /* minimum size */2 @- |" y% x# L* K, }% h0 d
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
* W! n: B! e( D4 S4 z
8 s s l S4 S4 d3 W" E. k( i/* create a default heap */
: f) Z7 ?1 |; q( dvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
5 D9 `% S9 s1 H; Q5 N9 P6 qvar heapMemParams = new HeapMem.Params();
5 S& t. R5 V/ f5 w9 r+ }heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
0 ]+ b% g: L/ d" F! M& Z w) q7 S+ Y, j6 C x
var Memory = xdc.useModule('xdc.runtime.Memory');* O) O3 c- C2 ~: N9 h% y
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
& \3 V' |! d3 J5 ^$ n( z* M, C2 t% q' S3 T+ `4 c; Q( y
/* configure System module */4 R4 U; B& G& j1 g
var SysMin = xdc.useModule('xdc.runtime.SysMin');* [- Q4 a$ }" A; G; U
SysMin.bufSize = 0x1000;
( F. A/ v9 ?9 S$ Q/ _SysMin.flushAtExit = false;9 C, Y# O0 o8 p) U# @' f2 \
& P$ }; R+ P; b% {
var System = xdc.useModule('xdc.runtime.System');- _- ?1 z: A s9 Y1 K5 S
System.SupportProxy = SysMin;2 q" j u" t; b/ C# g
% w; X/ c6 o' j1 i) a: A Z/* configure SysBios to use the lower half of Timer 1 */, z( P6 s" _& r5 x2 M: v* f
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer'); D' Y/ h# ]5 v# s6 J6 U$ \. ]% g
var Clock = xdc.useModule('ti.sysbios.knl.Clock');$ d9 N' m! V) F g: ^( o) F \# g
Timer.timerSettings[1].master = true;0 z+ i) _! g; h. o, A4 j: w
Timer.defaultHalf = Timer.Half_LOWER;, b K" A x- I2 I' G
Clock.timerId = 1;' n: @1 {3 ^) m9 Z7 v: q3 f
, Y7 m9 h3 N! f j: V* L& z# e4 ^+ Q( I+ N
/*7 m! c3 M, U! @2 W
* ======== Miscellaneous Configuration ========
3 ]4 w, }- I6 O: d' R7 n* @( K7 b$ O */2 `$ I+ _/ Q9 N, [/ w( x
8 S- T( y' n, y7 S
/* set default diags mask */
$ Z# | V( `. U0 Nvar Diags = xdc.useModule('xdc.runtime.Diags');
0 @& J* z7 u0 ?4 S% Z6 B8 ?, qvar Defaults = xdc.useModule('xdc.runtime.Defaults');: m6 l- A+ Z8 U R2 c
, H; a7 {: T& n$ U
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;. |# P$ ~; @. n8 g# J, O8 I
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
" A* o ~5 [1 t. w; Y, dDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
, Z2 i) w% z% A: l7 QDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
6 \$ J+ _7 l U3 ~ p: BDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */( q: H- v- C$ ~( u
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
" X0 A) s% u5 o1 t' QDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
% d6 j v4 N2 N( DDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;6 @" d+ W+ Z5 r& L- z
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
& {) h; x( t- k. ODefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;7 ~& J4 Z6 v* i; Z2 L" y) ?8 f$ K
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
* a# x& y. Q7 B% WDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
6 Y1 U, _$ M. y6 a. cDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;9 [: b4 U& G: R
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
/ J( h m( R6 g9 V/ C2 X3 Q, L. V4 L3 D- L6 v! Q1 C, L1 `0 N; A
/* override diags mask for selected modules */
( U% Y$ s5 F/ V& ~2 d) Y) I6 L* Bxdc.useModule('xdc.runtime.Main');4 S S( n, h z4 x" T$ i1 D5 y- H( F
Diags.setMaskMeta(
" A$ p3 A3 |8 b/ t! S# F8 W4 B; M "xdc.runtime.Main",
) Z# {3 o9 @" a5 G" b- p- X9 j6 { Diags.ENTRY | Diags.EXIT | Diags.INFO,6 Z) }( Q! P" Y+ J% Q: m3 x* q
Diags.RUNTIME_ON! ]$ `+ x/ {7 P; ^
);
2 q& D) [7 P9 k Q# W' O0 {+ `
2 E, m* ~& {, ^6 o$ c: z) [var Registry = xdc.useModule('xdc.runtime.Registry');* o9 S# k; k3 z/ h% ?8 R. W
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;0 H3 @6 v8 _" }7 H; r
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;7 r( V; s6 `0 N, g/ C& b
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
) \$ T" ^! B8 DRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
N# ^$ P6 t; Z8 w: @( w5 w! b% n1 ?
/* create a logger instance */4 U5 T& y6 b+ [! n8 O0 z: s- d
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
8 q# [; b: o- l& Y4 m: s ovar loggerBufP = new LoggerBuf.Params();
% b: C W W3 a; TloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
/ q0 t/ a: z( H$ ]8 BloggerBufP.bufType = LoggerBuf.BufType_FIXED;+ K: K& D$ b6 Q+ @' _5 [" i
E* |- O2 W7 m$ k
var appLogger = LoggerBuf.create(loggerBufP);
4 m4 b e' }0 E {6 [appLogger.instance.name = "AppLog_Core1";
8 n. ?8 U; O* ]& v7 r" l9 uDefaults.common$.logger = appLogger;2 m, x! T7 P! H8 N% O$ V! ]
Memory.defaultHeapSize = 0x8192; $ d1 H: _: j; Z: E5 d- r
Idle.idleFxns[0] = "&LEDStatus";. P4 N& p9 S, |0 r
Cache.initSize.l2Size = Cache.L2Size_32K;
8 w$ V1 |% l2 M, }3 u, [' A# [
* C+ @% z2 H; P) w p7 S |
|