|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明- f% \9 i/ D- H2 h7 T ]
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下* N1 d1 f/ ^: l
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
/ o# ?5 e4 ]" i" {% b% P* G d$ O% C
是不是需要在DSP.CFG中进行配置
5 S. s- D3 n3 D( e, V6 r3 O我现在的配置为$ K; p3 b) p8 c6 Z! x5 I
9 X5 b0 @% q L
/*. |$ `2 S* U! }% H; P
* ======== Operating System Configuration ========
; S* T; D6 F6 Z" J4 D7 ? */
' k. [8 p5 z1 Z# v; |2 u2 w; g# d* @- P
' A2 s3 |" I9 Y9 E- Q+ s' W0 E/* no rts heap */6 N* f! n+ H5 } H
Program.heap = 0;
3 C& g) g3 }4 BProgram.argSize = 100; /* minimum size */: w) a. s/ P% Z7 S$ f6 e
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
- |! a/ i0 B6 K( Y& D# O. H
+ W# A& F* R1 C: X/* create a default heap */
2 f# f0 |) z4 a8 Dvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');" s+ O5 q$ g: }: B! B
var heapMemParams = new HeapMem.Params();9 @- {. \' q) V- j+ R* b$ g
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
0 g# x* K: g+ v' d5 Z1 `. d4 Z. g
! F0 o, v* x/ @9 U3 k' rvar Memory = xdc.useModule('xdc.runtime.Memory');! r! g. A& M, U2 |5 u' F# b9 o
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);$ O2 @1 d0 f# E
' X! ?% G$ s) k4 i: F& }, A/* configure System module */
; Y! K! z& T. U: s& xvar SysMin = xdc.useModule('xdc.runtime.SysMin');
$ {1 @$ k# h- ?' p3 hSysMin.bufSize = 0x1000;
4 w; X$ X; ?) i# rSysMin.flushAtExit = false;
* a# ?. Q2 r# Y& \% G
. M J. O S* J6 I4 O* ~3 `var System = xdc.useModule('xdc.runtime.System');
+ G0 b" ^5 h7 z' ?3 jSystem.SupportProxy = SysMin;6 B; M: t1 s, q+ x, f
+ w" P, K, m& ]
/* configure SysBios to use the lower half of Timer 1 */( Z+ f+ O, C) ~% V$ Z3 l
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');. t" o N4 l: \# K! T
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
4 z: L9 d; m) q0 A% VTimer.timerSettings[1].master = true;
: E* Y' q- A+ K5 hTimer.defaultHalf = Timer.Half_LOWER;
& ~: |8 H' i/ A+ WClock.timerId = 1;; r/ p6 }5 r: g6 B7 H# ~3 H' C
) J" B, B, a9 u! \' _- |
8 J6 j- R1 I/ U f1 b
/*4 b4 z7 T" S8 k S
* ======== Miscellaneous Configuration ========
+ X* f' j' E* m* x */. i/ x0 }7 O; u. ~) }" J+ |
0 D: ]% y5 [1 { p9 c! N1 h
/* set default diags mask */
6 ]$ l: J3 S# P. t) Z Uvar Diags = xdc.useModule('xdc.runtime.Diags');2 j) m/ L* I% |
var Defaults = xdc.useModule('xdc.runtime.Defaults');
4 K, m5 ^' I# g; Y; S; j/ N- y+ c' o2 Y$ B, o
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
% \3 v7 J8 u" N7 _" F' cDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
+ w8 Y# i) r! p2 I5 u2 MDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
/ V. l) E; i' Q$ s9 b1 d- XDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */$ p8 H, t6 |$ l1 G% P- H, P
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
0 s2 g8 t4 \3 T- ]Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;. q; Y# l" `8 ^. }
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
! r j& _1 Z4 t" s" fDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;+ p( ?6 h ^ W$ ^. _
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
4 O, |) Y9 n' ]( R: h) tDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
; M. k' M# }* j9 T1 g. U# R/ U9 cDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;7 g0 p& t4 |2 n- h6 Z }. g2 J8 a
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
( K% t2 P: L2 ?, kDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
% f" p0 b2 S1 t1 b- C+ M3 QDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
3 J/ J: u7 i8 P' H
$ \" L. s7 l2 H& G- c' c, c/* override diags mask for selected modules */, q# i( `9 X; L5 Z9 I! }
xdc.useModule('xdc.runtime.Main');
; {3 p' J# ]/ _' Z% S, @3 aDiags.setMaskMeta(
8 A4 |1 e1 J- U7 v) v "xdc.runtime.Main",: l( v( n3 ?' G9 F' p9 O- o6 B. q% \
Diags.ENTRY | Diags.EXIT | Diags.INFO,1 e5 W' u/ ~1 Q5 z1 _
Diags.RUNTIME_ON
% p( L2 w7 O; h' d! B);
! s9 V% i/ N$ ]6 x# i9 u9 \" S) f
0 d0 Y6 _& e) Pvar Registry = xdc.useModule('xdc.runtime.Registry');
) O% e" k8 u' M% e( x) h+ r! L+ C2 jRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
( {. C) C, M3 X- E$ y1 a: T6 a4 PRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
( S) a+ L5 F& C& @/ ^( H$ T7 BRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;& a# D7 S/ X) c$ Y2 ?
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
1 i# b O* U. A# e6 l) M8 G# ?, M
/* create a logger instance */
. h* R: }2 l% ]5 ~var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');% X/ h1 Q ? h' M* Z
var loggerBufP = new LoggerBuf.Params();
% |' L$ e, P' q5 `7 O- N5 ~loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
- E5 L3 B* ^& j* m7 ?+ AloggerBufP.bufType = LoggerBuf.BufType_FIXED;
# \( ]- g3 E$ s* T* X }& Y
" v; N5 u7 O: Evar appLogger = LoggerBuf.create(loggerBufP);& P1 Q5 ^5 p! P+ p8 n
appLogger.instance.name = "AppLog_Core1";1 V) ?: w# S' k Z- \" |' G9 b1 j
Defaults.common$.logger = appLogger;
: l, j4 @% q! s! f' L" a5 mMemory.defaultHeapSize = 0x8192; 3 Z: i- D) M' p* a6 A- f* y
Idle.idleFxns[0] = "&LEDStatus";7 i ^7 l; d, \2 F; n
Cache.initSize.l2Size = Cache.L2Size_32K;
! f* _4 M2 ^0 }. g; C1 M
1 E, \& B! `+ L8 y& X M |
|