|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
: @; r z# u( A# l我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
, F, f6 Q* m& D8 U q(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
, |+ C% F9 N5 n- E# S# W( U6 a2 {9 {, o f H
是不是需要在DSP.CFG中进行配置
; p( k" n# n+ M. d _7 ~ G9 S" K我现在的配置为6 L; q' \3 \& A2 b
% f5 f9 I% x/ t. U' M
/*' M" b1 U# w. `) l1 v, P4 b0 _# n
* ======== Operating System Configuration ========
' e) d" ^1 ?% {7 C */! T) j! b7 g$ {( L/ l" Q5 J
; u5 B' }2 b/ {( N% z& n/* no rts heap */
' |. h! x# W" N# D) T, N( N8 {' NProgram.heap = 0;
2 \& Y0 L, t: u# \: @0 J4 ~7 NProgram.argSize = 100; /* minimum size */$ ?/ ?! P7 C2 E. Z0 c ~
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
( Y6 n( q/ E! b7 b3 U+ ?$ o; r9 Q# W }# w: f0 S& m
/* create a default heap */7 S6 U! I6 m" L
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
: N) h/ j K; yvar heapMemParams = new HeapMem.Params();
' y# x) K& J: y# ~, u% mheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
. @2 ]" E0 K# z# l; I5 A ?& @9 T% ?/ z# f' o0 n
var Memory = xdc.useModule('xdc.runtime.Memory');
8 m8 U8 |3 `3 M4 v, _! vMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
5 W+ {) d% P; a1 q; q+ O! n
! w6 I5 y+ t0 B+ z# o, K' c5 J/* configure System module */
" n6 F9 A5 g' o" G& N/ s6 @/ mvar SysMin = xdc.useModule('xdc.runtime.SysMin');
$ m' L \5 S& z7 c% [SysMin.bufSize = 0x1000;
: Z1 w0 }" T! O: z6 A& H% KSysMin.flushAtExit = false;4 `4 d) t O3 P Z
F* S2 ^* P- M7 uvar System = xdc.useModule('xdc.runtime.System');& ?+ m) Z$ ?$ Z1 E1 d" y. C
System.SupportProxy = SysMin;0 X. I1 c* _6 m" a# Z
1 n+ P6 u4 Y' L6 x, l& k
/* configure SysBios to use the lower half of Timer 1 */
7 ^# [# Y5 [) X1 ]' t: zvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
" r8 F I: I/ E: u! l- Yvar Clock = xdc.useModule('ti.sysbios.knl.Clock');6 u6 H9 L/ }/ D' ]. C, A& \
Timer.timerSettings[1].master = true;
1 ?9 n/ X/ ]2 k3 W1 m& pTimer.defaultHalf = Timer.Half_LOWER;* T1 X" v# y$ }: b% ?
Clock.timerId = 1;' A$ z' d9 i- U+ z1 d2 I
% T6 X6 s. u* D" O% c
* f7 v- j1 Y/ C! K) F/*
' D" F* b9 f5 o * ======== Miscellaneous Configuration ========
* o: Y! w, e4 q0 J" o */9 m( |% J' `% f/ _! b7 f
2 Q1 d/ u# s% K! [3 E) w/* set default diags mask */# t2 ]0 {, _7 I6 R
var Diags = xdc.useModule('xdc.runtime.Diags');
" G) [" w' {# g! b4 K3 D6 qvar Defaults = xdc.useModule('xdc.runtime.Defaults');, c" e: y: X0 ]# l; M* C
+ \' J9 y3 s& _# lDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
- K3 n' x- o# S Z& G; I+ |9 ODefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
5 e2 e2 a' S: m& p) cDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;4 i5 p3 k' o" O* L' W0 b
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
t% b7 e$ W: u3 eDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
. A4 A3 D* w/ Y6 f7 \1 bDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
" @ ^- b3 {2 L2 ?3 b3 nDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
# x- ?/ i! ?% @$ @9 |( HDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
! J, C9 }, P/ }6 z7 _& t9 `Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;! D2 \; i* { y1 y3 s
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;$ C1 V; ]8 f! o# F9 `
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
6 i' ?1 w+ J# ZDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF; h8 G/ Q7 N' o/ c$ v+ G( i
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;9 r+ P5 l+ J9 r& _& [5 b3 i- b" J2 F
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;! W) v5 r# l% ?9 S% g0 w; L
9 r) _6 s+ ]+ D3 `% y5 c% |+ H
/* override diags mask for selected modules */
6 K& |6 x# c% N( e6 b1 Ixdc.useModule('xdc.runtime.Main');
5 N4 s3 X: i3 r. w( x# cDiags.setMaskMeta(
# M: p& ]: q3 Y( K x "xdc.runtime.Main", W* G+ N2 T) k' b
Diags.ENTRY | Diags.EXIT | Diags.INFO,& }( B2 [) c, ~
Diags.RUNTIME_ON/ [/ w+ M! ?! Z! ~6 w7 K5 p
);
7 X% J7 H& d9 a* M8 `
, x0 ?8 S8 W) jvar Registry = xdc.useModule('xdc.runtime.Registry');
# e" E/ ]$ q5 C& g$ k: E4 a( \Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
$ w p# j5 G+ w, U% A7 h# Y2 R4 QRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
; i9 N" u3 T# PRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;+ |% {& ?/ R3 p7 R
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
/ E* M# ~' c4 Y" {/ ?% \1 G2 S: Y u) d
/* create a logger instance */; O9 Y+ N, V* d) o9 O4 D5 E
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');# y* p f+ a2 P# ^. W+ j$ y
var loggerBufP = new LoggerBuf.Params();* P) F6 J$ {$ A/ ^4 | D" a2 K
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
% U* U# T7 G$ m% _4 z7 _8 M EloggerBufP.bufType = LoggerBuf.BufType_FIXED;: Z$ F; }* G$ }) d }
! S$ C4 M2 P/ z3 [. ~1 Wvar appLogger = LoggerBuf.create(loggerBufP);) r) v2 z6 y' k' F( q
appLogger.instance.name = "AppLog_Core1";, T" |$ o) X. G5 P9 X8 e8 @
Defaults.common$.logger = appLogger;
5 Z9 |" J# c# x7 s. A) h2 kMemory.defaultHeapSize = 0x8192;
' d* x( l+ E, F/ l9 E" X3 tIdle.idleFxns[0] = "&LEDStatus";
; I$ E) @! o5 K/ m ?Cache.initSize.l2Size = Cache.L2Size_32K;, A" a$ {4 G) e/ d2 ^! @
/ C, s8 w) {$ H$ Z |
|