|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
( d9 i* J/ V* \, z5 i我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下! ~- O0 O0 O1 ] A; B
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
- L/ a [- I8 z
) u6 D1 G8 ?; t是不是需要在DSP.CFG中进行配置
7 b+ s+ @% ]8 J7 O. _我现在的配置为+ {. A6 I5 I& Y( {7 _1 Y7 ^
! H+ D- ^" H X) x
/*
8 o! O% h3 S6 V: S0 z5 y d * ======== Operating System Configuration ========! x$ {) W, `, W
*/
" Y+ u+ i, [1 f: f: ? n- e* X$ Y1 Z6 j% Q" K4 q3 I8 [
/* no rts heap */
- g X+ Z' y* i% nProgram.heap = 0;2 ]9 |8 k# M) U, I6 P+ q) \
Program.argSize = 100; /* minimum size */2 x; i) `6 o+ B0 Y
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
2 I0 N) @5 {$ R d; x7 q+ n( b5 d( C/ E0 z% z4 X, R5 O6 `, B
/* create a default heap */' c1 G1 F" x+ v
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
4 Z7 S2 b. d% J- W( Hvar heapMemParams = new HeapMem.Params();/ y# b7 z& \' {/ v% d/ u. N
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
$ u# n3 J' q5 E3 L3 q
2 K: C$ \0 L9 l7 Ivar Memory = xdc.useModule('xdc.runtime.Memory');
& M& P; D6 e/ N5 h/ R0 k: {Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
: d) u. Y: N. p6 J) D+ r
7 E' y; W. Q( g/* configure System module */
5 N- D# S1 m3 \- m9 P9 b- Kvar SysMin = xdc.useModule('xdc.runtime.SysMin');$ J, d- [$ R+ C3 y% v* y
SysMin.bufSize = 0x1000;: I/ G0 |3 C! a- N% G
SysMin.flushAtExit = false;' R& N5 z* N* {2 ], b( T% U0 W% m( B8 u
) M, X9 |7 c1 k, S" a8 Z2 \& c
var System = xdc.useModule('xdc.runtime.System');0 p! ?! S& ]1 t, q' X- Q
System.SupportProxy = SysMin;" [- z" Y+ E( O9 ?8 y
- k. ] N( z" [8 ~/* configure SysBios to use the lower half of Timer 1 */
4 i9 b5 X+ D0 J# I/ v" Gvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');0 W/ M- c, z' ?5 O, E* C
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
! {8 f0 r S" X0 z; G8 l8 J8 @Timer.timerSettings[1].master = true;
6 q& H3 V; M& W+ UTimer.defaultHalf = Timer.Half_LOWER;# {$ c' Y1 U7 h- O
Clock.timerId = 1;8 T! L! o: ^5 v6 u1 {0 \$ e# J, G
' V+ g, C* f8 X2 m, M
# n4 Y4 V. ]" T* ~& m
/*2 {/ O' j r3 E3 X" \5 s
* ======== Miscellaneous Configuration ========
. }! W$ m) _8 A- `( v5 p */9 x: m3 w: W {" @" G4 s1 E
: P- p# J$ I' I/* set default diags mask */' E# @ q+ q( Q# u4 a. c
var Diags = xdc.useModule('xdc.runtime.Diags');
! D; B8 ^5 l( c# t: ?var Defaults = xdc.useModule('xdc.runtime.Defaults');$ C% E# ?, e( W9 r, x2 G; v, R
- ^5 J: |* J7 D4 s* ^- UDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
! e' Q+ m6 Z3 J5 cDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
4 j) W6 y. h9 D* D) EDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;; B- @8 l& B2 T j" s5 B
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
7 \( y: }% z4 S( s# dDefaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */& M( Z8 \) |( d( k
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;
2 O3 R+ ~1 |0 c" H$ D! ]" kDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
5 [- G! U4 ^; @, v2 y5 tDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;3 u! e R+ v/ ^ Y) `6 [2 y
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;: w) ^" Z# S& Z1 q" I% j5 q5 L8 u
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;( \# W+ @' s8 N7 l6 J2 l4 v
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
8 u9 J- B" m7 W; c. _( S2 ?Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;' C/ j: i! u& b# {
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;, g" R9 z1 P' [% W( o# S% Z
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;5 ~- v1 f# t. e7 @0 ?7 @4 l# |* f
$ ~3 Q6 [- e( A( h* j) Y/* override diags mask for selected modules */3 S$ s8 b; H7 D/ ?+ i
xdc.useModule('xdc.runtime.Main');
. U) H* d# _( a$ ?Diags.setMaskMeta(5 G9 W Z/ j3 Y
"xdc.runtime.Main",% e5 o& y4 J0 e% g5 m
Diags.ENTRY | Diags.EXIT | Diags.INFO,* A) m( {) {( k7 z/ j9 [
Diags.RUNTIME_ON4 i5 D2 i) Q$ K- }9 Z) I
);
) t! i& M/ F7 H' M$ Y3 d& P, V
7 o0 i; @5 G9 N: m W( t+ I0 j# d. \0 Qvar Registry = xdc.useModule('xdc.runtime.Registry');
, V& ?/ K) r M1 b: kRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
5 O6 I* y/ ^. l7 ORegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;9 N! g V, K# d6 }
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;5 D+ R1 l# _5 z5 `* C- c
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;. p0 R ?( G b ^: ?6 D6 t
6 i' F+ V* H8 A! O/* create a logger instance */+ K: ~+ c1 O2 a
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
' s* Q* `8 B" c! evar loggerBufP = new LoggerBuf.Params();
3 C& a6 p0 a% t8 ~9 O: w9 M: `loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */* ?; B3 N1 L9 k- X
loggerBufP.bufType = LoggerBuf.BufType_FIXED;
2 J/ o$ m+ g) F4 I, o c5 P
3 a9 \9 ^. b* Y( Kvar appLogger = LoggerBuf.create(loggerBufP);& y/ p" N& n$ H
appLogger.instance.name = "AppLog_Core1";
) R4 m; C6 n9 H! _2 O( l' YDefaults.common$.logger = appLogger;
" e" e+ b0 I8 \2 @+ u3 `Memory.defaultHeapSize = 0x8192; : T$ Z& ~% N3 I! a9 B
Idle.idleFxns[0] = "&LEDStatus";$ V3 a+ d' B# P5 g3 l' f& e' Y
Cache.initSize.l2Size = Cache.L2Size_32K;
& L5 G! p' M( r% F6 b) r+ _4 O6 Q e* s) y8 U4 U3 E1 H9 ?7 q3 h+ s
|
|