|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
9 W' V8 S( ]0 b' |) k# }' ^我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下 Q" `6 r- U' y6 n: G
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
# w6 i1 r$ l) T4 y$ [0 ?: |( h2 T
; R3 m2 {( d0 n+ ~是不是需要在DSP.CFG中进行配置7 g$ V! u& |0 k# b
我现在的配置为& t" ^9 M. f8 Y/ j V3 @4 k
/ ~ Q- C* V% ]
/*5 Y7 m- D0 w8 R- Z; e
* ======== Operating System Configuration ========" o. V, s2 ~2 y1 v% W5 b
*/
6 A# E1 T* \. }$ g/ W; s+ V, g# z T) z0 [1 j0 D% p* S
/* no rts heap */
' A6 A X) \6 uProgram.heap = 0;% z6 x% [, Q' X7 B- h) p3 I/ I1 S2 h
Program.argSize = 100; /* minimum size */
" _5 F7 |2 ^( EProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大! p' h+ c( v( a6 C. z( w+ ^; I
% C4 u1 l$ p" E( L6 i
/* create a default heap */
8 B" _* D5 z8 Y5 y/ gvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');" a$ i" M8 h: x, C5 f
var heapMemParams = new HeapMem.Params();
8 J0 U! s; q% |0 I' hheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大' I% e, ^7 b8 `/ {5 i) L
* i l# n& ^3 @2 S( z3 k# kvar Memory = xdc.useModule('xdc.runtime.Memory');
7 Y b& o Z5 E1 n& E! B3 a3 ?) PMemory.defaultHeapInstance = HeapMem.create(heapMemParams);- c9 C5 G+ V3 S' }* h
~. B0 e/ O& ~" y/* configure System module */) D U# s+ f h f2 I# u* F
var SysMin = xdc.useModule('xdc.runtime.SysMin');0 B" g3 y" @. _: T3 x3 H- l/ D
SysMin.bufSize = 0x1000;
) a' D/ G) _! xSysMin.flushAtExit = false;
. L8 ?: m$ S* L+ x7 j. L; m6 D1 t. H2 `5 @% b% F
var System = xdc.useModule('xdc.runtime.System'); S# r* i" M- O8 E3 l
System.SupportProxy = SysMin;7 i- l, B6 x# H1 T0 p7 z4 ^
9 W$ T; S, G4 V2 y% e( g. u' K8 q/* configure SysBios to use the lower half of Timer 1 */
$ V8 h, A- q/ u5 O$ S) A: avar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');7 W. l+ G: t4 t/ }3 M
var Clock = xdc.useModule('ti.sysbios.knl.Clock');( b7 [' @+ l W) o9 f
Timer.timerSettings[1].master = true;. O) U" _4 N4 h$ g! f% [
Timer.defaultHalf = Timer.Half_LOWER;
7 y: Q& f' U+ j5 {. R* @* nClock.timerId = 1;
5 H2 Y7 s" k% f0 C! C
1 C# t) c$ Y1 i; o8 U0 e5 j+ N s2 t" Z* |
/*
0 }) [8 U# q( V! i) o. V * ======== Miscellaneous Configuration ========
: D1 R; `3 u8 g7 |1 J! j */
. ^ K7 K6 D S7 p
; |, Z" V1 w w9 f" ?5 R/* set default diags mask */- ?1 ^5 A0 p+ M( A3 K
var Diags = xdc.useModule('xdc.runtime.Diags');" M& K) z& @' v' \2 w
var Defaults = xdc.useModule('xdc.runtime.Defaults');
! Z( B8 o: q2 b$ C
: H$ U3 O- F; B9 M7 n$ _; RDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
9 k8 X: c0 y: W6 E# Q* Z/ nDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
; P$ f' x) ]$ O# x' VDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;* m+ w! c- K+ |, N
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
c$ [/ s& ]! l$ Q+ Q" z7 p% L8 FDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
! J( R# D' U% e3 E4 c) tDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
) F* P( @' P: n! n0 v( D- PDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
4 m7 u$ v9 \! MDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;9 u# Q3 e- z/ a7 f' z/ `3 S
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
! `1 b6 G/ w2 M; w9 |$ VDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;, L ]% H% i# d4 m$ F# U& q) K
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;2 i$ j" l( Z3 R3 ? F
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;- {! e% f4 }' x; ?8 w$ Q9 q
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;3 V9 ?1 \# u* X# Z
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;5 z3 |2 _! N% O' w5 U
2 b; t, E% Q$ w# Z
/* override diags mask for selected modules */
/ y4 }3 P! b8 X5 w' hxdc.useModule('xdc.runtime.Main');0 e: ?9 m6 u" N- t$ ^; B
Diags.setMaskMeta(1 |7 A$ j: O/ ^: u/ p% H8 N6 r
"xdc.runtime.Main",0 f: K) S( `) l; v- V( l
Diags.ENTRY | Diags.EXIT | Diags.INFO,6 o) u S9 B& T3 ?% H
Diags.RUNTIME_ON
& x4 u# ~: q3 u8 A4 D);
9 \9 A( ]% c5 ~3 j3 r4 U6 y" j* e! ?
" u5 x q: D1 Z: |0 m) kvar Registry = xdc.useModule('xdc.runtime.Registry');- P! k. `- P7 g" T& r
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;) e" L; u9 w6 O4 L
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;. b/ b' s# q$ N0 k/ t2 p
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
4 L5 I1 h1 ^! R0 ]( C gRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;2 }+ e) X/ Y# y* }8 F( k
6 C) L, p3 d7 h9 _8 v! y
/* create a logger instance */
1 T! d$ ~% \% y: R+ k0 @var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');' g3 U3 m- I0 O
var loggerBufP = new LoggerBuf.Params();( V" {& M' k7 j1 J) J" K8 P" Z3 L" B
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */) t6 v) S3 w# K- q7 v
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
, [4 b* z/ C) E( r W' u9 [% J3 b a0 p4 G( t- m
var appLogger = LoggerBuf.create(loggerBufP);
. c, v. o+ {: T, E* uappLogger.instance.name = "AppLog_Core1";2 _ |% C+ o: x. Q
Defaults.common$.logger = appLogger;( t: k$ z# r6 X/ O2 i' B R5 E
Memory.defaultHeapSize = 0x8192;
$ y2 e. s6 y1 f* U* s, b& I$ vIdle.idleFxns[0] = "&LEDStatus";
& v3 s9 Q' B3 Z# N. @Cache.initSize.l2Size = Cache.L2Size_32K;9 Z- ^0 q4 r* T2 G* u
( D2 m9 N! l: u. d |
|