|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
8 S% \) d2 s8 X. p1 y# ~8 q我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下 [- S& I2 I9 @( u
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
% O: Z/ A8 L$ z+ [/ C* _4 V6 Q/ ?. o! A1 Z
是不是需要在DSP.CFG中进行配置" j: j7 X) t" ~9 i& G- u
我现在的配置为
3 f* Q! U- t7 z6 A T! {
$ @) r0 x: w3 W# |+ S. B/*
* m. m' Z9 X' u9 Y! a+ w * ======== Operating System Configuration ========
9 n" M; o& {8 O" a */1 n7 ?- C- q7 B' f
& P. r- F% P1 h! n) ~/* no rts heap */, h' p5 N9 S0 a4 j8 n, k; e( h
Program.heap = 0;
8 G5 o2 W7 e. W2 B% iProgram.argSize = 100; /* minimum size */) Y( Z' `% F# @ {' B' C, j
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
2 C3 R, ]$ h Y/ d6 [3 w9 ~% }& }& _
@$ H* ~9 |8 A! }0 z+ \/ o$ k# {/* create a default heap */
" Q X" N6 D& i( S' Lvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
4 f; U: R. _6 f% m& H5 ~5 _var heapMemParams = new HeapMem.Params();
2 Y' V" ^ G+ x7 e& \heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大2 ]$ U R( ]2 H& @
7 F" s: V0 X; a( P9 \8 t
var Memory = xdc.useModule('xdc.runtime.Memory');
+ A/ K- @* c8 JMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
+ C4 g& F" Y( f# T- e1 Z$ t/ M3 v/ j4 c9 Y( Q0 N! \
/* configure System module */
2 s: D4 @: n( Hvar SysMin = xdc.useModule('xdc.runtime.SysMin');
& e0 x0 V" ~: O) R* ^' G' c3 p7 YSysMin.bufSize = 0x1000;
6 C& s, E% Y! O) R q0 ySysMin.flushAtExit = false;
& y* H8 @; n% L; Q& A5 ~
& h' n0 Q1 ?3 Q; C3 avar System = xdc.useModule('xdc.runtime.System');
# H) b/ g/ E+ DSystem.SupportProxy = SysMin;
9 D' ^/ B/ C8 E( b+ S, ]7 Z8 g& R" f1 W2 f
/* configure SysBios to use the lower half of Timer 1 */$ n9 i/ o# b0 p+ i
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');( F5 }) a3 P- D; E F6 O
var Clock = xdc.useModule('ti.sysbios.knl.Clock'); F7 d* ~: I& d0 \
Timer.timerSettings[1].master = true;( Y$ q; g9 k- ?8 ^
Timer.defaultHalf = Timer.Half_LOWER;
& Y# k: _* u1 _8 lClock.timerId = 1;# W% a7 H) |* a7 R h
! Y) l1 P- E* q! w# o0 f3 ]% S
8 E z$ a: V" { T- R2 L! N' v
/*# M% a( k2 e) c; H% A! H F2 h, r! |
* ======== Miscellaneous Configuration ========
: c: y8 l6 z8 S! n! G */" ~# I* ~& k' b% ]8 `: f! r
0 p; b$ y: t$ f: V
/* set default diags mask */0 M. K7 w6 Z4 @% S9 R! }
var Diags = xdc.useModule('xdc.runtime.Diags');
% ?# d+ g- \, j; ]var Defaults = xdc.useModule('xdc.runtime.Defaults');! \: e3 u. W* x0 Z" ~
; j$ @' U# o! g1 H. eDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
: S9 p+ Y, l( X% _" e# xDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;; W: M; j e4 v, v! r6 K, B
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;5 H, L% e3 m; d% y3 V8 e
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */! ?+ s0 [6 S. P' ? A5 _
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */ [) B9 ?- f" V; `9 b* V
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;7 N9 _ X# z( B3 r
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;7 S' G' c5 _5 l/ z1 q4 w
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
6 V- |( \* b; Z; }, ^ ?- CDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;. M6 p! X* T& ]# I
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;- e9 b' O) h) J: @3 ^3 Q7 Y
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;) W6 g. G) D7 E. _' b2 l
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
6 w4 q; X* Y4 u4 Z; b! gDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;1 h* [& K- \% p- v! `
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;9 j8 o4 | I4 U- y- W
; p" @7 o% H Q# @8 ?0 [9 k
/* override diags mask for selected modules */
; ]# L6 z2 }' Wxdc.useModule('xdc.runtime.Main');# |0 l( ? }( I! v% |
Diags.setMaskMeta(
8 X* `% `8 }* P8 ~$ Q0 ?' i* d "xdc.runtime.Main",. N& Y6 z! b) Y* Q
Diags.ENTRY | Diags.EXIT | Diags.INFO,
% H4 N {4 G5 |2 B. j+ j7 n Diags.RUNTIME_ON
1 y( Q' Z& }5 J& Q. S);0 Y# ~! W m, z- }4 e: b" p% U
% t+ `( i4 o) a) J: g* H" |
var Registry = xdc.useModule('xdc.runtime.Registry');9 E# `. Z; F! p: X
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
4 t9 X1 v/ c- lRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;- h! C( N% a$ A1 M
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;1 Y. B2 ?* v8 U
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
' S) M1 Y' b [- L6 t" B- e6 i& @% C$ P) Q/ Y5 G2 N* d
/* create a logger instance */
7 Y+ Y2 h+ @; F2 k# Jvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
; x* V+ J: R6 p z! Y0 ]var loggerBufP = new LoggerBuf.Params();
4 M A- d' ?8 J+ ~: a1 k% y2 aloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
' E ^) E6 a/ G# B$ t' GloggerBufP.bufType = LoggerBuf.BufType_FIXED;7 E% L2 G2 I( }7 q
/ G' u E6 n. t: G& j
var appLogger = LoggerBuf.create(loggerBufP);5 a& o. S% g# q4 c0 W' m
appLogger.instance.name = "AppLog_Core1";
' @* ] J' l& R: W" cDefaults.common$.logger = appLogger;& d* h! r7 C3 b7 ^ U
Memory.defaultHeapSize = 0x8192;
* a# k1 o+ E3 }Idle.idleFxns[0] = "&LEDStatus";
O1 ?9 n# E( v eCache.initSize.l2Size = Cache.L2Size_32K; U) P( d0 _. x; k
4 d8 ], T$ i B3 F2 l |
|