|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
* h: n w2 Z% p2 p我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
/ z2 n: Y: Z7 n# F, F(不过疑惑的是,为何单独DSP仿真就没有问题呢?)! T I$ G% b2 E. f
- f* N$ F$ {6 p是不是需要在DSP.CFG中进行配置
6 o9 U5 B8 G' i& L- j我现在的配置为8 S3 g' C; h/ G" A# W" `
* O% w6 }9 ?( X/ H6 a! M/*
; N' ~# |3 D# R% t3 h0 r2 C- t * ======== Operating System Configuration ========0 ?1 ^' C) Y9 v4 P3 e
*/+ p. {" @: _8 u0 ?
$ ]2 B/ X N& l! r2 Y' O/* no rts heap */
, z' J4 T% Q0 F9 S& K: ~Program.heap = 0;
/ X- K. Q. W0 P( a5 X5 gProgram.argSize = 100; /* minimum size */
+ B' C$ F6 e R1 W! G; PProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
3 m4 v8 j# {$ t3 C+ D* N3 K
" f- r' Z1 B I/* create a default heap */6 l' P) W: e4 C/ Y2 T
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');* P% t! V! _+ y0 u) e+ Z3 {% ^
var heapMemParams = new HeapMem.Params();4 R: G/ S2 S3 U; Z: W: I$ ]- x
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大 X6 C2 ~3 {" B. N* k
; ^* x l) Z3 Evar Memory = xdc.useModule('xdc.runtime.Memory');; I/ {; D/ g$ g. U2 ]+ c. h/ c
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
+ l/ t: Z1 r7 N: h) i5 |
0 K. V2 A) A0 w* C, u2 ?2 _/* configure System module */% E. Z/ A0 k3 v+ h
var SysMin = xdc.useModule('xdc.runtime.SysMin');
7 N- p, H& G" ~+ F- VSysMin.bufSize = 0x1000;
8 O& E" a/ W0 o6 \0 z( }! SSysMin.flushAtExit = false; P6 S7 @5 d3 e- J' c# r% X
& l; n# s0 V8 k& p2 `( j
var System = xdc.useModule('xdc.runtime.System');! i7 W" G% A0 {$ v( Z; h" ~
System.SupportProxy = SysMin;6 X: e" n! d& r6 L8 ?1 o) E
; ^2 T8 `/ Z* M7 X# C; X/ M
/* configure SysBios to use the lower half of Timer 1 */
9 I% p6 K' `+ w$ ~, ~ y3 C9 ?" L2 yvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');5 a* X1 N/ c; J
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
* y2 h& m7 j& }1 Z/ w& QTimer.timerSettings[1].master = true;; o1 a3 ], v. s% q+ h+ Q/ ^" T
Timer.defaultHalf = Timer.Half_LOWER;
W9 \# E0 R0 X- r" p u* T* qClock.timerId = 1;" e) T% o; e' j& x6 D' _/ F" X
' ~. \, V& k, B5 z9 m4 f0 r. I& `1 u4 D7 w+ t( H
/*9 c' r0 M0 u: t9 b. P3 Y
* ======== Miscellaneous Configuration ========
7 _' S# d0 p1 U p5 c+ d *// V3 _% F T! R/ F7 C
* W, \: M4 d3 t. B+ U; y/* set default diags mask */3 v( x4 G% x% b
var Diags = xdc.useModule('xdc.runtime.Diags');
' n3 |' J3 K3 b+ M1 ]var Defaults = xdc.useModule('xdc.runtime.Defaults');
5 G0 q+ }% s" Y" G0 [9 L1 ^
" {3 W6 v v9 O( u( i0 VDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;: P+ h% }- a% X' B
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
8 L7 P. R0 x6 N& a9 J; o/ n! GDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;4 r2 M: v* }) F" L
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */* U, l3 l! r6 S! ?. x
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */ z1 H2 d0 d1 _! j- o ]8 |
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
/ ^2 Y/ N3 Y9 I: f$ tDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;' [' s( x* z" B- ?+ f
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
7 q7 {( k& ]1 o+ F+ K5 {Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;$ D6 @# B* Q2 r! V8 }4 z- Z% O6 u
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
2 V9 {! F7 Q6 xDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;- ^. }* K4 s' \! Q* \2 {) l
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;) a; k6 c: V4 o% x
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;1 M* z: v9 F( L& w# Q) h& `- C
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;7 ~8 W4 m, m6 V8 Q4 m
0 j$ P1 G9 i# I
/* override diags mask for selected modules */9 k8 R! e; h( b# K6 k
xdc.useModule('xdc.runtime.Main');
- W. x- P. Y0 ^+ ?Diags.setMaskMeta(/ x* ~5 h- B$ h: s) U6 M
"xdc.runtime.Main",
( D' }/ k: z% x, a' \5 y' J Diags.ENTRY | Diags.EXIT | Diags.INFO,/ P6 n( g* h2 m
Diags.RUNTIME_ON
: t8 l1 s1 j! O);% l$ y3 e' J# a% t P8 e$ M0 E, w3 C
) V8 h. H# q' u0 e2 L
var Registry = xdc.useModule('xdc.runtime.Registry');& g/ t( }9 d; R; o) j, l
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;* r6 p" O" P4 {7 E
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
% O) i0 [- f. ^% n# VRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;1 I; I' n% C( C- R( d
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
, ^6 Z$ {( Q2 [: d3 f
9 n9 G3 k! M+ [' A& r/* create a logger instance */& K- a3 t4 P) S" j( P- e
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');* r8 O7 v6 f2 `- M; u
var loggerBufP = new LoggerBuf.Params();
3 H. k% u" Y5 a. f# J; xloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
& ~1 Z1 U3 u7 J. X+ K2 @7 wloggerBufP.bufType = LoggerBuf.BufType_FIXED;) }0 L+ \* I% q. n" J3 c! z* {
" v: a: i( x4 v0 J/ j' K# Q) X4 P
var appLogger = LoggerBuf.create(loggerBufP);
* w* |+ Z6 f4 @* c: \( ?$ iappLogger.instance.name = "AppLog_Core1";
! I2 `) g$ U2 s) c i4 TDefaults.common$.logger = appLogger;% C# }/ J$ w( D1 T, t
Memory.defaultHeapSize = 0x8192;
2 K# B% Z. A; m9 C- V6 j; N \) hIdle.idleFxns[0] = "&LEDStatus";
% N; _2 S" D) y7 ?8 m: W; dCache.initSize.l2Size = Cache.L2Size_32K;. E. U# g' U. }2 z9 h/ K
6 c. T# E" O7 d% c |
|