|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明) t; v! d% v) E% A
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下0 Y2 W$ O d* l; I/ `) a
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)" c& }% t' u4 a' i2 Y5 z
" M$ F/ k5 }, r6 ]/ m4 R8 m
是不是需要在DSP.CFG中进行配置8 H2 U1 p& U) i1 {4 I3 q4 Y" G
我现在的配置为
& {( B1 ] ~/ t0 }# z
& {0 Y4 B1 U: |% F# F. D0 \/*% X& P# X5 {5 P# o' A/ Y
* ======== Operating System Configuration ========2 b5 T h1 N5 S b' J$ Y
*/8 W* a( _& D6 ^" ]& M) a' G- Z3 x
0 X8 ?5 b6 H0 @, O/* no rts heap */8 N& x. _( S( C$ H
Program.heap = 0;/ a% B0 S7 }1 C/ g
Program.argSize = 100; /* minimum size */$ R* C0 r: g+ |: }: D. I$ V
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
/ e) O7 q' a" e. C, G/ w- V
+ W N/ z B9 K$ R: M R/* create a default heap */ T( u, z# Z! ?# h! r! p* Q
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
& H9 d1 b! @- p7 Avar heapMemParams = new HeapMem.Params();' k+ T' q% D: m9 \, c8 a
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大' a) `8 j3 Y# q* ]; C, |3 R# Z
) B3 V0 u# Z4 H
var Memory = xdc.useModule('xdc.runtime.Memory');
s3 W* x' l$ g8 b6 L& `- A2 tMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
1 q$ y! A* ]1 w; }! [3 [: o4 H" D9 G- x' A# @
/* configure System module */; r5 y* ?% X) o$ k5 d6 ~
var SysMin = xdc.useModule('xdc.runtime.SysMin');
4 L$ D; m {. L) _% kSysMin.bufSize = 0x1000;
3 u( N4 ?6 Y0 vSysMin.flushAtExit = false;
+ Q2 ^9 U8 U4 f5 H8 V& N8 H4 p4 Q! y3 ~$ y
var System = xdc.useModule('xdc.runtime.System');
" z9 E1 X7 g' J! n9 o1 vSystem.SupportProxy = SysMin;
1 k& j' y4 u8 L
`' X# W- I# N' X' H c% U/* configure SysBios to use the lower half of Timer 1 */( z1 i. Q% h0 E! u
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
- L X I1 T$ m. r$ b0 p$ Ivar Clock = xdc.useModule('ti.sysbios.knl.Clock');
8 q# ^3 ]* M9 l; X* {! YTimer.timerSettings[1].master = true;% j0 f& S7 c- x5 R2 e5 V; H
Timer.defaultHalf = Timer.Half_LOWER;9 L$ F2 `- P5 y, X7 D0 U7 P* Q
Clock.timerId = 1;
5 o) w6 ?3 O3 L6 s4 V0 @9 @0 o% P# X8 s/ L
$ c- \+ t' W3 w
/*
2 \7 S, j: I) u8 ^ * ======== Miscellaneous Configuration ========$ [0 \) C1 b3 |' Z, e3 M
*/! B5 Q `) C2 z3 O1 }
6 v. w# r) o- \+ q" h& D
/* set default diags mask */3 q- W1 a# O/ f- O% y7 {) }+ {
var Diags = xdc.useModule('xdc.runtime.Diags');" g' W3 o2 ?4 x3 r. X; w' d
var Defaults = xdc.useModule('xdc.runtime.Defaults');7 Y$ {. e5 e$ ~ u! w' T& w9 _. Z
3 ~8 `0 S9 W- _) r3 @$ F
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;, e6 L2 m1 E1 X- f% X; s
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
4 r; ]% i# A8 }) zDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
; ?+ P+ t8 W/ o8 A3 k4 y& wDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
5 H, [3 P6 B7 e, aDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
! Y' \2 c8 {7 A! K5 X0 E% iDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;7 f+ o& o6 ]! m$ d. D2 i3 v
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
3 I/ v( Y5 r3 t3 l8 j. |" }Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;- O% Q9 U. f5 C& V6 e b& B6 M
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
0 D+ v0 d* T; B1 n$ G, o0 C! LDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;/ u1 s% {( L O* e% Q
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
0 h w% I# M |6 F% ]! KDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
1 P! T/ ]: V: \1 E. mDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
6 v# X9 U8 Y2 R! U. aDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;1 ^' J A" V4 {0 s2 b
- F1 ?" `/ K4 T3 e2 a6 M2 Y! J/* override diags mask for selected modules */( @; B+ L0 ]& v0 ]7 P _
xdc.useModule('xdc.runtime.Main');
# _4 j$ B" ?! I! _2 nDiags.setMaskMeta(7 U1 h. ?( u6 [/ b: `
"xdc.runtime.Main",
: c6 x! G# o/ d) q Diags.ENTRY | Diags.EXIT | Diags.INFO,' t. U3 y( F- ]. |& Z
Diags.RUNTIME_ON
! r# q8 z4 G4 l; t% x; \);
- t/ K* ^3 `$ ^! ~2 p/ s. `0 O
. v* u$ t/ }( _8 zvar Registry = xdc.useModule('xdc.runtime.Registry');- N7 u; V/ S I
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
. X. n% T4 s, p( g8 C8 j1 @% lRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;' t' ~8 q) M2 y
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;& r5 I& ?6 |. i2 }- N
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;8 z8 s/ X5 S* y3 x% U
( s: Q3 x* M6 D! I) v+ X5 j7 X/* create a logger instance */
8 A# ]3 r7 B( B& x4 J( r5 r0 l! A9 bvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
( h6 e4 ?7 b1 pvar loggerBufP = new LoggerBuf.Params();$ A+ o: V, L' _4 V) a J/ X
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
- n W; c# O) X7 n ?* ?4 S5 kloggerBufP.bufType = LoggerBuf.BufType_FIXED;
5 p; X2 c1 v7 _; J% |! O3 U( K. S6 c! |7 q
var appLogger = LoggerBuf.create(loggerBufP);1 B4 m4 P! h8 u- Y: S
appLogger.instance.name = "AppLog_Core1";
& V0 _. b; l( yDefaults.common$.logger = appLogger;
: e6 W- b, o5 l! j: ZMemory.defaultHeapSize = 0x8192; 8 L- e8 t# s4 z Y8 H
Idle.idleFxns[0] = "&LEDStatus";
/ R2 ~/ D) f" Z# T6 \+ HCache.initSize.l2Size = Cache.L2Size_32K;' D# l9 T/ G1 E8 T4 A
. {" T% i, q- o% _) f |
|