|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明8 _0 m( _: o& v8 C7 S
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下4 K7 [; }% ]0 M% F6 J8 g
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
; x4 d. o2 G( h. m7 F; ?! \. y, f& v- ~- ]* S5 o1 }
是不是需要在DSP.CFG中进行配置; h! h& q/ H: L* a7 f
我现在的配置为
$ i7 A% f4 e0 c# B! Z4 e4 p8 K, i; L1 |: T) C2 g. H6 b
/*
7 F8 j3 }; x6 Z! P* U4 R * ======== Operating System Configuration ========/ T: s: t/ d( t6 R {
*/
$ S, j% J/ p' b5 p( w& }) ]# L/ F
' ?9 L0 F& ?) s3 E/* no rts heap */# P/ ^! C* E: w1 ~2 \$ s
Program.heap = 0;. k/ ?% @0 F/ }8 u; \" l, ]
Program.argSize = 100; /* minimum size */
# ~; _ x. j2 J ~* {% t5 bProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大4 V; `# \1 B4 \ e4 J1 L# z( d
" K9 g8 c: s2 S/* create a default heap */
& R; h' @+ y5 ]! \var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
2 s4 B3 M% T. r' |var heapMemParams = new HeapMem.Params();
8 R' x" F% @7 I- u7 E' [3 w M1 U3 PheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大8 x. C( ]( t" Z0 c# u+ g
& Z" w: C( O4 h8 s; f
var Memory = xdc.useModule('xdc.runtime.Memory');
1 V: p, A! g/ y; UMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
% ]7 V/ }& h" ?3 C1 M+ U. g
, D# x) o& r$ v. T2 J r% D) ^& z/* configure System module */
; g# L1 ~/ {+ x' f5 Pvar SysMin = xdc.useModule('xdc.runtime.SysMin');- J# Q1 c/ X, D5 F. Q( X4 p: d5 x
SysMin.bufSize = 0x1000;( r" {! H7 j7 |9 U
SysMin.flushAtExit = false;9 R0 L8 P1 s+ N/ c
: n' V7 @/ W5 O, N
var System = xdc.useModule('xdc.runtime.System');
; [2 ?& f# ~9 @% I6 g( z! v/ r+ hSystem.SupportProxy = SysMin;
0 a( {) `" ]- B$ K( `# }" P% a' `, S. Q7 W/ Q
/* configure SysBios to use the lower half of Timer 1 */" R5 Z& B8 u7 e4 P* C8 h5 K: J, D
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
7 } T1 ?5 W7 J/ ]* o1 cvar Clock = xdc.useModule('ti.sysbios.knl.Clock');
3 V# M) D; ~' ?' MTimer.timerSettings[1].master = true;1 Z; W; G( U! ]8 W" I
Timer.defaultHalf = Timer.Half_LOWER;
" N4 i" P: a' b' w4 F# h( RClock.timerId = 1;2 W { d& Y' q: M$ j1 M
$ `/ Z" K8 y- N8 g1 W* G; }% b8 k [+ ~- J* ` z ~% g, t
/*
5 T$ l7 B4 W# Z( [& {* S * ======== Miscellaneous Configuration ========
! u& l0 e4 u4 n/ q, } */1 l& i0 s, |, I( @( W
" W. ~ d2 d1 ?7 i7 C) `
/* set default diags mask */
: R0 |' ]) _/ [/ K. @6 ?4 Fvar Diags = xdc.useModule('xdc.runtime.Diags');
' A$ F! S) _2 j) r% z8 C! bvar Defaults = xdc.useModule('xdc.runtime.Defaults');
3 c4 C- ]* P. h2 J2 d6 Q
/ c G5 m5 p) i6 T. \5 z8 EDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
: D) ~2 f3 d; ]) k( Q5 @Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;) E( j7 ^/ @! I2 o4 ^7 @
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;, s* [! [ p/ [9 {" n8 }
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */& E7 ]1 Q. ^( c u+ w9 O
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
& F2 h: z# N8 {$ b9 ADefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
6 q. p9 p. y" o9 r9 MDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
0 ?/ R/ r8 V O5 y1 ADefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
: c- Y q, X, S2 a. bDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;% G- n3 W: [) t
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
% B( e$ k) d& R* \% H* Q8 e" J$ yDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
) D( d: a& D8 e1 ]+ mDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
# V* f- N! L7 ~9 iDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;9 ?9 `" s& Y: x+ w8 O1 ^; R
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;: k, D, k9 y. A6 j- y0 q
/ o! j3 @1 ~! S
/* override diags mask for selected modules */
, M# l6 f5 h4 |" X& [xdc.useModule('xdc.runtime.Main');
- C" ~9 F2 b% QDiags.setMaskMeta(/ e3 f# s7 ^ S: G) [
"xdc.runtime.Main",
{1 p5 x# N9 F/ d4 { Diags.ENTRY | Diags.EXIT | Diags.INFO,) L& U# s+ Q+ F) E5 o M
Diags.RUNTIME_ON0 `/ D+ L8 X5 ?, {, Z, h( O
);; }( R+ o- ~- c7 a4 S
4 G- d6 G4 q6 |2 x, A) \6 L# W: h
var Registry = xdc.useModule('xdc.runtime.Registry'); y3 u3 t4 I6 u$ v
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;" D/ I2 ]- d6 M+ m5 u
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;9 O; T2 ]" c3 v( ?: Y
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;% W& K4 c6 T, d# K' l9 w# X' I
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
; \+ m0 Y& ?/ S+ F
/ @! F7 L8 K: h' \: V! o8 I% ?: \/* create a logger instance */( `0 Y. P; `- E3 G" v
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
2 R7 U0 v: O7 |5 D: Cvar loggerBufP = new LoggerBuf.Params();. F/ B7 Z! T: \6 a" G: h) Q
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */2 r' _" ^0 q1 X
loggerBufP.bufType = LoggerBuf.BufType_FIXED;9 Y5 J0 C" Q* X& y- G$ u
$ \9 u" w' r7 T% K ^, v Yvar appLogger = LoggerBuf.create(loggerBufP);
5 S4 {; }7 V+ CappLogger.instance.name = "AppLog_Core1";9 t5 w$ p& R( B3 K1 I7 b8 J
Defaults.common$.logger = appLogger;
' @2 I% d. d8 m' u7 t0 L4 {Memory.defaultHeapSize = 0x8192; & w. V1 a# L) j: [7 Q8 k# i
Idle.idleFxns[0] = "&LEDStatus";
4 s. m+ m' |5 b0 j- QCache.initSize.l2Size = Cache.L2Size_32K; F+ ~: Q' C g0 @
" ^: f- c+ @* P" ?
|
|