|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明; \% @& J8 T% }* O! P0 T' v
我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下3 a7 k0 ]% g) Z+ P
(不过疑惑的是,为何单独DSP仿真就没有问题呢?)0 V/ W. c) q$ |% N, Z6 m- z
' M0 R' y! i) e7 t
是不是需要在DSP.CFG中进行配置
. _% \. H. h) h x0 d$ y# A我现在的配置为
/ T( k7 B% K* O4 ^4 y' }( V" t0 Z. U1 N; Z
/*
% `) p( M8 |, I# k: g * ======== Operating System Configuration ========- ?8 I" P% P p! H& Z0 F* ?: p
*/" \* a& F+ \+ P& G) L" a! {
. H# j+ m+ \6 Q( a; J* L
/* no rts heap */
. d( }( B5 T: d) ^1 Y0 {Program.heap = 0;6 u3 k9 t" u, c( J3 X' z1 ?9 B
Program.argSize = 100; /* minimum size */
# _5 T, N! c2 U7 f7 Z& B& c( }2 jProgram.stack = 0xF000; //此处修改后的值。不太懂,所以改大
3 Z' V# ]% w& [+ E; b! e6 R8 C' ?) _9 Y0 a4 a9 P1 [
/* create a default heap */1 M" t/ o) w8 M, q- ]$ l
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
# u3 b* |% A! bvar heapMemParams = new HeapMem.Params();
3 o* I, k" Q0 W4 m8 k: b7 GheapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大
( L! ]5 L$ j- N" N" c0 y3 |4 B9 }- r" `4 H1 y: B
var Memory = xdc.useModule('xdc.runtime.Memory');! d8 _2 f( o* \. E# Y$ ~
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
9 p0 e q. V. ?; t% n
. o4 t: _; I: {! ^! P, A/* configure System module */
1 @0 z5 P+ P( I- ~4 G: bvar SysMin = xdc.useModule('xdc.runtime.SysMin');* U0 t( @$ e. a# q2 [2 w
SysMin.bufSize = 0x1000;$ H# H# S r7 j* x7 H
SysMin.flushAtExit = false;1 H! [" m: B7 F" t3 l. f6 {5 z
2 @+ f/ i% b% G d, rvar System = xdc.useModule('xdc.runtime.System');) B& J6 M6 m: {9 R# s7 @* ~5 k
System.SupportProxy = SysMin;
2 f* X \* r- j- o% U7 Z9 l; G9 k l2 u1 |8 h" W
/* configure SysBios to use the lower half of Timer 1 */
9 q* R; a' P3 W0 A2 L; wvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
; e/ ?5 q4 f% @5 K0 g _; }var Clock = xdc.useModule('ti.sysbios.knl.Clock');3 P: j& c" _* |5 I! c# R
Timer.timerSettings[1].master = true;
$ `- P I# @- i# L: L" lTimer.defaultHalf = Timer.Half_LOWER;7 L. q& J$ x$ Q, H% \
Clock.timerId = 1;
+ T# U% k: M1 R* X( Z! h
+ a# u: L" }* F ]$ l4 b8 z" l) R# V/ a: y& O& O6 [
/*- G" [. |* k! e7 [% ]; w
* ======== Miscellaneous Configuration ======== n4 P& x+ a; ^- ]
*/- x! k8 q3 O& D. U/ S3 Q; b8 D
, p2 Z$ f/ b: G8 u0 E- j/* set default diags mask */
) U) ?- V+ v# ~$ Zvar Diags = xdc.useModule('xdc.runtime.Diags');( L- d" ~6 u# M3 b, ~4 M% Z
var Defaults = xdc.useModule('xdc.runtime.Defaults');& L! b. q4 u7 y C
! n1 [, u1 N- Z0 N, o1 g' h* @% F
Defaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
+ f5 i( t ?' ~6 S- ODefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;+ |' O( s9 s( {$ d+ C. q# n: q
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;5 [& d2 U3 K# d9 R$ T
Defaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */, ~, r5 Q1 U, K: Q; @8 I' x6 v
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
% D# H' p I4 V" `7 SDefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
) H7 H" d* a# q9 `Defaults.common$.diags_USER1 = Diags.ALWAYS_OFF;
" @* N% l) j" E. p, Q4 _Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;
# p) z( r7 S7 d2 f/ f9 T, PDefaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
) i4 f9 [) T8 qDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
, S6 T7 O3 k. o7 S9 u& n9 r) jDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;6 ?% W, ^: `' H; y
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;
6 v! J3 I3 Q( w6 Z4 {' r" ODefaults.common$.diags_INFO = Diags.ALWAYS_OFF;/ @$ b& W& E1 F. @+ @
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;, i. ?$ c8 R/ p0 c
9 i) P6 z: [( [1 U7 |( Q0 k8 e* v, {/* override diags mask for selected modules */
" q% Z( Q% B" [! o. Lxdc.useModule('xdc.runtime.Main');5 X* {0 d4 D q2 W
Diags.setMaskMeta( Q1 \! K9 Q: ~# ]6 z' ~, k
"xdc.runtime.Main",
3 C: T' d. y }2 x3 Z" h Diags.ENTRY | Diags.EXIT | Diags.INFO,
w6 q6 M( N; `; i8 G! L Diags.RUNTIME_ON
+ S( |1 [5 e' a, E5 Y6 ~);
/ v8 N v) k( Y/ Z/ {' d) @. F5 v9 s1 ~" q" E' ], x3 M3 C/ s
var Registry = xdc.useModule('xdc.runtime.Registry');
4 u& X A: P0 |9 w& XRegistry.common$.diags_ENTRY = Diags.RUNTIME_OFF;0 N6 f7 ]/ ]4 `% n# {
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;4 o, `/ L W) J+ t5 Y
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
0 T8 _# R) ^& |( T7 Y0 MRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;6 j# ^* B. T3 y9 }( v' {
2 I% D* l2 U# n N
/* create a logger instance */+ p# k1 t1 k1 g: j& {
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');# W* O! M# |' { Q3 }) K5 @7 s
var loggerBufP = new LoggerBuf.Params();
+ b- s+ Z& t0 R& ologgerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
3 E1 b9 j" ~8 a2 V7 H) C$ sloggerBufP.bufType = LoggerBuf.BufType_FIXED;
% m. M5 j7 a: X. V" P* m* \- [2 ^ D# \( K( _! K6 {7 N. s- w6 [
var appLogger = LoggerBuf.create(loggerBufP);+ Q" J/ P2 P1 O4 d' J( w
appLogger.instance.name = "AppLog_Core1";0 [# I( l+ Q" i. I8 `
Defaults.common$.logger = appLogger;
0 Z( T: @) J/ F8 ?0 O" nMemory.defaultHeapSize = 0x8192;
1 Q5 v; |" x& z6 _: ^! {Idle.idleFxns[0] = "&LEDStatus";; w! l$ n3 w) C4 R9 \! b& l+ f
Cache.initSize.l2Size = Cache.L2Size_32K;
$ P) a1 ?' M* N5 C+ }) G0 G6 D4 m, N1 Z. c+ n/ m
|
|