|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
5 p: d! E3 t% F我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
: C( l6 m. |+ H1 \+ m* m2 c(不过疑惑的是,为何单独DSP仿真就没有问题呢?)# u/ r6 }; H$ _# {: s q( q, C/ j
% Z- L+ T* g0 ~4 H6 \0 ?- h是不是需要在DSP.CFG中进行配置
0 @" D3 N$ m. a7 x我现在的配置为/ X" r# A5 `# O2 V! }" g+ W
! B) \1 R- ^0 N7 ]# z# R4 v/*/ `9 Y7 C( T' i( K2 ~/ _
* ======== Operating System Configuration ========
$ V, w6 v- K, u% d6 ` */
; }: n# ^* g9 W& ]. D
4 W- \& |- h! v9 j3 F/* no rts heap */
5 c9 G" [+ g3 U5 m* o# [/ UProgram.heap = 0;' _& C8 Y' E8 o' D+ b
Program.argSize = 100; /* minimum size */
# c3 A* F$ s& a$ _Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大* ]6 x1 f' W; q* }+ H W' a
6 H v- q. z& I9 j/* create a default heap */
3 k* g" T4 a6 \- ?, ~: M! Fvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');, |6 d( a/ m- ^% d( O& G0 S1 r8 p
var heapMemParams = new HeapMem.Params();
, c3 t% q \- F: J, Z4 L& y ]heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大( e3 A$ ~+ [; f. S* Y5 R2 e
2 H/ D2 S4 D# d5 |, I( \9 \+ d' [
var Memory = xdc.useModule('xdc.runtime.Memory');5 t/ M( k" e1 V, c5 ]! A
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);, V. [4 q8 V; n) E s
; ^5 z, G9 x% J* P+ J$ n/* configure System module *// f, r0 p# X5 E9 G/ P9 {" o
var SysMin = xdc.useModule('xdc.runtime.SysMin');
3 O% P0 Y" R2 n$ TSysMin.bufSize = 0x1000;$ t1 D2 d$ \. i9 Q
SysMin.flushAtExit = false;
6 x7 z/ z+ C# F8 Y3 V& e$ @. T$ p2 Z0 b5 O- F
var System = xdc.useModule('xdc.runtime.System');
, X& {. p5 }. p% s" D- X9 lSystem.SupportProxy = SysMin;
+ ^2 u5 D. u+ l6 d' @* @0 |7 T; G& x1 v4 I
/* configure SysBios to use the lower half of Timer 1 */' r7 }0 c, z6 V& ^. M
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
( s9 C( Z* `. ~! r- ^3 B9 M6 g$ a9 B4 nvar Clock = xdc.useModule('ti.sysbios.knl.Clock');5 l! M8 ^ ~" ?
Timer.timerSettings[1].master = true;( B! G1 {5 R0 R" j5 L8 V T7 r
Timer.defaultHalf = Timer.Half_LOWER;& n7 N+ _8 h/ w4 H
Clock.timerId = 1;5 ?+ X' A$ X# |! s1 M
/ B. I. y% U; u+ s# e9 t- S7 f- j0 s3 l
. e' E% c( q; A4 e& |5 p/*
\, _! n2 d+ L+ {$ k * ======== Miscellaneous Configuration ========
) V, c7 _+ m5 a( D. t */' T/ f1 E) n; e$ D+ G8 {* C
+ w5 |2 a9 ~" h/ }, c2 u/* set default diags mask */
- [0 f6 P. J" B* [0 \; g" J; v" E/ rvar Diags = xdc.useModule('xdc.runtime.Diags');
; \/ G8 d- s$ Z4 P* B9 T& dvar Defaults = xdc.useModule('xdc.runtime.Defaults');6 ^! S2 ~4 i l' O& i% R9 _
2 K6 Y! e$ [0 z. R. e2 F
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;& p1 X# m o& H, z0 Q
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;# z5 x% Q: p2 V; S- n& ?# w: t6 O3 r
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
7 ~1 V- ]" R( i$ T2 oDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
4 {8 V8 R' q# P" X5 L5 l$ BDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
0 z2 Q/ t+ l6 Q, ^# IDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;- s' p% }# [# G' K
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;! z$ R0 S. A6 [6 @
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;5 q: G1 g. J! R: r
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;* s# k" ?, ]1 r
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;+ C, q5 ?" w* C+ L5 v# {
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;) ~8 M2 n0 T: y |+ u e. ^) r) ]. `6 o
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
0 h' o$ q+ H! r! n; fDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;5 K* q. R; {5 V/ [2 x
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
_- h# h4 |, K! O9 J$ V4 w
, T/ k4 d j& z9 q' e4 D/* override diags mask for selected modules */3 n7 N% z. t/ H5 a# z# L
xdc.useModule('xdc.runtime.Main');2 p' q2 c0 \! k. P; r
Diags.setMaskMeta(5 |4 s4 s( C& w, V3 r
"xdc.runtime.Main",
; K' u2 J( C0 G4 b Diags.ENTRY | Diags.EXIT | Diags.INFO,
/ w3 z- Q7 A' f! l/ u: K: u Diags.RUNTIME_ON: x" m+ F& p: w; |. I+ M6 J
);
' s- o4 C5 a9 K. q" ~) @4 U C
% W: F' h' Y; t% x5 Yvar Registry = xdc.useModule('xdc.runtime.Registry');
% |: ~0 ]+ C2 E$ zRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;; H; Q3 U3 ]3 N5 c7 P, v
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;; c6 f" W( N7 o9 @! r, E& Y
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;3 a9 i6 l( D+ g: _
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
! d/ W( `# ~& X* A# Y5 A% B/ c& X2 b) w+ u
/* create a logger instance */
; r% U ~% m& fvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');" T' ?! L7 }0 z7 Z" v
var loggerBufP = new LoggerBuf.Params();
$ K2 E/ K* X U2 l* bloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */3 M0 F- Y3 E" l: {; o: }
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
7 V4 q% h9 C A/ w" a4 a; _2 D$ y: w j* H5 o5 D
var appLogger = LoggerBuf.create(loggerBufP);3 A* M" l- ]8 O- M9 U2 |& s
appLogger.instance.name = "AppLog_Core1";( b3 Z8 o" c" L+ M" B, ]
Defaults.common$.logger = appLogger;
, `+ v7 X8 N% j+ uMemory.defaultHeapSize = 0x8192;
) W3 i& L) ^* K! q* xIdle.idleFxns[0] = "&LEDStatus";7 d3 D) E) d# P
Cache.initSize.l2Size = Cache.L2Size_32K;/ ]' e5 _8 s! n& o: T& [
( p, M, R b2 c3 m. w |
|