|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
& ^4 O' h- c6 v1 g我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
! j( l4 t. x. a/ K o# U, Y(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
$ a" N+ p9 `# D4 a9 d0 f6 i# h: Q8 V% Q, F
是不是需要在DSP.CFG中进行配置- i L% ?; f3 X) c" s
我现在的配置为! F2 q8 E. u( Z% ?
/ H+ [8 J+ t2 K5 C/*6 s0 \5 O2 v% u2 W7 v
* ======== Operating System Configuration ========6 k2 y2 n( i! e$ z2 M& a4 G1 Q
*/
0 H( Y7 h1 `. u& z
* u5 I6 [# b* y) M/* no rts heap */
' W* V$ \. i" }: e) YProgram.heap = 0;
: r. @0 d) p6 o9 {Program.argSize = 100; /* minimum size */" A( L# b _* E
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大4 ]$ G- A5 G) P4 Y
) w2 B5 O6 @7 q6 O/ q W/* create a default heap */
# k/ a" @4 T, F2 V4 z7 W1 Uvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');( b; Q. H' a# N# f+ Q. j
var heapMemParams = new HeapMem.Params();" |0 c1 O1 h H9 n9 i
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
7 G9 h; G" C7 D0 N% _# K- L q+ x4 j3 w9 U
var Memory = xdc.useModule('xdc.runtime.Memory');( d" ~+ f8 ~3 Q" e; r
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
* v* ?/ C3 y" k6 O- e8 x6 h( f! r) ?" V
/* configure System module */
4 l3 x( I: D3 E @var SysMin = xdc.useModule('xdc.runtime.SysMin');$ c) Q3 P: S% {
SysMin.bufSize = 0x1000;
9 ^: {* d2 _5 M2 CSysMin.flushAtExit = false;( z* z# T; N- ^6 n) N
$ y) {4 o) d/ E! s1 ]$ |0 a5 pvar System = xdc.useModule('xdc.runtime.System');
. x5 S9 M( m3 H& L8 i3 t; Q% QSystem.SupportProxy = SysMin;
( B: K5 t1 S. e4 `
+ `! `4 D9 Q% |7 m3 \/* configure SysBios to use the lower half of Timer 1 */
. y' M) `1 y& ]# V9 |, C4 ^var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');4 D* k& l8 c+ G9 M
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
; q- L# I7 J, TTimer.timerSettings[1].master = true;
) @: U" [$ H; @/ zTimer.defaultHalf = Timer.Half_LOWER;+ ?) H* ~, `& P5 ]9 h+ b6 m
Clock.timerId = 1;' @/ v( C/ R, C
$ R3 A8 \/ y; c2 v- U
; g! M$ d. }' I
/*, H9 h; B* Q# K( H' a# T: @. @
* ======== Miscellaneous Configuration ========" l$ e8 `7 v, N$ R. w6 b8 S; Z
*/- P4 k# w6 F1 ~" W- S! z* { R
1 n6 K; ]0 g! O" {
/* set default diags mask */9 c A. ]0 {( W& G5 @* N
var Diags = xdc.useModule('xdc.runtime.Diags');' d# w, h( S0 k- y
var Defaults = xdc.useModule('xdc.runtime.Defaults');! |% y. t9 X% r& M8 d' H/ h
' f* X S3 g# {9 R
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;3 I4 B4 b# c8 d- \) V0 m' t4 j3 @
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
7 e, D# V" C7 R" a0 n& {3 l" tDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
. T- Z5 U& U& t8 x* S1 bDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */, B' `$ C3 T# v6 U+ s, k# ~' F" f0 D2 n/ s
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
$ N2 q7 Q# l ?Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
) Z6 F+ _; P, o! Z+ z. ZDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;, B+ J, |. |* E* @
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;% ~. B+ x4 n/ o/ z0 q% x4 L% z) L7 W
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;, V1 |$ J8 z, N5 d7 z/ G. A
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
' [" w8 S/ X- Z% I3 a0 uDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;0 F( @) l6 k/ y; J( P, S+ j4 g
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
1 z! |% D: \$ c' p" u1 KDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
2 `6 R$ _& E1 y! E- t3 GDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;/ u$ m: v$ y) G
& [4 }" n+ N y1 B1 i6 \. {/* override diags mask for selected modules */
- ?% N5 V' \$ o. w3 b) q6 i, Wxdc.useModule('xdc.runtime.Main');# ]- \2 ?. J/ X, K( i
Diags.setMaskMeta(
5 I7 p" L) P+ ?, Z( A4 b "xdc.runtime.Main",
% D& Q8 ~9 v7 h5 T+ `$ D Diags.ENTRY | Diags.EXIT | Diags.INFO, v% b; s% ?/ H
Diags.RUNTIME_ON
& W; {" g% `: [2 |/ O( q);4 I) C0 P2 U2 [1 Y% A
+ n% @/ H+ a' A' r6 H( ]0 cvar Registry = xdc.useModule('xdc.runtime.Registry');
/ l B: |' P9 Q4 V. RRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;/ V* b8 o6 S/ |; H& L, J
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
% d8 l2 `% Y a; aRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
5 ^/ |! s, S S8 W: Y, d4 vRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;" f# y& ~, [0 U# y; O( o
2 S4 E! |( D# C/ R
/* create a logger instance */
, m8 s, n" P7 R5 D' [var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');: B/ ^1 k% u# R, {
var loggerBufP = new LoggerBuf.Params();9 `% Z+ K- F8 J; {/ U" d0 g
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
9 i9 _/ x) N& O# C ^; ]loggerBufP.bufType = LoggerBuf.BufType_FIXED;' S% B+ k7 @$ ^; I1 z8 G" y
3 P7 u3 c( J/ t: l& J6 |$ w
var appLogger = LoggerBuf.create(loggerBufP);
" v5 @) S5 [5 @1 J \appLogger.instance.name = "AppLog_Core1";
' a2 A' a, o" S* W! q* g6 C, RDefaults.common$.logger = appLogger;2 h8 D; n. \! S7 \' c1 t
Memory.defaultHeapSize = 0x8192;
' ]+ ~9 w9 ]& ?2 \; gIdle.idleFxns[0] = "&LEDStatus";2 w$ l; c4 q) o2 x
Cache.initSize.l2Size = Cache.L2Size_32K;
7 s0 v3 g4 G4 @; W& n6 M! x* u
) U1 I' G$ k) \+ I4 k- Z |
|