|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
6 }: P5 r4 z6 y+ D- g% x W我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下6 x# ^) G6 [" k! V6 m
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
2 O5 F5 K$ H% F" a3 Y2 h! C5 q- N, g, B- X+ e0 l" n6 A$ L
是不是需要在DSP.CFG中进行配置# i! S. k* s0 [% D9 ?
我现在的配置为- U7 |- K4 q5 n( N
* Q& y. ?. _$ S/*
/ j: n& ]! N/ B6 ~. o' `0 W * ======== Operating System Configuration ========
7 F7 W5 a: C; U4 r( N */
/ m+ h. K# k( d6 o; s* r9 `. k3 N) T0 I# ]7 K9 I Y
/* no rts heap */' X. \4 N6 q2 N) Q
Program.heap = 0;/ a) h$ j, o7 u
Program.argSize = 100; /* minimum size */, d1 z* G0 e: t% G. o, w
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大! `1 q/ g- p& s' W9 `( N9 o2 }
5 K0 w4 m9 C7 u3 i3 I+ f9 L. W U/* create a default heap */
6 M6 T3 e3 F$ s0 c2 }9 k: s: Nvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
. O6 H- W* R" vvar heapMemParams = new HeapMem.Params();
9 E6 N$ G( k" l, b" J# r- UheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大9 t+ K1 }% s, Y1 |+ R3 @8 k/ {
% k( m( j& Y. F( A4 T' ~- b
var Memory = xdc.useModule('xdc.runtime.Memory');
7 e3 ?9 ~, l( E. A- r: TMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
2 _% E: c: e$ w. t9 c
/ v- }5 {3 M: g/* configure System module */
4 e% k: ~/ v* ?( ?var SysMin = xdc.useModule('xdc.runtime.SysMin');' Y7 w: G! f: W$ }2 {" u8 v$ j
SysMin.bufSize = 0x1000;
9 J' C$ a) m3 O l4 k7 tSysMin.flushAtExit = false;( }. C! `& t5 t& q' \
+ x' w1 @$ H8 b0 Wvar System = xdc.useModule('xdc.runtime.System');
5 V0 b0 K/ p) Q, T2 J9 N7 ^System.SupportProxy = SysMin;
# @: e. N* j: C5 y$ w7 h+ @$ x
# D8 u" N; S0 a4 D: Z3 x/* configure SysBios to use the lower half of Timer 1 */
9 O4 [% q7 d- X% v2 s! fvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');# S& w1 P8 m3 `- K& S
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
2 s/ Y1 V" M3 s1 O6 uTimer.timerSettings[1].master = true;
5 C: A* n# {( Y. v, n/ ^1 T" ]3 ~Timer.defaultHalf = Timer.Half_LOWER;- q. ]. Y% B8 b' I) I5 E5 F
Clock.timerId = 1;/ S* f% h, B9 L0 W
/ E/ E( K; p" I% R6 s) G& W7 J7 X+ `
+ D& ~- ^' H# a8 o3 V/*
4 L! q3 T* S4 Y# C * ======== Miscellaneous Configuration ========
3 d7 q g5 h6 p# I; V+ Y$ I! x# H- A- ? */
, o- \; w. {& g, H$ M$ x, V e$ a8 |1 \$ i
/* set default diags mask */8 W+ p" C6 ^2 J& n
var Diags = xdc.useModule('xdc.runtime.Diags');
b1 c1 d. k8 k8 @var Defaults = xdc.useModule('xdc.runtime.Defaults');7 z9 T$ ?5 q4 x" _$ e8 H2 b
( ]0 T) A/ }6 G: V
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;$ U6 t6 L# \" v5 k
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
; S7 @; t# ]# QDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;/ I5 P& \: ]3 I
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
' h; [. x. _% b$ R1 sDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
8 e U' M0 \5 SDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;, ~6 A+ o1 b- A( q+ I" T
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;& A% w6 k9 ?2 R! b
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;, a1 i8 X2 K+ d9 i# Z C& S6 I0 M K
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;8 V2 F5 h0 p( i3 l) G, S
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
0 _" [7 L" \" L3 z: d/ ?6 @4 M0 g4 SDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
6 `6 [2 c& E/ m3 ?4 iDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
2 H/ _" H/ K% l( j/ e4 a; N+ [Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;# F; q y, c; `/ U M0 _
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
% e& [! r" S0 o- d+ u- p! y: D1 T
8 }& V- ~! D/ d1 x/* override diags mask for selected modules */
6 E. {- b9 f& M; s" g r4 Sxdc.useModule('xdc.runtime.Main');
( t0 H" u' j; yDiags.setMaskMeta(
1 l. K$ ]- d' @( g3 ] "xdc.runtime.Main",
2 o9 \# u+ m2 N8 X% |2 g Diags.ENTRY | Diags.EXIT | Diags.INFO,6 y( J1 n) M( F$ P
Diags.RUNTIME_ON
8 u* k7 Z$ ^8 n3 e6 L* T);2 F- W3 Q9 o" }* Y2 K1 w' S: i
D9 c3 ]& x8 I/ Wvar Registry = xdc.useModule('xdc.runtime.Registry');) Z. A. f4 U i+ s
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;( I: [) d3 ~9 e
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
6 N; s0 ]8 z% N% Q$ P! [Registry.common$.diags_INFO = Diags.RUNTIME_OFF;( Z2 K# m" ~$ U0 \. `" N7 |' }+ o
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
" l' S( d; |" P
& E) X# _* v5 G7 u4 Z9 R5 y+ H/* create a logger instance */# v- b' y% G8 t4 K! _: Z7 l
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
8 _* j9 U6 k- j4 cvar loggerBufP = new LoggerBuf.Params();
$ i4 a+ {! H z4 { u% H6 n. m* uloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
% c8 h) K( j9 SloggerBufP.bufType = LoggerBuf.BufType_FIXED;
" K; o; _; R: M& x. ]* I$ l) M5 e
t" U7 [3 {& nvar appLogger = LoggerBuf.create(loggerBufP);3 c. Z5 w) D& X! Q1 L" K2 z7 p
appLogger.instance.name = "AppLog_Core1";
& J+ `) c- F3 \, a( uDefaults.common$.logger = appLogger;
6 {7 }" M( u3 j) ?$ X7 B, JMemory.defaultHeapSize = 0x8192;
: w: L2 u9 k( a- T5 ^Idle.idleFxns[0] = "&LEDStatus";
$ F! Y1 k9 V! j, ?1 p7 a kCache.initSize.l2Size = Cache.L2Size_32K;% H, l0 D% C' e8 [
& L' S% J- Y, p( x |
|