|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
8 S" S3 @/ }( c6 ^我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下, _3 W! G6 x$ M2 F, A7 c$ ]+ a
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)6 T' j% F% L% S, C
9 k% e( n6 G* W9 O9 v
是不是需要在DSP.CFG中进行配置
/ `8 i8 w% I) M! X$ M, u! _我现在的配置为1 N4 b; o# b7 R" ~) H
# X7 m+ u0 H" v; V) q
/*
' O2 ~: M6 S0 [ * ======== Operating System Configuration ========
& R A! T% m" Y9 C5 M* w$ y */
t" ~6 z; x- k. z+ y: d5 _7 B! t; @3 I9 N. g
/* no rts heap */( K5 N. O, I8 W5 n A+ I& ^) J
Program.heap = 0;
2 p" K0 G* o2 a8 Y' H6 _$ UProgram.argSize = 100; /* minimum size */8 M/ Z7 ?# z+ Y7 R( \- k4 {
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
& D l- w2 \/ R2 P
! P, A, U4 O9 M% }/* create a default heap */
& F6 S' @( }7 g xvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
/ }- |) `) S; g0 Dvar heapMemParams = new HeapMem.Params();9 _' y" Q; Z8 {
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
* T6 {* t$ R, W* P7 r) P" u% M( E( h5 o5 P, }- F
var Memory = xdc.useModule('xdc.runtime.Memory');
8 H v; G0 G% N" y( T" `Memory.defaultHeapInstance = HeapMem.create(heapMemParams);, f8 Z1 U4 @* ?& i# [) p+ z
, v. }4 ?6 [8 L
/* configure System module */* g+ X/ H/ b, q5 k9 w! g
var SysMin = xdc.useModule('xdc.runtime.SysMin');$ _' ^. B$ ?# ]" D. _/ n
SysMin.bufSize = 0x1000;: F% ], P1 Z Y" F
SysMin.flushAtExit = false;5 H' M# L+ M* U9 Z8 J
: g& }' y4 W/ f6 o, i6 g2 Svar System = xdc.useModule('xdc.runtime.System');7 l: J6 ]$ A, }7 b% w6 x% K
System.SupportProxy = SysMin;7 F9 M5 V/ W4 p8 F
% ^; I9 [0 L4 O6 ~* F8 r i* n
/* configure SysBios to use the lower half of Timer 1 */
# Z5 @6 @% C( |2 U6 i8 }, b# Kvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');" h0 c) \3 A. Y' ~+ u4 f, D
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
6 H [! z' Y) b7 D* \% yTimer.timerSettings[1].master = true;
( r4 f3 d+ I+ _; kTimer.defaultHalf = Timer.Half_LOWER;
( L. _) Q; p% p1 r2 @Clock.timerId = 1;+ {- _ t/ R( G, k$ z$ ~
0 m3 z/ y+ t, x: N: f
+ v0 j" Z" {! y1 B
/*
5 Y; W" J" q2 Y) j7 d1 ]/ r * ======== Miscellaneous Configuration ========
( |1 N, q1 X1 U4 \) q& C1 b */
" i( Q9 P# ]/ w& b9 M5 \5 U3 p- T/ ]
1 w, a6 G, h/ M4 T8 h- u/* set default diags mask */
e. t/ S8 s s1 o: _) f7 Zvar Diags = xdc.useModule('xdc.runtime.Diags');
. j5 x' T9 d) y/ T3 Zvar Defaults = xdc.useModule('xdc.runtime.Defaults');: ?& v8 M- s( d% F4 ~4 b; E3 b4 {
5 R [! S; [8 }2 O
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;6 R; i/ t5 G1 D# i7 t% q6 z
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
7 L- `3 L# z u% d% w$ }$ C6 f( XDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
$ v( {" C* }) E$ Z a# A7 eDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */ _; B7 D& C/ {: i( ?& n1 r+ P
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */& S+ j2 @+ R% l3 G- z& D
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
b/ z5 N( L, J# o! r' CDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
7 m3 {+ j" t( h2 r& }Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;5 n* a5 o6 C5 x ^
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF; {: B7 T6 \. s0 Y! Q4 `
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
) {" u1 t/ C% g- T8 NDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;* g& [, j& _) Q: l; d _4 Z5 V
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
0 \: {) q/ r7 Y: G, W) r+ \Defaults.common$.diags_INFO = Diags.ALWAYS_OFF; [* z% n, G5 G- h# y9 T- G
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;/ ^8 I7 [: t, o1 k' U$ R& I
Z4 S9 x; I7 c, ^
/* override diags mask for selected modules */
& U3 y' e* t. }. Vxdc.useModule('xdc.runtime.Main');: V6 s+ Z$ F/ {: _0 ]9 I% a
Diags.setMaskMeta(
" x# i9 [4 S+ f& h, u7 k "xdc.runtime.Main",
8 R( ~3 A8 y6 V+ T3 U* k4 n0 W Diags.ENTRY | Diags.EXIT | Diags.INFO,
6 e, B6 B0 p( V4 Y0 a Diags.RUNTIME_ON. v$ v# i/ P! Q8 `
);
" M9 t4 ^; R# N* I2 F5 X& W8 N# s" S+ A$ _1 @4 C P
var Registry = xdc.useModule('xdc.runtime.Registry');
! }1 G3 M. z- C) [" p! wRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
( U9 f/ b* m( Z8 X6 {2 {Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;* j, h( ?7 V+ i2 }0 a
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
3 F- w! {6 }# NRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;& Y) ]5 _, u k
" E* p3 b5 I3 V/* create a logger instance */
$ }: I* _# ~3 |$ P1 xvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
$ k" p3 L g7 z% _, w6 z7 J evar loggerBufP = new LoggerBuf.Params();
; N, t) Z# ~6 D3 Q( g5 vloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */) ^. s! s& T0 O( s7 A* N
loggerBufP.bufType = LoggerBuf.BufType_FIXED;& A+ X. `" G8 g# W7 V
$ s6 x( o6 G4 }; m8 n8 Y
var appLogger = LoggerBuf.create(loggerBufP);
( F- z8 f7 T8 k: ^+ GappLogger.instance.name = "AppLog_Core1";/ \# P( T, O c, Z- h% l( a( U6 Z0 k
Defaults.common$.logger = appLogger;. M- q. G- p; N/ Q' e
Memory.defaultHeapSize = 0x8192; * t1 q. I% z) v3 R$ K
Idle.idleFxns[0] = "&LEDStatus";
3 C. \- p* Y* H' F5 m, d0 kCache.initSize.l2Size = Cache.L2Size_32K;& i# Q6 y- W" V) z
' G6 b" J/ i* k- Z ?! H5 B
|
|