|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
6 N' q+ |8 o$ @我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下' {8 R/ \/ _) k4 j% ]# o
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)" ^! j9 L, i4 t
0 C# o4 `$ H$ O ^4 R是不是需要在DSP.CFG中进行配置
3 A# `: M5 p6 n2 X) a( X我现在的配置为9 y7 F* d: \& m4 s
+ b8 [% Q) h- ?. @
/*3 ]: x5 N) C7 R/ @+ k9 P2 P
* ======== Operating System Configuration ======== [- w$ H' A0 v( x, \ m: ?/ r' H
*/
4 ~6 B$ N2 Y1 ?2 ~7 g6 D5 n
! [3 }1 W K7 z2 I/* no rts heap */
! W/ D" t: u0 SProgram.heap = 0;
) B4 p& I7 S9 [* Z+ Y& sProgram.argSize = 100; /* minimum size */* h; M+ n( Z8 P6 {
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
' b0 H* [' r, i( k
% ^8 M* Z5 c5 j" U$ w0 v/* create a default heap */7 d6 c, ` v1 E* ]4 ?' g( l- u3 C
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');$ T' o; c; P& W
var heapMemParams = new HeapMem.Params();. P( S2 J4 l/ v7 a. y4 c
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
( N8 k4 ^7 U1 k
, A- A- d% j' @var Memory = xdc.useModule('xdc.runtime.Memory');8 b! K7 @" S& ]' }* u6 Y7 j! u
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);# Y5 Z/ x8 B3 P6 l8 R9 w. j- V
4 E4 v! Q b8 D& \! B" o: g$ F2 ^
/* configure System module */
' {8 s/ h" B" Wvar SysMin = xdc.useModule('xdc.runtime.SysMin');
5 G' w% p4 @. Y/ a. N% {$ U/ i. @SysMin.bufSize = 0x1000;
) w8 `2 F0 O" V8 b* TSysMin.flushAtExit = false;
% y! S' q3 x$ P, J1 V$ ]
! h& b3 [. t2 E$ I0 l5 z8 @# r3 Dvar System = xdc.useModule('xdc.runtime.System');
6 ]0 p# Y' o' v2 s; g& x/ [System.SupportProxy = SysMin;3 ], ]% Y" E" R* _* o3 [2 y' G
# Z* M/ T2 N+ E8 K/* configure SysBios to use the lower half of Timer 1 */
" g( R) X* o, N" R- Rvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
7 Y+ k! g7 O5 V" @: M) P- Svar Clock = xdc.useModule('ti.sysbios.knl.Clock');
) X, I, a' ~5 {" a6 K! L- u MTimer.timerSettings[1].master = true;
, s& K- }& a2 W6 T3 tTimer.defaultHalf = Timer.Half_LOWER;) J' r( i: m+ c: t! Y- Y: v
Clock.timerId = 1;, ` P0 d4 Z( g. a5 O# f% _
9 L3 H* J" l; ? o' @% {1 t W4 D$ M6 k
/*
f! t3 J1 W7 W' h: E% x * ======== Miscellaneous Configuration ========
1 h( N& z- o! x5 `8 ?( M7 g */3 R0 l( ]* w G. V3 a1 p
" h F& x: V" K/* set default diags mask */
& I9 s+ J+ w; w0 rvar Diags = xdc.useModule('xdc.runtime.Diags');; |/ j0 C8 C' h( |
var Defaults = xdc.useModule('xdc.runtime.Defaults');
! s$ Z2 r6 f' C8 g% H2 K4 D& F7 \3 P8 s3 ^2 m; S" S) N8 g
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;' J8 E6 b8 t; {9 I* K7 e
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
, ^2 r9 G/ G* h, c. o8 dDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;! O$ ~" `7 P! {4 F
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */4 L* `* [# f" a7 i- i
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */9 [3 C. T4 g' e& e& o& f h
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
K/ K0 D9 F0 N2 w2 lDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;0 b* h. Q' e8 C; M5 s
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;6 P( f% x* d$ L0 a% r2 i
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;1 f( O7 C+ P3 |, N
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;" Z. H9 Z, R& _! _3 o( }& f! q, q
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;7 Y, L$ ?. [# [1 C( Q6 y
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;6 U' r. ` p2 ?( W
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
* C8 a' H" D$ ^1 b( q8 wDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
# H. v2 I5 P$ O1 S* ?3 N- Y
0 D8 L7 t% o; R3 p/* override diags mask for selected modules */
" M0 V; M: }/ G7 v& ^8 Rxdc.useModule('xdc.runtime.Main');
+ C1 ~/ N* W; CDiags.setMaskMeta(
/ z- i. R1 O$ P; P% X) S6 X5 v "xdc.runtime.Main",: X ^" [! y$ y6 u
Diags.ENTRY | Diags.EXIT | Diags.INFO,
( D+ x0 J/ d( e! f Diags.RUNTIME_ON. B9 H8 {" H. k. T+ Y. F
);5 U. z3 j! I! }* ?- L2 i0 t
1 {! G4 o/ E& ~+ L$ ]; p4 b1 @var Registry = xdc.useModule('xdc.runtime.Registry');
. \) u: t6 {1 R; e) I' r4 rRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;* S6 w1 I9 O! ]% n8 o
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
, B: D. M! H- `6 O3 R6 ~( WRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
, f6 f, s; o- n; tRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;+ b9 R* h9 X* b) w; @
6 x9 Q2 ?$ l4 F' f% o/* create a logger instance */ \: \: U" ^5 W
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');' ?: i: {# F. W) S( m
var loggerBufP = new LoggerBuf.Params();
w D3 F8 T5 a" g$ mloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
) _8 }, ]2 B! G C# @" I" tloggerBufP.bufType = LoggerBuf.BufType_FIXED;
# L5 e3 c: s3 b* p6 E* D% ~
! M) Y: A2 a$ o" Evar appLogger = LoggerBuf.create(loggerBufP);
* W1 M g1 D1 Q; H, V' GappLogger.instance.name = "AppLog_Core1";/ V$ p( a7 n+ e* @8 s* P
Defaults.common$.logger = appLogger;3 }. b, }" V+ _& ~
Memory.defaultHeapSize = 0x8192;
* B6 O7 ?& B/ C6 v! gIdle.idleFxns[0] = "&LEDStatus";
5 l: U3 [. Z+ r/ c1 ZCache.initSize.l2Size = Cache.L2Size_32K;/ W4 O1 z$ Z5 h; x N- P+ I
: b# O6 m: M, g% J( [5 } |
|