|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明! y6 j6 _6 T7 Q' l8 e
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下; v9 I" O$ O2 E' j
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)( g' O* R' l- y K7 X
" T" k0 ?; T8 S( v% Y* }( W
是不是需要在DSP.CFG中进行配置
8 }. c/ b# D3 x1 u我现在的配置为+ Y0 ]) v4 ^) n" G5 Q$ [
4 u: m) g2 E% o0 |8 @ E
/*6 B8 t( t* {9 C/ C0 ]9 B
* ======== Operating System Configuration ========! _9 \, f9 i) E$ K8 K
*/ k/ F, u: _5 P" D$ u7 a8 g- q
+ U& I/ i- w9 m5 N+ a. W0 I# I" Q/* no rts heap */( D! }2 H' J$ Y7 X* K7 q; E2 p, @# h
Program.heap = 0;
, d& R! g- a7 fProgram.argSize = 100; /* minimum size */
+ d7 a3 V" P/ L# GProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
" E+ D: z* ~4 y: L
% J* {5 ~ b4 Z+ G3 Y/* create a default heap */
0 D9 [ D1 _( }+ h- X. ~/ d; vvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');/ q" ~7 Z8 B3 b2 @7 b
var heapMemParams = new HeapMem.Params();
/ S8 B. h. e, u1 {heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
7 \2 K- x* ~0 N9 {
/ P% P! y: `( \( T lvar Memory = xdc.useModule('xdc.runtime.Memory');1 }: }6 M% u; Z
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
5 r# ~1 Y" i0 Y9 b+ c4 I5 h7 o- a2 \! f
/* configure System module */1 Z/ _! |7 |8 w! Y& }3 @/ _/ }
var SysMin = xdc.useModule('xdc.runtime.SysMin');. a% c3 J& t5 T/ M% b# x- ]3 B
SysMin.bufSize = 0x1000;
0 |' W) }. Z& o7 ^2 D+ ESysMin.flushAtExit = false;
: _4 O% t M8 Y4 a7 X5 X
' T/ q/ d$ c. b- Y" e) W' cvar System = xdc.useModule('xdc.runtime.System');
9 n. q4 L% A) f4 zSystem.SupportProxy = SysMin;0 p0 D, G- s" P- D7 n; E
4 Y) {) K2 ?, s: e& Z/* configure SysBios to use the lower half of Timer 1 */ g/ M8 Z' V, R, w5 ~3 B3 s
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
: N& u6 z; L" l% y5 n3 h1 C0 Gvar Clock = xdc.useModule('ti.sysbios.knl.Clock');
/ X m$ |; P5 BTimer.timerSettings[1].master = true;9 R [5 J* z$ f E: E. G2 L2 I
Timer.defaultHalf = Timer.Half_LOWER;
* q: V: T" Y5 `* z9 ^: h5 O1 fClock.timerId = 1;) a- H) c8 G- I( ]# S2 W
1 Z! M1 C; m! h/ Q/ L- w, j
% p5 X5 I! }! r. `+ R/ P9 ~/*
! h8 t: _) J# S1 s8 i! j * ======== Miscellaneous Configuration ========
0 e( ~7 \) x4 m4 H */8 X4 I) G! a( m% M6 R$ P+ ^
% U) z @7 [# C& e2 `/* set default diags mask */
/ p x9 p. B. Z. o! ]var Diags = xdc.useModule('xdc.runtime.Diags');
4 u9 V/ @# \8 V( _var Defaults = xdc.useModule('xdc.runtime.Defaults');
$ T8 k, v1 |4 i6 G( K8 g' c; r$ L7 _% I- |: _* S5 G
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
3 A8 I6 C5 i$ ?, e& i& g* qDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
0 r: G! F1 e. R2 U k( A; H* tDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
% x& F4 ?4 E. Y% m; k3 uDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */, D- x; e% U$ A1 {! q
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */. q' e5 P5 ?# Q( \! N- k: [, Y8 u
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;( [% s# I0 H1 _: @+ {; k0 d
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;+ i( w1 k: q( ^
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;! V+ s! N6 V- C: H( O" r
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
/ [1 c% P5 l& ~9 i6 NDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;$ C6 I% J: E3 e* x6 p
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
& ?( O C$ c) Z4 o8 KDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
g6 b' v( j# B# z( c uDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
6 O6 k8 b& V1 \4 Z: P: |Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
: z( ~9 \2 Y9 Y/ t0 B3 L; f2 w. @9 ~ e
/* override diags mask for selected modules */
& C! y5 G8 M& Bxdc.useModule('xdc.runtime.Main');0 E: t) o6 B7 @/ a- f
Diags.setMaskMeta(
3 \$ ]4 a2 `8 }4 b8 Z "xdc.runtime.Main",& H+ X* {- p9 C7 t0 ]
Diags.ENTRY | Diags.EXIT | Diags.INFO,6 W; s& b$ @: w
Diags.RUNTIME_ON
( b, V7 I1 y' _. Y$ _5 @);
7 e7 Q) ^" E, r/ ]' T, `& d3 B
; K& F/ U' M% H% N$ ]var Registry = xdc.useModule('xdc.runtime.Registry');/ C4 b% Y8 ~ l
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF; @ S. _. v# I& H4 o- |5 t1 J
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
^: q j; P/ gRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;
% I/ V* ^! ~4 w0 }Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;0 c4 P. B3 {9 N* n3 r, A5 S' `
/ ]* g5 l$ }! D V9 j0 J/* create a logger instance */ m6 F- D2 g5 r7 A( W' T, t) k* m
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
; K: L+ L, a/ b2 g% qvar loggerBufP = new LoggerBuf.Params();, W! s8 F Z8 T- l9 x. R+ M, d. M, q
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */! W$ S- N* @7 J" q6 t- e
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
2 m, z$ c8 H- N9 M
9 u/ |, n6 m* Z1 H9 \var appLogger = LoggerBuf.create(loggerBufP);
6 v$ ?- L) n* j& o0 ]2 ~appLogger.instance.name = "AppLog_Core1";
; n& }0 |7 _# |, tDefaults.common$.logger = appLogger;
, t) V( f5 H7 J: {2 W/ oMemory.defaultHeapSize = 0x8192;
7 S& o7 a, F! ^" b' A A0 oIdle.idleFxns[0] = "&LEDStatus";
& q- t/ m* j* m7 t n( HCache.initSize.l2Size = Cache.L2Size_32K;
5 l/ R3 I: D% w0 T& @% f/ u2 M I( F+ ~' r- S5 R2 P1 G
|
|