|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明, J! e8 r/ b, Q2 V: A ^0 b
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
( C, K# h+ R$ y6 ?: v3 X(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
7 k8 T6 F# t; A
! A1 J1 y: Q! k, [是不是需要在DSP.CFG中进行配置
5 a7 u2 z2 Z' j7 U我现在的配置为
- y" c: l' o$ [! Y
5 [/ I. ?" c* q' P& l @7 D5 O/*5 _. W1 V9 y5 ~+ v( Z! f' t- I
* ======== Operating System Configuration ========+ C- I4 i4 _1 A
*/$ h- t) O% Z, F( j5 V
! c7 X* |# g# C, s) Y# {
/* no rts heap */# q5 D% z2 Z+ J) q) H9 Y) k8 K+ Z
Program.heap = 0;- w, m; G6 K; O. P+ N
Program.argSize = 100; /* minimum size */3 J1 m( S/ w2 E/ v
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
% o! @# K! {5 ? g
5 A& t( v9 W/ B4 s [/* create a default heap */, x& c+ S9 i& X- N
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');& ~- @: h9 }) H# W+ l. l# m
var heapMemParams = new HeapMem.Params();& P0 S2 t0 ]/ P
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大2 p% h! b! N5 L' f- [+ X6 t
: q: |5 Q% Q+ h5 c+ ~( r4 p7 Qvar Memory = xdc.useModule('xdc.runtime.Memory');# n; s" ^; X* L" Z b, ^+ R
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
. c3 |$ z" P6 G7 ?* K. l8 j1 m _8 n3 [ C
/* configure System module */3 ^* ~& G3 ?4 V- h! c
var SysMin = xdc.useModule('xdc.runtime.SysMin');9 Y4 X1 ~! m. E
SysMin.bufSize = 0x1000;& C$ R6 `0 e" T% N' { c
SysMin.flushAtExit = false;7 m- `# e( H" g: I% I, h% L- {
8 @9 v, e2 z* R+ s- b( e! t. D9 rvar System = xdc.useModule('xdc.runtime.System');
, ?/ i* D& z$ ~. P4 `1 Z RSystem.SupportProxy = SysMin;
/ ?7 _. j8 V. G) j: a& T+ y" _5 N( G5 C6 U0 P
/* configure SysBios to use the lower half of Timer 1 */
: n2 R0 w( @) [+ A! g# E8 z" ivar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
4 _# f' m6 [9 N& b( vvar Clock = xdc.useModule('ti.sysbios.knl.Clock');; s0 J1 Q" `! f, } N
Timer.timerSettings[1].master = true;
5 u$ k0 J" g4 D1 h3 YTimer.defaultHalf = Timer.Half_LOWER;, v; r- T7 J& c$ c! I# E
Clock.timerId = 1;1 P: H3 q5 @! `! u! A
8 I# G( O' e2 r
" V4 i$ M! X3 Y$ l: a8 [/*6 Y2 ]. t- {$ ]( |
* ======== Miscellaneous Configuration ========
3 C1 @+ M; y2 X' q6 j */
9 M9 G( ~) g/ z4 R; q3 c; d# F; n- `8 j6 q0 p% ^! Q
/* set default diags mask */
+ V$ x% L# e2 G- P; }( B$ J+ p" ?, ]var Diags = xdc.useModule('xdc.runtime.Diags');+ E, {7 ~- K U2 H* \
var Defaults = xdc.useModule('xdc.runtime.Defaults');& Y- A! }. o1 O O/ p, _6 C' [$ m
) n$ U& ~4 k. w' r( h; ~
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
; V2 f4 {2 h$ G2 p5 y. i3 dDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;; q6 H5 D/ S8 d8 M u
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
/ q4 Z* Q! ?! l. q9 ^Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */( Y- k O& b$ K7 y- h( I$ f; R
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */) z: u3 B; [) P" `7 V P
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;2 s2 y3 m, x: X
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;" }# I' m; G* n
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;5 w$ A8 j% w5 D7 O+ V/ e A' }
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
; j/ g3 v3 _5 E0 ~% m" j7 RDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;. [' w3 N* _! \$ Z5 P3 k6 r
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;7 \ u, _' O8 V6 |! V! Z
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;, Z/ i/ H: |3 [* p, S/ d" M
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;8 \; k" Q) U4 S6 r- L+ _$ v$ J ^
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
7 |. n$ z! z. s4 Q9 q: z1 n5 z5 n% l# a% V
/* override diags mask for selected modules */# h% {, ^0 g" |5 ~
xdc.useModule('xdc.runtime.Main');
0 F+ Z9 A4 y# a$ D8 d) }8 bDiags.setMaskMeta(
' d' w9 E2 l* H "xdc.runtime.Main",
5 Y/ H9 y0 H3 B, ^ Diags.ENTRY | Diags.EXIT | Diags.INFO,
/ X) l; D5 H% f. U0 A" s' Y! A" b Diags.RUNTIME_ON
1 l r4 {/ x& z! s/ L5 V);7 d4 w8 C# R( ^$ A$ ^7 X; G
* k* M: A; m/ j+ U& F& k w
var Registry = xdc.useModule('xdc.runtime.Registry');; ?/ D: R) n* p0 g$ T
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
; w; c8 d* {* e! `Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
+ {# c# Q" o& ^. bRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;. ?, Z: F: F- s$ c# K P% t: t' c1 R
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;4 R5 V t* z0 f" K/ T3 {# d
: i4 Z7 a2 x+ A% P& n& `
/* create a logger instance */
) @% A- F' Y5 u& X6 g& H6 evar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
' B$ a4 q: @" Q& I+ Wvar loggerBufP = new LoggerBuf.Params();
5 h" e) {, f' aloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
# q4 u7 E/ r! [% @+ C. RloggerBufP.bufType = LoggerBuf.BufType_FIXED;1 q7 P* l* e4 ~5 B) J
. W7 U& s- ~& ?! X" ~) D! [7 P
var appLogger = LoggerBuf.create(loggerBufP);
# q* L; f' G' s' V; L, sappLogger.instance.name = "AppLog_Core1";
" t H) ]$ y* l: L6 E% O; {Defaults.common$.logger = appLogger;6 I- y" `8 ]- T) {8 s4 N
Memory.defaultHeapSize = 0x8192; ' c! A6 f* g, S. k7 ]& {
Idle.idleFxns[0] = "&LEDStatus";" S8 n$ Q% N; [
Cache.initSize.l2Size = Cache.L2Size_32K;
' [$ N5 x7 b) K4 Y0 e% J
* Y, ]( V8 B' z& l0 {% ] |
|