|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
* c% c9 Q$ V5 L5 p我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下6 p6 o0 G3 i0 t% ^* H: n8 V1 ~* m. E( H
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
. z8 N. t& E( D* Z2 c4 {
0 B/ D% f# e9 D4 W是不是需要在DSP.CFG中进行配置& y2 _& R" n4 @/ |" D* r3 Z+ y
我现在的配置为* ]2 y' b+ o. F. r# P. o @. V
/ S' ~' Z2 b5 `. f
/*
e" e' a0 Z6 m- [$ B * ======== Operating System Configuration ========, K, G5 ^" A' p3 r5 Z$ m
*/
. W* c$ V5 N" b, l, ]8 h
* g9 k3 T# r/ ]7 D* a& r2 B4 v+ s/* no rts heap */4 K( f; X; n j7 R9 q. h
Program.heap = 0;" k" v2 m3 o2 I1 C# S. z
Program.argSize = 100; /* minimum size */$ j- R3 ~( q/ Q; F6 G0 S6 {8 e
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大
- p9 S# z$ t; `: g# l0 q0 {4 y, G1 v4 b+ K, n, h( e C% s
/* create a default heap */
5 t6 R3 K9 x8 F: R P' Qvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
# |1 \- B V. s$ D$ ivar heapMemParams = new HeapMem.Params();8 ]6 B, A+ r! x, R5 O9 C
heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
6 L9 U; t2 x& }: T: v& u
. D& R% u8 h9 M8 Wvar Memory = xdc.useModule('xdc.runtime.Memory');5 z5 n3 I8 Y& A
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);2 l) G# p* W4 e( i# N/ y
0 J' S3 c3 W- k- R# R, I/* configure System module */
/ {, p! ]' s0 l bvar SysMin = xdc.useModule('xdc.runtime.SysMin');
, N: T# `2 a, F5 c K- |SysMin.bufSize = 0x1000;
. M& t; ^& k/ w( f( F3 r; r7 O9 ?SysMin.flushAtExit = false;6 c! q* u& t6 i; d9 e7 [! {9 D
* B, S2 Z9 e0 D1 L; pvar System = xdc.useModule('xdc.runtime.System');
$ u, d- N- t2 F n0 M. b. t$ aSystem.SupportProxy = SysMin;
1 j: F8 \1 Y9 D: z) D6 Q! _( C$ e+ r2 h: F2 @$ ~
/* configure SysBios to use the lower half of Timer 1 */) D* U Q$ \1 b% G( c
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
0 `' d3 E. r- T3 tvar Clock = xdc.useModule('ti.sysbios.knl.Clock');
; K6 y; J( ]+ r2 }. [7 D+ kTimer.timerSettings[1].master = true;; v5 L5 I# r' Y; }( ?
Timer.defaultHalf = Timer.Half_LOWER;
0 r8 n& j. f. u9 ]Clock.timerId = 1;' \- t$ U5 ?9 A1 \. u
* J+ |- s" N* a/ ?# D6 m- Y9 e# M, K+ J" A, Y
/*
2 b% `/ q6 }. _ * ======== Miscellaneous Configuration ========
- ~4 O+ s( h% M. u, V: C, i! r */
+ i5 n, o b1 `
+ ^7 @# c' c- d/ G6 m* \ o# p/* set default diags mask */
5 ?* J, c0 c! ~3 V' }& h o2 kvar Diags = xdc.useModule('xdc.runtime.Diags');0 i4 B; R( p# S8 c" Q c
var Defaults = xdc.useModule('xdc.runtime.Defaults');. a" I# Z1 U* x# h; L, g
+ F8 P; z1 f4 Z. k1 UDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;: v2 j( m2 Y* B4 B# L4 x
Defaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
2 O' O, @+ ~$ [ _2 ODefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;5 t2 F W8 p+ s X% p# K2 {6 f
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */1 S% X) t- l. v7 {3 A4 e
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */. N& X% W/ b u* y/ T" N
Defaults.common$.diags_STATUS = Diags.RUNTIME_ON;! H- q j5 T% R3 X/ e5 a
Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;! l2 }0 b$ j. H( _4 Q
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
, y9 V L" ~; F# \0 z1 L2 ?Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;3 o c" ^& ~# p# |9 ^
Defaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
& z" d- F' s; N0 k: N hDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;! x2 r" m O* v# h; |: s4 \
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
9 z) P- n j0 X' yDefaults.common$.diags_INFO = Diags.ALWAYS_OFF;7 e/ D% K+ b* g4 b9 b" I5 D7 w
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;/ [9 U# S2 A8 Y# `: E% p
8 J* q4 M$ E$ K) v/* override diags mask for selected modules */
4 w, F! T: N X$ ~4 [7 i- o Dxdc.useModule('xdc.runtime.Main');
" D2 L2 j" Y: ?$ y( {Diags.setMaskMeta(
0 t. X% }4 w$ N5 J4 O y2 u "xdc.runtime.Main",2 O6 f2 Y. Q5 |# ]! ^( a7 z
Diags.ENTRY | Diags.EXIT | Diags.INFO,
" S+ d% m) |3 P Diags.RUNTIME_ON
6 o6 F7 J& l I);
3 n9 C3 l) Q- D5 m7 f9 x
! C! }* U% }# ^- f) }/ ?: wvar Registry = xdc.useModule('xdc.runtime.Registry');8 n* H+ D+ J' B# E9 ?& T- J5 c
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
: H0 [% a4 a0 L! e9 M6 rRegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;
5 `5 B1 d; j- x* t r$ _* aRegistry.common$.diags_INFO = Diags.RUNTIME_OFF;, y! I4 N3 {9 i; t& I. z
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;% K* t* X! H. [. x) J7 ?
! T t9 [* ?/ g4 Z& J8 d
/* create a logger instance */% l: |0 U4 D9 f o
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');7 G# G: k- X$ f8 ]. h$ g% U
var loggerBufP = new LoggerBuf.Params();
% K* q! _ c* i" H( q+ \, NloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
* Z- o& R* R- z7 ologgerBufP.bufType = LoggerBuf.BufType_FIXED;
, h' H) a' V/ t' w6 [
8 p9 V( |% X+ w; q: nvar appLogger = LoggerBuf.create(loggerBufP);2 K7 P' h$ C I
appLogger.instance.name = "AppLog_Core1";
3 n6 l6 F5 u6 QDefaults.common$.logger = appLogger;
$ H, `: I& \; T2 ?Memory.defaultHeapSize = 0x8192; ; F4 o5 c. Q" `. C& {+ k6 c
Idle.idleFxns[0] = "&LEDStatus";
5 H, W q* {( XCache.initSize.l2Size = Cache.L2Size_32K;) ^7 T/ g. B/ c3 N5 R- I1 @3 d$ W, K
: {! e* y& ~) ~ |
|