|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明- p, P0 n g* A2 D8 e" H. I
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
% d* m0 `: X0 y(不过疑惑的是,为何单独DSP仿真就没有问题呢?)( ~, O$ f& s! G; m% ~
& Y l3 ~" d2 ~5 K5 Y' L# J
是不是需要在DSP.CFG中进行配置
) _3 j t. A5 [, _+ b% Q我现在的配置为
* m8 h* b& s' O, s( ^1 }3 b9 E2 ~8 L4 O* n t4 E D: H6 j9 t
/*
0 v0 }0 {' t+ E& q$ y, E * ======== Operating System Configuration ========' u0 L6 k, }" _2 m
*/
8 R; d' F8 U7 Z5 P) q: A' w' E2 Y- @( q& e; I
/* no rts heap */
9 G# c4 F' L* |/ M! DProgram.heap = 0;
5 |& k* A8 {3 W8 C. u; V4 G( @Program.argSize = 100; /* minimum size */
1 u& P. o) {1 [9 D- O- A; `& _Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大+ p' `5 a( k7 k/ j: c( \# m
0 K% A7 N8 p$ R; t9 e! V% O% l5 I/* create a default heap */
3 I& m8 d/ J, Ovar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
! f0 u8 K8 a# J8 l/ Cvar heapMemParams = new HeapMem.Params();
; l+ i; ]7 o' ^1 A" k, cheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大( e! v3 R: Z' G9 Z) ?% y' D1 y9 f
$ c. F1 a+ I" k3 _5 s
var Memory = xdc.useModule('xdc.runtime.Memory');2 w3 {- s! ^3 _9 J6 L6 k5 d
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);. W# w5 x* A% S
9 k9 h( L. G9 ~, @' a/* configure System module */+ B& ~' a$ g/ ?6 B
var SysMin = xdc.useModule('xdc.runtime.SysMin');, w7 T. p& X- m6 {' s4 C3 K Q
SysMin.bufSize = 0x1000;
; J8 u6 A$ U, N( [* R2 bSysMin.flushAtExit = false;
6 l# v6 P$ ^) O% C" \3 R7 z* B( S% q: }9 J; n+ N- {
var System = xdc.useModule('xdc.runtime.System');
9 S) x& I& ?" W; F1 u( y$ h# ySystem.SupportProxy = SysMin;
" \6 S! p* g, }/ k. e: ~4 r" {0 J$ q# z5 ~7 J/ w/ M
/* configure SysBios to use the lower half of Timer 1 */
" k H9 g; W8 F- A$ ]) bvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');! ]1 w) D/ d6 b. K, H
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
( _1 h, |4 B. UTimer.timerSettings[1].master = true;2 ^/ h. E4 F# s7 t+ d
Timer.defaultHalf = Timer.Half_LOWER;7 J! }% b1 C1 h+ P a% m+ `3 r% o
Clock.timerId = 1;
8 l8 _5 C# x$ M+ Y1 M7 W
9 j* w& ?; Y3 J0 \6 I& I
7 V1 B/ n$ i: l; i0 R" U/*
' D* _& T0 V- U * ======== Miscellaneous Configuration ========
# R1 U. J* G8 J! k9 C! S */1 o: O7 ~- r' Q$ E' P* E
) }( H, G3 `# h `2 P/* set default diags mask */0 b+ Z/ x* B, c; R" v5 B. C- k2 i9 s
var Diags = xdc.useModule('xdc.runtime.Diags');
) R" W0 q, e9 W# z. y9 [var Defaults = xdc.useModule('xdc.runtime.Defaults');# W l$ w( e3 y* A* L: Z* H' d. }4 j
2 H n+ g2 } @: GDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;5 u9 G5 F( ]/ Z# c& A
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;' x- { N' K0 Z
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF; j4 a6 V5 H$ _# W1 g
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */
9 `, n* s" u# `* e+ c4 ]+ N2 c; }' N9 ]Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
( I# \4 `- `. K( H& B7 X5 r& zDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
, M" @2 b$ ?. E/ M$ }Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
8 i' E1 D7 ?6 R6 _( w. _Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
& u* E" c% ]; U* b5 Q% w. `) Y# F- rDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
" t+ x Y( S! C8 z3 YDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;* F. \$ |3 [4 O v9 s
Defaults.common$.diags_USER5 = Diags.ALWAYS_OFF;0 e& Y2 [1 T$ E8 Y- \$ ~
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
; ]/ T: X4 L' u0 k6 C% t: YDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;
- b" K0 b* U$ m( TDefaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;
9 G6 r. F( ~8 K/ w D
9 B$ M* d O/ \/* override diags mask for selected modules */; C0 I r' h' }- P5 T/ p D
xdc.useModule('xdc.runtime.Main');
( @; }5 s {5 F- ]) X+ u; _Diags.setMaskMeta(
3 D0 k2 _( p6 I6 G; _* t! ?1 i "xdc.runtime.Main",, o) ^; j, z3 o/ \ j
Diags.ENTRY | Diags.EXIT | Diags.INFO,
% I& B4 t0 N$ Y0 i" O Diags.RUNTIME_ON* _- T# @7 {2 p; \1 u$ t6 N6 h
);
, B, }2 v8 J; i3 G# p n, t( A+ s" O
var Registry = xdc.useModule('xdc.runtime.Registry');
X) Y2 ]% u1 p4 ^: q' g( }1 _Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;8 L; G8 v' F' P( y7 N
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
% _$ g6 I+ p% V) f1 @+ lRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;; e; z: q) b% } s5 t4 c
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;5 v' c+ M" ~3 I' L3 n- x- H2 |
* V3 }2 U" f- v" ]. V, O9 Z
/* create a logger instance */8 G# z: n5 o- @! v
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
( Z! u+ F& l5 O5 X' W4 Kvar loggerBufP = new LoggerBuf.Params();& m' ? e' B2 {/ G) \; P/ ~5 ]
loggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
& s i" N! w8 @loggerBufP.bufType = LoggerBuf.BufType_FIXED;) `4 u3 ~* _0 z( D
" @6 }) m" ^7 Kvar appLogger = LoggerBuf.create(loggerBufP);
! k, Z7 S+ b- |5 GappLogger.instance.name = "AppLog_Core1";1 g6 c7 \% A0 _
Defaults.common$.logger = appLogger;
; F# `" b) |; |8 QMemory.defaultHeapSize = 0x8192; + B1 ?* [: O) T2 Z* L1 Y
Idle.idleFxns[0] = "&LEDStatus";
5 s, K9 t+ ]" `5 I# _. K4 ?Cache.initSize.l2Size = Cache.L2Size_32K;5 c4 H; c; J$ T9 D! e0 c
2 e9 V6 M& f8 v; F7 e# F6 K0 V |
|