|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明- h: k B3 f- [6 T A q5 B: f( W
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下/ v5 [5 ?7 ^3 @ H- ^# v3 C
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)! o* n' _& r$ R+ E- n; H
3 e Q' l7 {0 ^) {是不是需要在DSP.CFG中进行配置
% |5 e4 |3 a5 D( e( \我现在的配置为
# B- g1 J' a M8 i7 K3 s1 c; o7 r
$ w r" [8 X! m6 T/*' b7 h" ?, t) L7 s5 X; C% t9 w
* ======== Operating System Configuration ========
d( `) w, }! t/ b4 Z9 p+ d0 P */7 K8 G$ ?# L2 ~- u# H7 w6 j
/ H7 Q2 h' e! e- b
/* no rts heap */3 O4 ?; ]/ O: \- p; R$ M' u+ p6 J' W
Program.heap = 0;8 w; ]" o6 H j& ?2 S. M
Program.argSize = 100; /* minimum size */
, {- {' J9 Z- _& d$ CProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
# a7 s6 I2 \2 o7 r3 C9 P
& I/ E3 T) O2 ^" I" R/* create a default heap */* d- p2 s1 N7 W, l- U- P
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
8 C: D3 w/ ~2 {var heapMemParams = new HeapMem.Params();
5 ~* O% o9 P) }- M! {heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
3 C+ H0 [. X2 x Q/ n
# x! B4 j" ]4 R6 {0 }9 ovar Memory = xdc.useModule('xdc.runtime.Memory');
4 W7 P1 f/ Q! X$ n( {; E/ ]5 [; t& `! MMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
0 [2 a; D7 Y$ c6 a) e" Q
* V/ |6 I$ q, V2 F/* configure System module */! e! Y/ t8 G0 ^1 Y' a
var SysMin = xdc.useModule('xdc.runtime.SysMin');
* K3 \/ f' ~4 b$ t v' sSysMin.bufSize = 0x1000;8 h- w: [$ \! `% f, W8 R$ S5 {7 b1 X7 `
SysMin.flushAtExit = false;
, h9 m" a$ o4 p; t
$ o `. i, d& r; J- Y: A: P, p! qvar System = xdc.useModule('xdc.runtime.System');
, p! U* K p' ] d5 x/ y- J& _6 bSystem.SupportProxy = SysMin;, M. s/ S2 E, ?* o8 H9 c1 C1 ?
" I* q6 k' w9 T* w0 r/ ]/* configure SysBios to use the lower half of Timer 1 */7 M# R; s( l( X7 }8 U
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');. ?* U! ^, ^' {
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
: W$ d9 s5 M: E+ {' F+ K4 s3 Y: pTimer.timerSettings[1].master = true;! y: m& W/ O8 G2 A$ h* X, x
Timer.defaultHalf = Timer.Half_LOWER;/ R6 {! ^) l1 b. j6 w7 _8 O- e+ N
Clock.timerId = 1;8 {: ]# w$ g8 P3 Q4 B2 P! J
7 w$ I8 \" T, l6 t5 ]9 p) y
. L `7 J4 B- e3 y t, X k6 t2 f/** p1 n J+ I8 I: y
* ======== Miscellaneous Configuration ========
( q' s& Q; \. }8 j; L+ C2 m% _ */$ s3 R$ d- T+ Y9 Z# _
' D e8 y+ h' I1 u/* set default diags mask */
* ~/ `- l, u1 {9 x3 b+ q: dvar Diags = xdc.useModule('xdc.runtime.Diags');5 C9 }5 ?3 a- Y: C
var Defaults = xdc.useModule('xdc.runtime.Defaults');
$ G7 o# H3 j ~( Z c S1 o0 p8 _( c2 D/ a2 Z7 V4 ~4 K0 s# y
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
# | Z0 J1 Q! e& K: W% }Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
' W/ l2 h7 ~) T" P( J+ x+ L! y; gDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;- C6 T% Q; s- N: Y# v
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */" h& G1 W& B( c! o. \* s' ?
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */4 {& N+ m! t) \
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;/ S3 C* j6 d2 a5 d
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;- A F' _: m( y0 d# ?( A
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
2 ~, E& j) x& O. _Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;- a4 G% y& G! r
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
+ ]& J. l# B- z* b mDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;9 |' i9 ~+ y% o( s4 {
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
P0 G5 f; i4 G' M, ^" mDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;/ T' V. _+ H1 V
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
" H) l$ V% R( T: u6 y; s- A' F2 j$ s. Q; z0 g% l( A& Z
/* override diags mask for selected modules */6 o; p" w# t4 V3 h
xdc.useModule('xdc.runtime.Main');7 b# b3 {* N% J- e: T
Diags.setMaskMeta(
; S7 c3 A @* P. F" Q( o; i8 F "xdc.runtime.Main",: X6 S9 _- ^1 g3 a" e
Diags.ENTRY | Diags.EXIT | Diags.INFO,9 S9 s; l) U, W: N
Diags.RUNTIME_ON& C0 f$ }$ R& a* q
);! T( B R$ y6 \4 E9 l) r$ O
* Y( r9 x# ^0 M9 bvar Registry = xdc.useModule('xdc.runtime.Registry');0 X7 u( D4 q3 R; Z$ M- r
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
- w- d" m, M4 g0 l" w3 z) [Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;. m6 Y7 t# n9 @9 F5 L
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
/ r& I3 Z: i( f- i, |# m9 vRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
- j! W. S0 e5 T3 s* k) e0 ~2 I# Z. V% Y4 F6 a- m U7 B2 \
/* create a logger instance */
, F, s* ]+ x- A+ ^) y% T# n% U: X$ i. fvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');. f0 Y( S: J9 v6 n. `- ^
var loggerBufP = new LoggerBuf.Params();
/ u; t1 t$ S @8 S& {" v8 SloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
. m/ ~$ K3 A! ?, L" YloggerBufP.bufType = LoggerBuf.BufType_FIXED;6 Z9 p! C. f) @3 H( A, V9 e1 _3 l
4 e. U7 w$ l; Y( z/ X; |var appLogger = LoggerBuf.create(loggerBufP);/ s4 m- X: K: f1 m) o
appLogger.instance.name = "AppLog_Core1";
/ R$ w6 Z( }8 IDefaults.common$.logger = appLogger;
1 Q7 H4 v" c) TMemory.defaultHeapSize = 0x8192; 6 g. Z, e! J" M" w8 O
Idle.idleFxns[0] = "&LEDStatus";
4 n7 a6 G2 ]0 ~$ W- F5 }3 ?) yCache.initSize.l2Size = Cache.L2Size_32K;
9 O8 c9 P* C1 B( p# O$ C9 A
; s! Z/ i2 K3 ^% ~5 p7 }' n9 I( ^ |
|