|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明. l0 Z% w- I9 }0 f4 i- s. y# n
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
6 i2 H1 c# a s6 A" x(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
9 Y6 v( h' u, ?( i1 i# j$ W3 K9 c c( [
是不是需要在DSP.CFG中进行配置
; {4 m$ S/ `$ Q& n4 q, O: B我现在的配置为5 u0 q* G& ^4 I) {2 z
, \+ @% \+ T$ ? s! X. g
/*0 M: e8 z8 {+ Z5 H
* ======== Operating System Configuration ========) O* B- v$ P6 g( n
*/
! l0 B3 [( Q2 ]/ k0 F. K5 r P" |0 b6 M3 @$ w' N" S
/* no rts heap */
0 ]6 R0 M {9 {% g F/ KProgram.heap = 0;
* y* @) | W q8 F5 A3 SProgram.argSize = 100; /* minimum size */8 H2 m$ R0 z' r2 A
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大# d1 Q- y# m; P
2 G# b; R- T* W2 H. X& f
/* create a default heap */& ]: M4 q2 B) f7 H# i6 {
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
. o# x! i3 m# S3 n+ O$ l) {var heapMemParams = new HeapMem.Params();
9 E9 D: W+ W9 ^8 z$ zheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大, _7 `4 F8 b! N4 }( _4 n
- H8 S! \8 D* u5 Dvar Memory = xdc.useModule('xdc.runtime.Memory');
7 u" | O6 H u; r8 B: kMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
7 O1 z3 u* l r1 E5 R
! @1 o, E! h) Q/* configure System module */# \9 q+ d7 _. ]$ `$ h
var SysMin = xdc.useModule('xdc.runtime.SysMin');
, v n4 r6 B, ]' E7 R" E( c0 c5 r# LSysMin.bufSize = 0x1000;
5 Y8 @- U! r/ ?$ a4 M7 u# WSysMin.flushAtExit = false;! n5 x" B5 g) _! B/ E
& I0 f( W5 J5 N8 A) v3 a" ~var System = xdc.useModule('xdc.runtime.System');# w) b/ J, U+ S0 b# J
System.SupportProxy = SysMin;/ @ L5 A, v( y6 |# h3 e
4 l F4 g5 l7 u' A! Z% `/* configure SysBios to use the lower half of Timer 1 */! y; h3 f% z4 Z' d
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
- C1 n- l) e7 s* h* qvar Clock = xdc.useModule('ti.sysbios.knl.Clock');; v% V- m4 q% C0 J1 E4 W0 x
Timer.timerSettings[1].master = true;, \/ Q) [; i" d. z
Timer.defaultHalf = Timer.Half_LOWER;* D4 }6 k+ Y/ l2 a* W
Clock.timerId = 1;% d6 |9 I2 _. z
# f3 B S. V; ?% J
2 x/ [' o/ h* N. R! i: z* ]0 x/*6 n* Z" I0 _- a+ o, I g
* ======== Miscellaneous Configuration ========( z t0 Y6 @: _ C& Q9 E+ f. t- `
*/. U/ v1 q3 e& ^( x
, t! s* A" e }3 c/* set default diags mask */
% L+ z s% _1 \0 G; Y6 xvar Diags = xdc.useModule('xdc.runtime.Diags');
/ Z6 L. w& I% @( Z" _" ]4 bvar Defaults = xdc.useModule('xdc.runtime.Defaults');
@( y4 S1 D" w
4 a* f$ G2 K, L4 O7 g' z) n: Z8 F) uDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
* k7 z. p" }5 g$ Z6 |/ \3 ]Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
K$ M- { U5 Z/ a/ H8 S* dDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;% E# M8 M h- z% u% T- [3 F
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */$ b2 a1 c1 r& Z/ x( ]" r
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */0 M# t' n3 L4 X
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
" V1 ?, e V' ^3 r( t% lDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;( q- T* a4 k" c& H2 z) K1 L
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
* s( n. c, C5 c, h; X, j. o' UDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
! ^& k9 b9 z; o* C6 e: NDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
9 F+ J$ G1 @+ F6 HDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
: A( v) ^- @8 g/ ~* x0 ~+ LDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;- V1 g) o* I2 q
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;' \; a X5 F' C& Q, n4 F: J
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
5 R, ?9 s' s2 F, j+ ?8 n% x7 F' e& e, [
/* override diags mask for selected modules */8 M! D4 G1 H& H- t( ?
xdc.useModule('xdc.runtime.Main');6 X! `$ M) I) Y4 w+ j
Diags.setMaskMeta(0 |: w6 r7 g, m! }9 F, M+ o; c) o
"xdc.runtime.Main",7 M+ T& `3 r8 M6 _
Diags.ENTRY | Diags.EXIT | Diags.INFO," f* |: f$ i& @, ~) f1 B
Diags.RUNTIME_ON% U: M9 l4 E1 H9 X5 W- O
);; g$ J, |! U) ]% {/ d4 h
6 ?# o: g! u! P3 j7 z+ v7 K" R
var Registry = xdc.useModule('xdc.runtime.Registry');
& r% m2 r1 F7 E! ~# s/ wRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
6 S; K h6 o. j* BRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;7 j/ q9 y' @% e; D2 S
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;4 _5 L4 r: r' W @1 C; S$ ^
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;' y1 ]( X# C8 n
1 W# H9 J: E* P! @/* create a logger instance */4 ^+ S" g1 y) E$ }: y, Z: L8 C
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
! R0 ^# v9 @0 `, lvar loggerBufP = new LoggerBuf.Params();0 L5 C0 q1 G6 L: N6 B
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
" ]6 o6 q: z! O( J7 r3 e. q0 b bloggerBufP.bufType = LoggerBuf.BufType_FIXED;
# H& V; P9 \5 ]6 S( o3 E
" _7 K# x, K0 Z1 b: q, j$ n' ~: uvar appLogger = LoggerBuf.create(loggerBufP);3 Q+ E$ j# ?- ^7 J/ N5 F
appLogger.instance.name = "AppLog_Core1";% w" N8 @5 U* m
Defaults.common$.logger = appLogger;4 m. L- m3 P% o4 h0 _, }
Memory.defaultHeapSize = 0x8192; ; O, M/ _, w+ `' A. Q* ^
Idle.idleFxns[0] = "&LEDStatus";
+ X; |: y' i9 B/ `) aCache.initSize.l2Size = Cache.L2Size_32K;% q4 F' h, \" W |
6 w/ n- F: V: s. _- m
|
|