|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明- u5 s9 ^' I; @# o7 e
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下, r9 k6 `5 ^; w0 }
(不过疑惑的是,为何单独DSP仿真就没有问题呢?) }! O: K# b- P. a9 v5 C% e
^' H# S5 z( Z. ]: r* V是不是需要在DSP.CFG中进行配置
( z1 X( C8 e" ?% D5 j& V4 p# `我现在的配置为2 q0 E" E" H$ E N! Q
" s; s/ Z% u; b1 ~2 e, M6 I/*
K+ g' i% I/ h- y * ======== Operating System Configuration ========) \3 j8 F! V' |/ |# _ r( X
*/
% N& [3 F. @7 [) }! `0 J$ l. H, J$ M u' f0 C/ t
/* no rts heap */
, @4 k Y: Y4 t) ]7 _. y1 \) W5 OProgram.heap = 0;( u1 q& s' H5 P& W" a: l' ^
Program.argSize = 100; /* minimum size */+ w% _1 R# B5 W" b+ a* V0 I1 c: U
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
2 R$ d+ Z0 V. @$ i, j, I( |0 K* ^: c, X- k9 W* u% K! r- g
/* create a default heap */
% Q5 h$ d+ l" {6 V wvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
, ^" ^# \& C! p% I e7 |* _$ ivar heapMemParams = new HeapMem.Params();
+ i# G3 W7 b4 B3 JheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大/ q0 m: n( v" [( X1 `
6 d' ~2 Y7 ?2 h" g& v! @: m
var Memory = xdc.useModule('xdc.runtime.Memory');/ `: K9 ?5 X X/ V
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);4 z) e6 {* G, v5 Y# p0 n
4 b0 A, @+ n8 p# w" w) i/* configure System module */1 M( z5 p9 v( N4 W- W- b" i
var SysMin = xdc.useModule('xdc.runtime.SysMin');" l" a: ?3 ?% o5 V( h# Y
SysMin.bufSize = 0x1000;7 ^$ | @( L" K( J- a* T; S3 y
SysMin.flushAtExit = false;
5 K4 {/ F$ w! F S- y& T* G; T' B3 e+ u
var System = xdc.useModule('xdc.runtime.System');9 O# O! \' l4 t
System.SupportProxy = SysMin;& m, H% G7 _: a6 G
% ]2 V8 P, E4 S. @
/* configure SysBios to use the lower half of Timer 1 */* y7 f: V9 ^3 e1 Z2 y5 g
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');, ]( x5 s( y8 i* z7 @6 q" o- h
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
" x) n5 d* c/ ]: ^- `/ B# FTimer.timerSettings[1].master = true;
( F( w6 |7 ~. r- R6 \Timer.defaultHalf = Timer.Half_LOWER;
) U# @! g" Y8 w+ o% iClock.timerId = 1;
( h, P' U& {7 n- V
+ v, l' _, i6 V1 v5 a: d5 u* d3 b" N' z7 Z8 b
/*
$ D5 ?: u5 g0 O * ======== Miscellaneous Configuration ========
8 ?4 ]$ J0 s6 ?$ d */, }) i% c3 s$ r0 A
# i2 Q9 s. x/ `2 C/* set default diags mask */
+ C! T, k' c6 Y, q: o: fvar Diags = xdc.useModule('xdc.runtime.Diags');
7 ~+ j" p" F, {) i5 w4 t4 `var Defaults = xdc.useModule('xdc.runtime.Defaults');( |8 D+ M! j$ \7 A# y, B3 `0 R! d' c
) Q8 y: g" I6 i
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
) S% @7 \1 q2 H, ~. Q% ~Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;) r# Z# m3 V1 I2 y6 x" I" T w4 f
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;5 @5 r5 v! U9 }# u% H
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
4 k U. q: g% p' t- d5 I6 UDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */8 I, s9 @7 l# o% V
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
1 @0 k$ K( k. K5 C8 ^1 XDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;" {$ I( V1 `& z5 w/ @3 i2 I h! s
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;1 s( w2 q4 F' R5 `; r2 a% c+ i
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;8 c2 I& H; ^" k; b+ L! p! ?
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
" K4 n2 z- H. N# V$ h; eDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
2 m! A C: ?+ ^2 c- {! gDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;3 d# Y$ n+ Q" }7 o# c1 `$ u R
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;& d+ z% _0 R- P! Z0 a( [4 d% q* U
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
2 q( D" b1 Y" a; I
& H. i3 n6 N- n/* override diags mask for selected modules */
* S( R* U; H( I; q' r1 rxdc.useModule('xdc.runtime.Main');
# B" V; V9 t q# k' f6 LDiags.setMaskMeta(
0 t/ l$ J- D) c, @ "xdc.runtime.Main",
# K. U% c" g$ I Diags.ENTRY | Diags.EXIT | Diags.INFO,
! l" }7 e$ ^' z Diags.RUNTIME_ON
1 K5 l' X9 J4 h' {);
5 D& i T2 J. S8 L) X$ l
4 {4 J/ k2 y) J tvar Registry = xdc.useModule('xdc.runtime.Registry');
/ v7 x) E6 K# G9 y# L4 g* f* ^9 ZRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;5 N: ^2 Y i7 m* m& |( z
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;1 P ?8 D; C# _" P+ [
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;' u5 h' }! i3 Q+ l9 {" v) A+ J
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
J1 I; f6 g2 d2 B2 x, L
, x5 |7 i! V; P' v) i% U5 a/* create a logger instance */
9 I) s6 D0 P3 |% q6 k6 Avar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
s$ l; D3 ^/ A; @ k# W+ wvar loggerBufP = new LoggerBuf.Params();/ ?& a; H! [% u3 \" _9 E. g
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
. Y8 g( e! a! c2 F! c hloggerBufP.bufType = LoggerBuf.BufType_FIXED;" w J ~: x( U: f1 o/ G. L
3 f" K; Q! `3 i$ P& M, ~var appLogger = LoggerBuf.create(loggerBufP);
- o: G7 z- ^$ Z6 u2 MappLogger.instance.name = "AppLog_Core1";
+ {" a- w3 f2 p# xDefaults.common$.logger = appLogger;3 c$ c6 O E8 \) Q7 ?
Memory.defaultHeapSize = 0x8192;
7 L1 f A5 B- W$ hIdle.idleFxns[0] = "&LEDStatus";9 W6 ?9 w# j0 I( a$ U: m, Y
Cache.initSize.l2Size = Cache.L2Size_32K;
0 h) x. j4 C5 R* [* z& n2 q* k+ x$ e* R, e) [! Z
|
|