|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
$ ^% c; S3 d H/ Q0 f我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
; R" ^' u- s: M3 r. Z(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
9 q( c$ L: Z% S; g) I- a& D4 [* C1 M# E1 @5 x' g2 ~
是不是需要在DSP.CFG中进行配置
$ ?8 D8 f9 F9 O* C( K我现在的配置为
- P9 `. s! [0 |/ }9 h5 I# H! t5 a% b# ^- W9 Q
/*/ _$ p8 h$ _4 H
* ======== Operating System Configuration ========; k& U3 c1 k4 E5 N1 U
*// i3 e% h+ A% [9 A( G
8 y; o- ~, x# w) y" ]
/* no rts heap */' Y4 u& _* Z8 \9 K1 O- @
Program.heap = 0;* T+ r3 ~; i z8 \
Program.argSize = 100; /* minimum size */
4 X3 y' D& ^ [# m+ e. rProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大* \' Q% n+ w( O0 t% V, A
8 R0 `" i* e. E# Q( e, K/ d/* create a default heap */
8 U [& \: l" d, b ?7 _var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');# }. n) ?% H) \ K" C
var heapMemParams = new HeapMem.Params();
0 @7 R$ D. f, e* p5 G" w t9 @* m6 x) LheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
" W1 @5 @. g& X+ @: \
- D& g; m$ y J) `var Memory = xdc.useModule('xdc.runtime.Memory');& m( k4 w% }: u1 ^' Z
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
$ {: @( V! Q0 W+ C# [* ]
$ d9 @* V6 f \+ [7 G/* configure System module */
. ^7 I1 K6 F% Wvar SysMin = xdc.useModule('xdc.runtime.SysMin');' ?* f ?1 q- b9 Y7 I# o) h; ^
SysMin.bufSize = 0x1000;
+ k, n4 W7 I+ `. m2 o- x$ b! hSysMin.flushAtExit = false;
- F$ o# h' Y& K, b. c w0 g/ y4 ]& J
var System = xdc.useModule('xdc.runtime.System');
& b5 P G& ?+ E2 O5 ]; B, \% f: |System.SupportProxy = SysMin;
4 S2 O: q& R1 @' e% {: E7 \: [. ~* p. _6 Z& {0 l1 u! e
/* configure SysBios to use the lower half of Timer 1 */
- M% }' L C ~0 Qvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
+ T, c5 k8 K3 t( W4 u; Zvar Clock = xdc.useModule('ti.sysbios.knl.Clock'); r9 C* v9 p3 Y# i# C
Timer.timerSettings[1].master = true;4 F9 W# {6 s) S0 c
Timer.defaultHalf = Timer.Half_LOWER;. Y0 Y) K, S1 M( Z& }3 u3 K) v3 i
Clock.timerId = 1;
( n- ^# r% Y: \( q1 z) N* P' v" v7 S- H
2 o! c# }; d n: Q' z' M
) N& s& a/ n, r, T" b2 d: }/*/ I! i6 Y' I3 q$ q; H
* ======== Miscellaneous Configuration ========
3 n0 r/ I6 f- X7 A1 ?; S+ ~ */
) X w( B ]3 I& t% h* ?$ w, N' g' O
/* set default diags mask */
# H' A/ D! T- ^) |1 O3 \, Ovar Diags = xdc.useModule('xdc.runtime.Diags');; b, ^) i. V4 j
var Defaults = xdc.useModule('xdc.runtime.Defaults');6 R7 z! |1 M L8 g- l: }7 r3 x
# H- d1 ?( i z$ EDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
7 \ H0 {8 H1 n/ zDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;
! D( M& D. N# _8 L0 iDefaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
5 ?0 v! a' h9 a* h8 ]Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */( ~2 c, m5 c/ q9 U6 D! W4 t: n. E
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
' {: |: Z$ j$ n6 T* D+ A+ y' i, [( v3 lDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
5 k! e+ y! L3 r( g# d" J+ ^Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
( L1 H/ s0 G& G( ^) b: wDefaults.common$.diags_USER2 = Diags.ALWAYS_OFF;: H% u9 O6 N! {# O
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
6 A* c, o8 ^. U( D7 ODefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
! Y3 p/ d0 O1 v# f/ w H2 tDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;
* ]- D `3 K9 \/ O' P6 bDefaults.common$.diags_USER6 = Diags.ALWAYS_OFF;( w" H3 @+ s( u
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;
' W) G3 r; C3 L0 U" e( e3 ]Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;) c5 {- M. m; A* V" p- T# o
5 U* {& B7 ?& o% X( u
/* override diags mask for selected modules */
! T: D/ s( ?2 _xdc.useModule('xdc.runtime.Main');0 [! p) i; F) g9 j% b' S; l% N
Diags.setMaskMeta(
5 q" n* a; _, h, d7 d% c "xdc.runtime.Main",. A- j9 Q/ @; P* T3 o2 _0 |
Diags.ENTRY | Diags.EXIT | Diags.INFO,0 p' k$ p$ B, z& Z I! L _3 Z# f
Diags.RUNTIME_ON
$ y' p& `* q/ K# w( h);7 Q9 o& I# M5 j- a2 M) I% E4 [) d1 `
( @& T% B; E9 c( N3 A
var Registry = xdc.useModule('xdc.runtime.Registry');: `+ J8 U& y( X. t$ Q' @6 P: ^
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;6 _: m9 q* Y* K2 J! t
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;7 j. K. a" G: w3 S/ d7 O0 t
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
7 N/ V! V! G+ ~& o' x& q; R$ Q7 qRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;# Q7 l% @, R0 p$ D+ U
4 b) O B1 c- f- B2 I- H4 W/* create a logger instance */* L. |' `# ]9 C& f7 j) c# P
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
; d* ]5 Y5 E* nvar loggerBufP = new LoggerBuf.Params();
. W6 M! W8 e4 G- ]! ]$ v3 u- YloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
, `$ Z: N x8 x: BloggerBufP.bufType = LoggerBuf.BufType_FIXED;& n" P# N ~6 r; b. i
# @9 i& o4 J4 m( ~) _% Mvar appLogger = LoggerBuf.create(loggerBufP);
: Y+ w6 |7 g, L1 B* @0 d6 iappLogger.instance.name = "AppLog_Core1";$ Y8 j( V6 C3 h: q& w
Defaults.common$.logger = appLogger;
' r9 y8 c+ p: B' X# vMemory.defaultHeapSize = 0x8192; + W: L e7 d- Z, M
Idle.idleFxns[0] = "&LEDStatus";* C' ]' q" ]; Q/ U
Cache.initSize.l2Size = Cache.L2Size_32K;/ a+ D$ y3 S! ?# P5 k+ q% V$ s
# ?: J6 c$ P( K% z2 r$ _0 {# A |
|