|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
G8 w9 J( g$ O4 h; h我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
* z6 Z% W+ n% G& u: D& [6 l6 @(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
! T: ?$ R) i" e
4 V3 J; S7 @ a8 E2 T是不是需要在DSP.CFG中进行配置- f3 i1 N: ^" f9 X s. Y
我现在的配置为
' }/ l4 R+ N& {2 J9 M
6 b7 w+ ]2 j' @! R/*
( M( z1 B5 n+ N * ======== Operating System Configuration ========
. Z+ M. X( R/ k* p */1 E% D5 ]( l1 v' n8 y1 v" u6 m
0 o8 @" m# N7 @/* no rts heap */, l! d- l7 ^. S' T4 ?# e' x
Program.heap = 0;) P9 S s: b! M8 m" P: _3 V
Program.argSize = 100; /* minimum size */
, h8 F0 f* `! `- T/ t1 iProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
; I1 K# ^2 n0 y) t1 f5 n! {6 i0 X& O1 t- {) [* w
/* create a default heap */
0 v4 B% C% J3 S" l3 B3 k+ |var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');) a- e8 Z' _, W# K6 |, ] i
var heapMemParams = new HeapMem.Params();
4 N- G' }( Y% D6 CheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大8 Z4 `# D* `8 S
& D r) q3 }+ q2 j+ N, O, K" a9 K
var Memory = xdc.useModule('xdc.runtime.Memory');
3 I+ `" w; K: M- G) AMemory.defaultHeapInstance = HeapMem.create(heapMemParams);) S/ ?! l7 _. E& P9 s
0 f# P$ B+ @) M! G
/* configure System module */5 m0 Z& I& r- }
var SysMin = xdc.useModule('xdc.runtime.SysMin');
) E% y8 N+ B; k7 WSysMin.bufSize = 0x1000;, N! Y. F2 y+ j& j* @6 C4 u
SysMin.flushAtExit = false;' P7 K2 {+ I% z. r- ^
; M) A6 u7 m& r" Z/ N/ @: K& }) G! Wvar System = xdc.useModule('xdc.runtime.System');# l3 c1 K8 m) q* m9 m
System.SupportProxy = SysMin;7 b. E/ v0 |3 W b
" i" }) C. B5 _1 C" r
/* configure SysBios to use the lower half of Timer 1 */1 S3 n n, {' B6 d, ^5 ]& Z
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
0 I O8 ]7 {$ }* A0 ivar Clock = xdc.useModule('ti.sysbios.knl.Clock');
' ?( r/ F% F* o+ M; W0 `' h" _Timer.timerSettings[1].master = true;, c' T$ o) T% H
Timer.defaultHalf = Timer.Half_LOWER;# i/ P+ B$ V0 e
Clock.timerId = 1;
; W S5 M% j* m3 `3 ~: n
; f8 b" [* j6 A. w' @6 ^& c# t+ r" V5 x- ^
/*! ^% @9 x5 T0 {9 _
* ======== Miscellaneous Configuration ========5 V. h8 K# W& l+ Z/ U% l2 F$ b
*/
* P: p% [- e+ Q! b* L
. A9 P' r1 R- r# j+ m- v" w/* set default diags mask */7 q. q) F$ b' o4 y' }* r
var Diags = xdc.useModule('xdc.runtime.Diags');( c9 I. i0 \% a( c) |
var Defaults = xdc.useModule('xdc.runtime.Defaults');
4 A$ c: B" O: `0 i- M; |3 {: {1 h0 n) ^8 ~4 }! I7 R
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;- L8 J8 k( i$ f, j6 { `
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
- e1 K2 P( @9 F( ]- {Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;+ e3 K4 Y8 S7 h
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */- E- z1 P& B: K$ H, a) ~
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only *// s' l" g; Q5 @/ n( z. D! P( v
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;" e0 o! Z3 Z* I' g
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;1 G. }+ Q6 x! O
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
{9 }. z, R" ^Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
8 V' g$ i3 w, P- E( `Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
7 {2 n/ c& h: E: v- cDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;8 u* W$ v5 t# h0 h% D9 {
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;- V9 ]( w- z3 D, u) A v1 Q* Y V% F' A
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
$ ]0 j0 O9 {2 U8 o# BDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
* p1 K6 u) c3 A0 {+ m% X$ j( Y. h: R( Q; s) g5 W
/* override diags mask for selected modules */
n7 _+ O8 t6 S2 C$ t& C. ?xdc.useModule('xdc.runtime.Main');! b0 Y: c7 r1 L; p# |
Diags.setMaskMeta( G" b! ^/ C- S& \( l K% r
"xdc.runtime.Main",' Y( m! ]* g. X7 y
Diags.ENTRY | Diags.EXIT | Diags.INFO,* E5 t) H& r: c5 F
Diags.RUNTIME_ON$ F0 O$ e& s2 F6 Z8 o* B
);
0 i( Y1 x a" k ^9 ^3 m* }! M3 ~) }+ P }' q7 B+ x2 R6 p
var Registry = xdc.useModule('xdc.runtime.Registry');. z/ [9 \$ P; G" L
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;" [8 V9 ]& Z2 O$ y; e
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;, l8 I* t2 T# R. d! h% a/ B6 X$ [) d
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
% Q% g7 u) v* ?! p0 } yRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;3 r1 Q7 A. P) p4 i& p
' A6 W* T, a& W# y2 t
/* create a logger instance */0 _" a! { A5 y2 P1 |0 Z3 N4 G; o4 ^
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');# t1 }4 {( }+ s0 Y J
var loggerBufP = new LoggerBuf.Params();+ }3 \, V e* w& ^, `
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
, u5 r7 e3 ]. X; ^0 Y: UloggerBufP.bufType = LoggerBuf.BufType_FIXED;
) r$ }) @* W! X: ~4 p9 n
3 I1 S1 {* X! J: Q& Rvar appLogger = LoggerBuf.create(loggerBufP);
: N3 U' k) x+ j _5 ^- tappLogger.instance.name = "AppLog_Core1";% _ P; T" A" C" g. i9 e3 Y
Defaults.common$.logger = appLogger;5 ]; u+ u1 d1 W( F
Memory.defaultHeapSize = 0x8192;
5 r$ A) X; t2 s. UIdle.idleFxns[0] = "&LEDStatus";
5 e. z* s' {% h- vCache.initSize.l2Size = Cache.L2Size_32K;
6 a$ J- o1 z: T* ~) H, g6 w+ F4 |, d2 ^; x
|
|