|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明4 ? k% C n/ s# f. P
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下% }, a. f! X8 g
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
" u1 x6 \* p& e
# ^ y Q1 u, t( s是不是需要在DSP.CFG中进行配置5 G5 f$ v$ I. W$ Y
我现在的配置为
. l: e. W/ c8 w0 e- w
$ u( a4 t3 O. H$ T7 f u/*1 V0 F! F t8 ~4 M/ p
* ======== Operating System Configuration ========
2 R' e' Z. ~1 y6 t$ F/ G/ o; p */
; |1 T0 H7 E! F A2 l3 {% ?, `- F C( J6 @- Q' H
/* no rts heap */! X* g+ z$ ?3 r9 {
Program.heap = 0;
$ Q6 M$ @2 |. x. j8 u1 aProgram.argSize = 100; /* minimum size */4 G6 T, j a" i
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
# x4 J% Y; z$ N- q0 D0 D; o% [9 L" z' j+ B" D9 d" `
/* create a default heap */
# H: j1 I. z6 Q) v5 }var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');" i G3 w+ i F
var heapMemParams = new HeapMem.Params();5 q. b6 w0 m0 M5 i$ Z
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
) S- w( |' P7 X; E! S& {" d. K A; s6 G
var Memory = xdc.useModule('xdc.runtime.Memory');. d) m+ U, v9 w' G
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
( n) V- g" X# J+ L" q; u5 C0 R: s% D* Q" R% a* e
/* configure System module */% e3 |3 ?' j& ~5 x5 @
var SysMin = xdc.useModule('xdc.runtime.SysMin');
b- e" f. }5 \6 U% O& BSysMin.bufSize = 0x1000;
7 R; }7 m' V1 t. R4 {1 O8 n1 rSysMin.flushAtExit = false;
3 x3 P9 R4 s8 t1 w3 Y0 j$ n7 y& ^3 ], c- i
var System = xdc.useModule('xdc.runtime.System');
& [' Z5 G. p' J" t% t S- f6 OSystem.SupportProxy = SysMin;
3 k M, Z6 C/ a" T- c: x
' M+ q1 H' m2 L/* configure SysBios to use the lower half of Timer 1 */0 A* b2 o" R! H& H) h( F" B2 l( B
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
8 L. \! g$ s& `+ G- b5 ^/ P3 X avar Clock = xdc.useModule('ti.sysbios.knl.Clock');
1 z8 T/ k* a( @ tTimer.timerSettings[1].master = true;
; L$ L- F& T- |9 a" ~. ]Timer.defaultHalf = Timer.Half_LOWER;
, |: N: h. f6 n' F6 C+ x9 i2 o$ bClock.timerId = 1;6 Q- ]+ @! @/ y* I( s8 x
6 Q2 B' p+ t: Z+ z/ l
2 d! z; P. P; R/*
3 Q' {, F6 j! z' _+ M9 r * ======== Miscellaneous Configuration ========8 q* H& s4 X2 q! p9 m& S
*/. w- }$ b) [( X$ R
5 o% h5 r# t& M( L* H' M$ S
/* set default diags mask */8 [: r7 y9 E- B7 b0 R, F& {
var Diags = xdc.useModule('xdc.runtime.Diags');& e2 w8 t; K0 |9 q. i
var Defaults = xdc.useModule('xdc.runtime.Defaults');, C/ C$ F X% S) @) K3 K3 Z
' d- o( D8 P9 `+ e" c7 S. u
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;* q ]1 t! m( Z# Z/ h9 l) X
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
/ G/ ^, R; x# o, x! M4 I+ R0 k$ }$ jDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;, n X+ i1 }& _* m3 U' k
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */5 M7 S g/ W Z# d' Y; A: n
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */6 h7 j; E: F C- Q
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;: G3 d c3 p' a$ [; s X3 V
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
$ { F0 E7 G6 a9 EDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
7 a. f2 g4 ~2 |: j' vDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
7 B1 B p8 A0 f7 G4 H; fDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;9 p8 E l; ]: C; u8 N
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;$ V$ O9 I$ h; A B+ A& Q9 R! N8 T- Z
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;" Q- N0 ~4 [4 {+ F# i
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
9 ^& B/ w% G, z* ` |Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;5 H1 c$ B4 E" J2 e- E% j; `
9 ?: M D2 O7 Q7 S
/* override diags mask for selected modules */
7 `( t" Y9 A3 N1 O% Dxdc.useModule('xdc.runtime.Main');
" x V, q+ C: R9 Y( v; Q( lDiags.setMaskMeta(
8 s2 R# i& b% H: V( g, v "xdc.runtime.Main",. f/ ?$ o$ H$ q
Diags.ENTRY | Diags.EXIT | Diags.INFO,
" U1 p; E# ?8 b4 F) a" R9 w" F3 W$ t% l Diags.RUNTIME_ON, D' q( Z6 A# g- R! o# f
);
+ O- e( l: Y& `- X9 @' d
1 H- s) e4 X- k% q9 ^$ g" z$ Hvar Registry = xdc.useModule('xdc.runtime.Registry');% ~" L+ [; [! ~/ q) a( Q' k8 d
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;0 T; N2 }: ^1 t+ ~* n% w
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
: b- i9 U8 r1 ?3 iRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;+ X3 p+ p* j" z- T! P
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;+ w- E. `# R4 P) z
6 l5 w# x Y4 e e: \/* create a logger instance */
* B& p) d5 J3 Y( _; ?var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
7 m- Q2 J, R4 V- K g8 {& rvar loggerBufP = new LoggerBuf.Params();( P2 e/ Z! F& I; t) G) R
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
}. D+ d! }1 C m, u' SloggerBufP.bufType = LoggerBuf.BufType_FIXED;
4 m% M: `: \. k( u+ j1 k- e i, w8 r) o% U0 N
var appLogger = LoggerBuf.create(loggerBufP);
9 H2 m9 h* L4 F+ f. h; Z2 Z- J: @appLogger.instance.name = "AppLog_Core1";. a% u) E- Y* F# j# E
Defaults.common$.logger = appLogger;
/ ~4 c* l- Z3 m8 w1 z5 WMemory.defaultHeapSize = 0x8192; . A) C# p/ ~3 G/ L
Idle.idleFxns[0] = "&LEDStatus";1 Q3 `& c2 L8 a
Cache.initSize.l2Size = Cache.L2Size_32K;* C: U' a: b! N- l* N5 g1 D2 L
2 c" v1 Q. x6 _1 `9 F
|
|