|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明: h: j2 f4 d2 l9 p
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
$ s- g- Q1 M; j; S6 L4 g(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
& U5 p: ?4 Y2 S5 T* l9 _* a, s( C$ o) D! u" T% s( Z/ k
是不是需要在DSP.CFG中进行配置; Z4 Q$ D2 e" l" o2 Q; A
我现在的配置为
T' h( [5 `+ e8 W+ }2 n- k8 V7 a' A- R* a2 D+ I
/*& q8 F9 l8 t' t s+ d2 Y
* ======== Operating System Configuration ========
5 ?3 F. w& z) K4 D5 I6 k3 j! w' t */. L5 ?2 s7 ` J( G
5 X& u% e. V! N8 z+ X5 d
/* no rts heap */7 G' b( @# V( a& t8 l0 t" d9 t- c
Program.heap = 0;, W; Y& g% `) C( Q0 E2 i
Program.argSize = 100; /* minimum size */
1 X) u6 d" ]5 u+ G1 lProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大+ i6 y* T3 e2 B6 k
5 M$ d" m! j% ?* Z
/* create a default heap */
8 _6 S! P5 ?+ E ~7 Lvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');# S$ U9 v) }* m% W8 b
var heapMemParams = new HeapMem.Params();
! V8 X7 O. t iheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大1 Q' i/ G3 } G0 K/ _
3 E- x% O- _" N9 O; G! Bvar Memory = xdc.useModule('xdc.runtime.Memory');
0 p& G1 T6 B! H2 fMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
, l* ^* m$ L5 I# y' r( j3 w4 x* o/ C+ g5 ?- r; C
/* configure System module */9 P5 y8 a' @: c0 B3 k9 d% g
var SysMin = xdc.useModule('xdc.runtime.SysMin');
# n2 u9 w& ~% ^& _8 DSysMin.bufSize = 0x1000;& D' {0 q' d# d8 R! h/ D
SysMin.flushAtExit = false;
8 a, Q# V7 c9 Y( L( i. ]8 j
3 Q: V+ J! J4 y3 ~$ W4 u3 J' Qvar System = xdc.useModule('xdc.runtime.System');
1 F) e7 _3 u! x: t uSystem.SupportProxy = SysMin; E4 F3 T6 V1 B# c: y. x0 U4 ~
! i4 U5 ~- y3 Y& T, i, I) r
/* configure SysBios to use the lower half of Timer 1 */ ^! ~3 J4 B* H; U+ j
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');! _2 V8 X3 ]6 ~6 _
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
& {# p3 }0 v( |; c8 m( rTimer.timerSettings[1].master = true;1 ?: e1 m/ ~! X" X
Timer.defaultHalf = Timer.Half_LOWER;
8 v/ z- W9 s2 s* F+ ~+ C$ @. MClock.timerId = 1;8 R6 L( G; E& k2 K
) f9 S- R! j: m: J( ^( ^8 {
+ W: I* M' p* E! `+ g: e/*0 F+ f2 M C1 R1 V, J
* ======== Miscellaneous Configuration ========3 {' N) S$ r1 M5 b3 s8 n i$ W
*/
$ K: O8 g9 b" s* O' [- @7 s7 |
/* set default diags mask */& x: V& n* _) x- p' ?. Y! c8 j
var Diags = xdc.useModule('xdc.runtime.Diags');
. l7 ]& h7 E3 ?; q2 Ivar Defaults = xdc.useModule('xdc.runtime.Defaults');* w2 A5 Z7 ^8 z
: ?9 u$ f3 t% u, \1 q5 [
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
* q u+ V6 Q/ X7 f) X' `Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;/ a9 i) x' Y2 Z" X t3 t
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
; a& ~$ Z6 I) k( eDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
2 q$ b4 P* z7 U& _Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
1 d& L k: W8 D' I+ `3 ?% wDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
% W# x# e! a9 O. ZDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;' B# F" H3 o: \9 c9 ], {
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;# V5 H: U" Y9 \& ?
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
+ f+ Z" v1 s3 t) N' n, _Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
8 J' t9 y2 ?- d$ uDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;, A) a& \0 X5 P$ U% h
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;3 f* y- l8 D z0 H
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;% C" s# Y) W* k$ i( q5 r0 C
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
( `) j- W9 j7 O: B" N: ]9 I8 H* j! M( r3 g; n3 k9 [6 q$ y" J
/* override diags mask for selected modules */
6 b0 q, N, K8 {0 W5 G1 {xdc.useModule('xdc.runtime.Main');7 O+ y& \% ?4 q4 t
Diags.setMaskMeta(' F6 s C, X& ?7 |' {- P
"xdc.runtime.Main",
* ?" G$ R. J$ e7 x4 G0 U2 F* I7 e Diags.ENTRY | Diags.EXIT | Diags.INFO,
4 F, j4 } P# A) e v: K; n Diags.RUNTIME_ON
6 j) @& y# _7 h4 u: ~);
5 z( R) P2 s. O& _5 k: p' M0 F& O2 {$ n' x7 {* r9 i+ H
var Registry = xdc.useModule('xdc.runtime.Registry');( H9 e2 I6 \4 Y6 b! [" {2 N* Q
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;' o! e Z4 D8 ~
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;0 H6 B; U) W/ d5 C" Z; l
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;3 t* w7 ?# J8 x) C: r2 n, y
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
8 _* o, ] w+ B& \! k0 [- o* Z$ V8 y% e
/* create a logger instance */
8 s; m" D: G# f8 G& f+ ?1 ovar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');6 v% `& ~5 V6 q$ R' w% b
var loggerBufP = new LoggerBuf.Params();5 Y3 C" p3 t) V7 C: m' i! }: J" Z) D
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
# }$ i1 m6 x9 \2 c0 ^) {loggerBufP.bufType = LoggerBuf.BufType_FIXED;% _4 \4 z7 h4 C
8 u! H. c- \5 s8 V& D1 M X( rvar appLogger = LoggerBuf.create(loggerBufP);
: Y& A: t0 j4 p2 j' x6 happLogger.instance.name = "AppLog_Core1";$ s1 u8 U6 P! A9 |. X, I
Defaults.common$.logger = appLogger;- _9 U4 [/ l g: A
Memory.defaultHeapSize = 0x8192;
# K' V( J$ R9 `Idle.idleFxns[0] = "&LEDStatus";" k; a1 _- I+ A- ]7 X- l L
Cache.initSize.l2Size = Cache.L2Size_32K;# x" P3 w# O! w+ k+ O9 w( e
( n5 j, Q3 ~3 z7 k$ U
|
|