|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明9 l9 f9 V5 M, x+ Z( S$ j
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
* q, ]2 W; \' p t(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
: k6 a: F9 I. {/ Y5 k! m% z* @+ Z/ w7 b
4 C4 Q6 n% a* u1 N是不是需要在DSP.CFG中进行配置
: h2 }! w5 i5 E* i2 d3 k m8 E" r我现在的配置为
# g% k" e3 N0 I0 P" r5 y& @ \3 c/ v2 a6 i0 c
/*
& G8 \; c# A6 x0 @6 T( L * ======== Operating System Configuration ========% V3 e4 `: d0 y) j. s4 |! w
*/3 c s7 R M/ o. [8 ?
: r3 r5 r7 S0 J2 q% {/* no rts heap */
8 K) ?& H% K2 J% y2 ^/ RProgram.heap = 0;
* U( ^ m7 m4 G; x0 {; w2 h8 U$ n& HProgram.argSize = 100; /* minimum size */8 s: t) i; W/ ^6 ]% t3 d& q
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
; d4 n6 Z2 J+ J9 f% i, ~! k+ H- g! ~4 A% l/ v
/* create a default heap */
6 Q: q, I u. j: O/ {* P; vvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
0 U6 c' v) }" A/ Rvar heapMemParams = new HeapMem.Params();
X* D& e9 J6 ^+ a0 \0 K" b UheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大# y7 Z) ^* q ^5 g0 k+ b g5 T
7 H0 i4 h. I5 Jvar Memory = xdc.useModule('xdc.runtime.Memory');
, u5 K t6 p; n- }" ?6 J- q/ B, NMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
6 `) B1 x1 @% w2 [
: q7 U2 d% f E0 x/* configure System module */6 ? [- H- ~7 ]" V6 I l$ b
var SysMin = xdc.useModule('xdc.runtime.SysMin');/ R% H9 T# z( E# T: W4 \) T
SysMin.bufSize = 0x1000;
) H7 j; h8 `6 @9 H( s( @4 gSysMin.flushAtExit = false;
' k. J" q' K7 z* D: ?2 r
, z0 S! t- S8 R" nvar System = xdc.useModule('xdc.runtime.System');5 W1 ^. A6 N7 \9 \# H r
System.SupportProxy = SysMin;5 }( i+ J! [" i* b _6 r
& ^: \9 V. u$ j; m, u5 w2 N1 l* G6 \
/* configure SysBios to use the lower half of Timer 1 */
+ n) c9 v2 m; q# u3 Q/ d) |var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');: ^- e% Q( C7 S' m/ {+ L4 I4 S9 Y
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
/ ?6 D; {* O$ S) m' C6 x2 rTimer.timerSettings[1].master = true;% z; r4 A( Y9 `- y R
Timer.defaultHalf = Timer.Half_LOWER;6 n% e- V3 G- G( r# ]3 B% S
Clock.timerId = 1;0 d3 [' u+ F; x! L. ?) Z9 }, E4 @
6 F l8 r( ]" o x S
5 _& @/ C4 R/ K- j- ^1 P
/*& E' k: u$ i0 j7 g" b
* ======== Miscellaneous Configuration ========
- n0 s6 _4 z% ^0 ] */7 |" q+ Y4 r% D& k4 L
3 k/ t U+ [7 _4 z* W/* set default diags mask */4 {* V- s9 Y! I2 c$ Z
var Diags = xdc.useModule('xdc.runtime.Diags');
6 h) Z& \8 `" h4 K4 P- svar Defaults = xdc.useModule('xdc.runtime.Defaults');
: D' N |0 I( N* [8 O, m2 a* g
$ ^) ]% P6 P5 {0 i$ PDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF; c- R. N4 t& z
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
4 }2 k% L9 u6 t4 r7 R6 IDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;! H {4 z# d* i, m: u) T; S. U
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
* c5 a$ I5 l0 S. z5 aDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
' n( ~' Z* M! B4 Y( ?Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
6 K9 q: M# M$ H" ^, G3 ]Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
3 D/ [ Z/ B" u7 i" \* ~% e: p2 CDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;- W# A, u% \4 C) j4 Q$ \
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
4 c8 H* H' C8 u% N, M4 `Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
' V, s6 h) e4 c6 WDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;) P* _! `! M1 z# E
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;' U, u; o( Q* L r
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
- l) w( U% |4 [, gDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;/ |( E6 E9 @0 v/ a( |7 _5 }8 k
3 x; z$ \! K- {2 `, P# l
/* override diags mask for selected modules */
; H! c. ]3 k* L, k+ @, q; Exdc.useModule('xdc.runtime.Main');
; q$ X- h9 M2 ]( E0 W- Z) zDiags.setMaskMeta(( L* W8 g+ d# a/ a9 Y
"xdc.runtime.Main",
+ ]% _. F( v- | Diags.ENTRY | Diags.EXIT | Diags.INFO,$ ?& A0 B5 D9 G* y" M
Diags.RUNTIME_ON8 x2 J C2 E" B4 r/ y
);1 q% v( V/ y2 x& B, v
$ \3 q, I2 r( p, M b7 J B
var Registry = xdc.useModule('xdc.runtime.Registry');
( U: V1 v9 z9 H, i9 y6 mRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;/ h! G* p1 Z* A. q, K2 d" W
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
# H8 G" Y9 i2 v1 MRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;& j3 d- E: g. d1 B, B' F+ I2 E
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;6 y7 r" P# O* [) N
9 R; T- M! u& d. x1 C/* create a logger instance */* X- m. [ j. A$ H& M) i
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
! x) R% L, g9 `3 tvar loggerBufP = new LoggerBuf.Params();
1 a- R5 Y+ ?8 e+ v' X- SloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */, l ]! J) Z: f8 M2 P
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
( z, _3 f7 y. G R1 g' ~" d
, T1 z9 v' f c5 Bvar appLogger = LoggerBuf.create(loggerBufP);2 I) A3 ?! G( f& w
appLogger.instance.name = "AppLog_Core1";* G4 o- X; j! v5 [2 a# X
Defaults.common$.logger = appLogger;; I/ ]" {# E: F2 P4 `. |- x% G
Memory.defaultHeapSize = 0x8192;
2 N( p3 U& Q& G6 j4 w H. ^" eIdle.idleFxns[0] = "&LEDStatus";
2 x0 t7 l0 Z* G# Y* vCache.initSize.l2Size = Cache.L2Size_32K;
0 P% C s% A9 ?/ L7 P% p; [
: X1 R. B9 u& a1 R8 ?- c; P |
|