|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明; L5 H# r: r! J2 ?: o3 [1 Z
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
# h8 a* \* |# n1 K* A(不过疑惑的是,为何单独DSP仿真就没有问题呢?)! _1 q: W7 ]6 N: F2 s$ p z
' A3 J6 \# m, |是不是需要在DSP.CFG中进行配置
5 V, g& C' }& v) M' G. D4 R我现在的配置为
# i W/ _' B; Z" N; F( ]. r. }2 V" g* f3 x# D* G8 x
/*% @- Z6 u) ^9 x6 c
* ======== Operating System Configuration ========$ S9 f& s6 \# ]
*/# n8 X0 M2 f% N, `/ H
- H0 e; O# P5 n/* no rts heap */
6 f9 [9 f% W5 {3 F' j7 m" f& F4 `Program.heap = 0;
( h I% }+ \" |5 y8 d' P3 rProgram.argSize = 100; /* minimum size */
2 g, t8 S/ _8 uProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
$ L+ i! p$ o0 @8 g2 R m& e) r5 T2 }6 l3 u
/* create a default heap */
6 t5 B% O- Z/ ]! e" z8 |& _var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');6 I" W7 W$ c0 k4 ]2 `( K
var heapMemParams = new HeapMem.Params();
; K" [2 h+ {" S f7 lheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大; y8 V1 r: h- A+ `6 `/ ^& z
4 ~& d2 ~" p6 S8 zvar Memory = xdc.useModule('xdc.runtime.Memory');
) W1 k0 P" S* z' @/ _: @) }Memory.defaultHeapInstance = HeapMem.create(heapMemParams);. G9 V) {3 t t9 d7 }
( S2 l5 @3 K$ \3 k0 j; ]" B7 V) A/* configure System module */
: o4 m8 w' T& V( Rvar SysMin = xdc.useModule('xdc.runtime.SysMin');
$ n: K/ A" s% r% }) c6 \SysMin.bufSize = 0x1000;, L9 I" B" O% x6 _1 g% R
SysMin.flushAtExit = false;
0 x8 K' i, E' W" ~4 ^( c) g& ^4 l) g7 S- P+ J! J) ]0 d7 J2 d
var System = xdc.useModule('xdc.runtime.System');
7 I9 T- _9 x8 S" q* R6 GSystem.SupportProxy = SysMin;( S. o, j+ l' O2 D4 l
" o7 b- A \9 o6 c/* configure SysBios to use the lower half of Timer 1 *// ~9 G* e% o9 s, j9 T2 j
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');8 e% j4 a4 p! J# d0 O% v
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
4 b6 s6 p" b2 g/ q9 a XTimer.timerSettings[1].master = true;4 r" v2 j! N$ K
Timer.defaultHalf = Timer.Half_LOWER;
& b5 D( K; @/ m1 H! a7 eClock.timerId = 1;( X1 O' r' l# g
* E8 A; @! f% ]$ l) c% v
0 r9 @% F( _* N/*
4 D3 j5 M: O8 A' w1 e * ======== Miscellaneous Configuration ========3 a8 A$ h3 s [, m& t
*/
4 F( E/ A$ _% g/ q; M
; Y2 L- M7 o$ c0 I5 |/* set default diags mask */' Y/ V5 I2 s4 q/ i: T; b* U. _4 w
var Diags = xdc.useModule('xdc.runtime.Diags');: ^4 G3 B6 w7 s: _3 X; w
var Defaults = xdc.useModule('xdc.runtime.Defaults');
% k" b7 D3 R x; m% y
8 P1 @/ ^# z) Q$ vDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
# y2 P+ `0 @& ^: vDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
6 D9 K1 ]9 e$ c% d; {- ZDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
9 s" X% Q7 o8 A; k7 b* aDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */9 Z' ?1 \% m" j2 E- o/ ]2 `
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
' _9 |6 v/ ^. H8 F+ H9 hDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
6 L# a6 ], G1 P: i( _Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;2 c4 F. v8 Q8 I- [; g
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;* t1 h. g( H) j1 _# ~5 R* D
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
1 I9 q8 f. @$ |# ~$ xDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;% Y1 F% I; v5 o q4 Z
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;, I- r1 u7 `) m
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;* Q$ u$ w% _7 |: P: y6 a6 {
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
2 _! S# x2 x+ m* s. d" E7 `Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
8 r7 M9 V+ `/ Q7 ^5 _
7 H3 B9 A. X- Q0 g/* override diags mask for selected modules */4 o- z6 P& Z* w7 t) H" P/ m7 X
xdc.useModule('xdc.runtime.Main');
; T P" Y9 J! N* J$ W& A1 ?7 \Diags.setMaskMeta(
, {2 }( s* y7 ~3 D+ k; D "xdc.runtime.Main",
8 F- @) D1 {: c3 ?0 Y; D' C4 o Diags.ENTRY | Diags.EXIT | Diags.INFO,0 X6 Y+ F* p. C! d* \
Diags.RUNTIME_ON
) B5 O/ Y% V+ r( b);5 h$ |) s* M% s; F7 p0 D8 r
( o* L" d- a$ |& A2 b# ]0 C( Rvar Registry = xdc.useModule('xdc.runtime.Registry');8 @) G; p. h z2 K; I% v/ c! T& K- r
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
# e! J4 V! m& X! Q$ L. n$ GRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;4 Q3 ~. A3 p' U8 |6 I" K
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;" q& E# m9 q9 ^" R
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;, ^- y- n; m7 m2 L& I+ V0 E
# a2 d3 E% K3 B, G
/* create a logger instance */, x ^5 z8 p4 H9 s4 k
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');* v5 ?/ R' k( J r% V% R2 F6 k' B
var loggerBufP = new LoggerBuf.Params();
+ }5 R* F6 `1 H1 xloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */9 N; Q6 Q* |. x. [/ `* F
loggerBufP.bufType = LoggerBuf.BufType_FIXED; g) e3 |3 {/ c9 l' ]
6 c# R) d' M5 Z+ ]5 Vvar appLogger = LoggerBuf.create(loggerBufP);; x( v5 i( m* I2 H2 [
appLogger.instance.name = "AppLog_Core1";
& x% d$ y' v" M8 w3 U# Q. jDefaults.common$.logger = appLogger;1 A. x# k, v2 _+ U6 ^
Memory.defaultHeapSize = 0x8192;
0 }$ n5 G- E; kIdle.idleFxns[0] = "&LEDStatus";- s3 B+ K( u7 c/ h" c
Cache.initSize.l2Size = Cache.L2Size_32K;
* o0 D \7 b" X+ X2 R" ?8 T5 V9 D; Y4 J h. v* h, q6 j( H. O+ ^
|
|