|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明% j0 R* [* D* w1 P7 Y9 f
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
[8 V8 C: [+ C/ O- I* ~$ Q(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
0 \' G1 U" G% |" y8 h+ H; I9 V6 r$ W/ Z" I0 j4 r N
是不是需要在DSP.CFG中进行配置! d8 w( O8 a, B( ^
我现在的配置为0 g- M# ^; S0 \+ h9 M5 e
, P0 ~8 `5 h( N4 o/*
0 e- c7 d5 K9 V6 q * ======== Operating System Configuration ========0 M* n2 t$ V* U4 @0 v W3 ?3 `
*/7 ?7 f/ ]8 g' }" \" F/ B& e% n# ^
' j$ M5 T3 s0 |/* no rts heap */- p) i2 }% c- v; c0 C/ X5 B
Program.heap = 0;7 T; j" e! L7 ]& \
Program.argSize = 100; /* minimum size */3 S' @# b: A6 a0 p y4 |6 N" B% p9 G
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
# B5 Z, B R( |. r: k2 N. K- t( S2 K) r( @. U8 i
/* create a default heap */
4 o- K% D- q$ O7 O m/ }, pvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');( T! r3 Q: \& B
var heapMemParams = new HeapMem.Params();
. `- k/ v% h) U' hheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
, H- t8 E+ s/ w K8 [- u: `' x& C) D& u7 R Q
var Memory = xdc.useModule('xdc.runtime.Memory');9 c& M6 I9 {' A; {- C! a& Q
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);7 k% w0 z- I; t5 O
9 Z* T( O% C) L% E/* configure System module */
6 v$ ^( q1 g- ivar SysMin = xdc.useModule('xdc.runtime.SysMin');
8 [( r9 ~" S2 e5 A- r+ u: s5 SSysMin.bufSize = 0x1000;
6 A( C/ V* \3 cSysMin.flushAtExit = false;
! \9 d, P8 g V: ~) g, x$ b+ E$ i2 w" `- S7 X6 C6 Z, G) h% A
var System = xdc.useModule('xdc.runtime.System');
0 N5 L( `2 u P# l8 M9 e. ?& SSystem.SupportProxy = SysMin;
5 c1 [) I3 Q/ x! |+ L' s- M: i6 j6 V" \
/* configure SysBios to use the lower half of Timer 1 */
& v( [+ `' F t d. p6 L) Kvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');) s& V" R8 s5 l
var Clock = xdc.useModule('ti.sysbios.knl.Clock');* J. Q+ c; w: x: f" a0 v
Timer.timerSettings[1].master = true;: `' k L% g6 R
Timer.defaultHalf = Timer.Half_LOWER;, P9 n3 n* ^; F1 f
Clock.timerId = 1;
+ [5 Q% ]0 ^5 z2 @$ x
; a. J. I! G9 s+ L% W p7 f4 ^5 j. G. s+ O6 j
/*' Q1 }/ e2 d* s6 ^( C
* ======== Miscellaneous Configuration ========2 a4 e0 D* o& W9 @9 U N
*/1 i v8 A% ]2 I# a ~( k' ]
* {% C, e/ U d6 c5 u6 s/* set default diags mask */
. x' e6 `1 X6 M( l& Mvar Diags = xdc.useModule('xdc.runtime.Diags');! k' K6 F9 Z( c) ]3 x1 g
var Defaults = xdc.useModule('xdc.runtime.Defaults');
, [9 H, l( E# u d# ~& `! z2 b
2 S* i$ R1 B# {% u2 {" fDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;6 p7 K- U6 ?1 s. V
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;% z. z, v9 L% E( H4 c
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
; t: N6 ~/ t6 |0 I- {, _5 lDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
+ ]0 ~. w8 o& iDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
2 \2 n, h, Y) V* n s1 R0 z1 ~Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
0 ?/ ?" D* e0 Z. {1 rDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;! G& _: T7 e, v6 V$ L
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;. d# {" R; g4 p3 E. P# ^( y- B2 q
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;2 Y& _& ~* H0 b0 J2 b" @! |. z
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
: K( p- ?" T: q+ ~- ] [ VDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;. ^" b0 L! j* R
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
5 m3 N& ~6 j4 v1 x5 D* bDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
/ e, A# `" z o/ c& i/ ODefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;( Z0 ~$ Z: s/ @, p; z/ D8 e. ^" y
) ~- |1 ~- J1 o: w* m
/* override diags mask for selected modules */
) K2 ?5 M% y( c: }2 jxdc.useModule('xdc.runtime.Main');; s2 _& K8 v- a% b) [8 N! T
Diags.setMaskMeta(1 T3 Z4 @2 m- N+ X/ I* c
"xdc.runtime.Main",' V0 f: q; i2 G$ f0 w
Diags.ENTRY | Diags.EXIT | Diags.INFO,: M6 K- o# ]7 Z P/ U# c1 \. P$ C
Diags.RUNTIME_ON
! ?6 N; c7 y; g- N0 Y9 @);
& ]% ^! Z: z6 R( }4 P8 {+ L- {: C+ H9 A H0 b
var Registry = xdc.useModule('xdc.runtime.Registry');. Z) e9 R. a" z9 N
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;% W h: ^/ S, o, _, o
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;1 d3 w# |: O* u8 t3 Y
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
2 A( x! s1 Q, a/ B, ? E: C# O+ _+ TRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;1 n5 ?& {' B! E& ?& w5 e& r
( H* R! F! i4 R A: c" x% I
/* create a logger instance */
; E3 K1 g, J ^4 E# Ivar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
( I- R' _# f. m# Hvar loggerBufP = new LoggerBuf.Params();
/ ?, C8 o& B! q/ e! K1 ZloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
" h% L$ l& o% u( d, floggerBufP.bufType = LoggerBuf.BufType_FIXED;
! B* {4 ^, W$ P6 _; a- E* i+ P+ j2 _. b( ]4 |3 @
var appLogger = LoggerBuf.create(loggerBufP);
, v: x, g' i' _6 w1 GappLogger.instance.name = "AppLog_Core1";5 _) N( a& ^0 x7 }: Y8 {% P5 X( E
Defaults.common$.logger = appLogger;
7 N7 u9 x5 p* O& M0 M) {Memory.defaultHeapSize = 0x8192;
+ b- F0 c9 ]" P1 t* I& kIdle.idleFxns[0] = "&LEDStatus";: B% S3 |' _% j" d, q& A3 [" y
Cache.initSize.l2Size = Cache.L2Size_32K;" e9 ~: m. L- l" a3 J
' n* u8 k1 y! ^6 u: n0 b |
|