|
|
沙发

楼主 |
发表于 2015-9-4 10:29:21
|
只看该作者
补充说明
7 M9 m6 a R1 `6 |8 |我大约calloc 每次共计大小为5K*16bits,怀疑哪里需要配置一下
0 j E- g; D. G6 f( S6 ^: |' b* T(不过疑惑的是,为何单独DSP仿真就没有问题呢?)
# R* v/ E, C* e7 W1 d: m
6 m8 S3 n4 i1 C* Y1 }' U是不是需要在DSP.CFG中进行配置
/ n' O8 ^5 f$ |( ?5 O) o我现在的配置为
, W6 V- B$ Z) p# P4 ]' B
; d& |; w; v4 y }8 n0 ^/*
* \1 B- b; J) f( L * ======== Operating System Configuration ========, Q" F4 Z8 [4 }! {7 P' C: q, N) }
*/& q7 A& Z) M6 j& {, u: d' m3 t1 y
% t+ v! I8 M8 N6 Y+ p- O/* no rts heap */! v8 `/ e. q. t' P, v4 b5 W
Program.heap = 0;
' R( K% } U/ Q; WProgram.argSize = 100; /* minimum size */+ u! Q) q5 Z( _1 a7 |! s
Program.stack = 0xF000; //此处修改后的值。不太懂,所以改大) h6 N' K8 _2 {$ K- K- l
# x$ H7 U* S& D6 |+ A/* create a default heap */- b+ I) ~6 ^: u: Y o
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
% x! o# e2 q# v5 u/ w+ P3 bvar heapMemParams = new HeapMem.Params();
2 F1 W: C3 t& g! e- S: @heapMemParams.size = 0xFf00; //此处修改后的值。不太懂,所以改大6 w( r% w% l' v
. \7 s0 J0 F! G- c6 Bvar Memory = xdc.useModule('xdc.runtime.Memory');
8 R0 U9 T, C" ^: n0 gMemory.defaultHeapInstance = HeapMem.create(heapMemParams);* Y! a4 A5 v, p
1 x) c* \* |5 K% m1 Z
/* configure System module */) a% T# s6 O7 |. X7 p2 ~
var SysMin = xdc.useModule('xdc.runtime.SysMin');
. U0 F9 ^) f3 U/ _* ?* _+ f$ |9 sSysMin.bufSize = 0x1000;- ~2 B4 x1 T# H6 r: {* [
SysMin.flushAtExit = false;
9 J8 f z9 I! d `- v# y+ z. J* u2 F K: z/ t
var System = xdc.useModule('xdc.runtime.System');
* C7 o r. n7 ]. L" \4 ^& NSystem.SupportProxy = SysMin;
- F' Y$ y# L- F) J' C7 {
& s: C9 R# t3 }) N+ S4 m) b- |/ j/* configure SysBios to use the lower half of Timer 1 */- |+ }& x, j2 L P& V% T" I
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
. E+ c4 s9 i: T" T" dvar Clock = xdc.useModule('ti.sysbios.knl.Clock');5 h7 @5 H, D' x; h: e6 r J
Timer.timerSettings[1].master = true;
1 V* [- D9 y7 v3 g. T2 VTimer.defaultHalf = Timer.Half_LOWER;
# N, r1 Y0 M8 }: h, dClock.timerId = 1;
. P3 O1 i- o; o9 F) E
" o1 o2 D6 R' D5 M# i9 t
/ U. {5 g9 e3 ]/*3 g) Y3 Z! J, U V# P& {
* ======== Miscellaneous Configuration ========: H5 D e$ C4 S5 M0 ~# Z( d
*/1 C+ Q0 b# s# M( g
0 O8 p" j6 }2 F7 D+ ~1 W" O
/* set default diags mask */
! n+ c3 ?5 I- Yvar Diags = xdc.useModule('xdc.runtime.Diags');! Z Y1 E* e: q8 n) |5 ]; m$ c
var Defaults = xdc.useModule('xdc.runtime.Defaults');2 ]0 w1 l0 r8 N& d
V% V4 F9 U1 e* K4 I# @, n! nDefaults.common$.diags_ENTRY = Diags.ALWAYS_OFF;
6 b& P2 ~5 q" Z/ BDefaults.common$.diags_EXIT = Diags.ALWAYS_OFF;; p6 k7 {: ~. m% }& t* `4 {
Defaults.common$.diags_LIFECYCLE = Diags.ALWAYS_OFF;
; u( L& b I3 I0 ~/ RDefaults.common$.diags_INTERNAL = Diags.ALWAYS_OFF; /* needed for asserts */; }1 J( _1 }) h$ F; ~
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; /* development only */
! f; B9 u. m" V2 W2 C6 ADefaults.common$.diags_STATUS = Diags.RUNTIME_ON;
" ]- b( O' @9 P$ E: DDefaults.common$.diags_USER1 = Diags.ALWAYS_OFF;) I7 V; ^# |: f4 a
Defaults.common$.diags_USER2 = Diags.ALWAYS_OFF;: M7 ^; K, N6 K3 ^" L9 z1 q- q
Defaults.common$.diags_USER3 = Diags.ALWAYS_OFF;
' h9 T8 W6 B8 LDefaults.common$.diags_USER4 = Diags.ALWAYS_OFF;
. K% H) m5 ]$ S# o. pDefaults.common$.diags_USER5 = Diags.ALWAYS_OFF;7 ?; X7 d4 W J1 @8 G
Defaults.common$.diags_USER6 = Diags.ALWAYS_OFF;- n* f8 [2 P' m+ C4 p+ g* i
Defaults.common$.diags_INFO = Diags.ALWAYS_OFF;) p G8 @8 W! E
Defaults.common$.diags_ANALYSIS = Diags.ALWAYS_OFF;6 Z6 e1 u% W( U- M: j" R
' p+ t: |) s/ Q1 e3 N% ~+ ]2 f
/* override diags mask for selected modules */$ t/ x' Q0 W+ [3 U6 y$ a
xdc.useModule('xdc.runtime.Main');5 T- i- G, g! z/ F* ?* m, x( |
Diags.setMaskMeta(
' Q2 M7 ~+ i/ T3 {* x0 U Q6 o \ "xdc.runtime.Main",
/ M a' N/ ?# r0 E4 H r9 R Diags.ENTRY | Diags.EXIT | Diags.INFO,8 |# `, z; Q4 h% x, \: z9 d
Diags.RUNTIME_ON
( g, g8 ^' O/ O0 y);
0 z Z6 J8 V! s4 D! ?0 E; [1 L. ?' y- j
var Registry = xdc.useModule('xdc.runtime.Registry');, I" P& u& j6 L W! H. F7 u
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
3 B2 W( S* o+ U6 \! ARegistry.common$.diags_EXIT = Diags.RUNTIME_OFF;2 {7 T3 a0 `, k- P, H
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
r0 x2 j& E/ m$ ]/ vRegistry.common$.diags_USER1 = Diags.RUNTIME_OFF;
4 [, N. c/ k! w. V: ^
7 e1 a7 x/ q6 _5 C/* create a logger instance */
$ h* R! n8 f9 z: Jvar LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');8 t0 l. e) G& B K% n1 ?4 ~
var loggerBufP = new LoggerBuf.Params();
4 t: }1 @4 w* L9 B0 iloggerBufP.numEntries = 128; /* 128 entries = 4 KB of memory */
7 [# V- v g0 m2 p% DloggerBufP.bufType = LoggerBuf.BufType_FIXED;, c7 k' j* _- E6 ?! |
/ k0 T1 z/ M9 J1 s, r9 U! b
var appLogger = LoggerBuf.create(loggerBufP);
& v u; [- n9 v1 ~ EappLogger.instance.name = "AppLog_Core1";
" G0 M- w+ Z# }Defaults.common$.logger = appLogger;: S3 }7 Z2 Y+ n9 M9 q$ q( Z5 J* ?& R
Memory.defaultHeapSize = 0x8192; k9 L b" z( G" Q' A6 c9 f
Idle.idleFxns[0] = "&LEDStatus";
* }# n) U/ K- [Cache.initSize.l2Size = Cache.L2Size_32K;2 U; N. H- `. |6 {, Y
7 D/ J2 d% e7 _2 y P
|
|