EDA365电子论坛网

标题: 28335做EXRAM实验遇到DEBUG错误 [打印本页]

作者: jspij1    时间: 2021-12-24 10:14
标题: 28335做EXRAM实验遇到DEBUG错误

; W1 S" N$ Z" g; e) F5 I

+ c. g+ `* R# w- D# u+ B% \28335,仿真器是100v3,做EXRAM写入外部SRAM实验提示上图错误,折磨我两天了,试过打开cl2000.exe,试过修改主函数为最简单的写入函数,试过降低写入值,都没能解决,求大神帮帮我这个新手!
& ]0 l7 F7 P/ @* u# ?( D! P) F下面是主函数:
3 ?) [3 @, {$ q#include "DSP2833x_Device.h"     // DSP2833x HeadeRFile Include File8 A+ ?. I2 O# v
#include "DSP2833x_Examples.h"   // DSP2833x Examples Include File
4 z) g/ E' ?+ ]: C; [# m
! d0 M/ @3 m" x7 N; [5 O: x- g& C/ c" b5 k  G- s2 o3 a  y

+ w4 k2 b4 y; }# c! A- kUint16    *ExRamstart = (Uint16 *)0x180000;
# W6 b* O6 c2 A$ g/ v
3 O6 C# ~/ O" k! s7 Z1 r3 A
9 c  c& _1 D- B2 c$ i+ ?0 U9 l: Y2 Y1 ?% O6 x9 Q
void main(void)/ X; Y+ V* ^* N- C; Q5 B
{
+ w( ]$ ^6 |) \' G4 g+ \* j   Uint16        i;6 `# `2 v  p6 Z3 t; x* x0 [& X! L
// Step 1. Initialize System Control:
  M4 @4 D0 A5 {: u% D// PLL, WatchDog, enable Peripheral clocks
" f* J* {( t/ V// This example function is found in the DSP2833x_SysCtrl.c file.
  A9 w: _( O/ k: N1 L3 q; K   InitSysCtrl();
/ e2 z- u- m+ v. w. v% v* R1 o0 e- s0 O2 k3 z, N
// Step 2. Initalize GPIO:
8 R% p8 n; o% p9 S' q// This example function is found in the DSP2833x_Gpio.c file and/ c# D; [1 T" M
// illustrates how to set the GPIO to it's default state.6 F0 Y( I& r7 {7 ]1 _
// InitGpio();  // Skipped for this example
( v+ p8 I' P1 Z9 U$ e# I# B1 b   InitXintf16Gpio();        //zq0 X, K/ S9 R$ q0 y
9 q: N2 e( j/ P1 Q
// Step 3. Clear all interrupts and initialize PIE vector table:. h- [1 ?- @' c$ |/ F
// Disable CPU interrupts2 G* X4 f  S7 _" T# D" w
   DINT;
9 O/ Y% T2 \5 V" }& x- P% v: V; N8 X5 e. r. m
// Initialize the PIE control registers to their default state.
8 H: k% q# d8 F: |// The default state is all PIE interrupts disabLED and flags
' m+ o  F! f% K1 v) v+ |. Y// are cleared.# r0 A) k/ f! g  E' w
// This function is found in the DSP2833x_PieCtrl.c file.0 j- W  _% B- T! v! ^, i6 Z# a' p
   InitPieCtrl();
* c. |+ r" a! `' r# \  u$ m2 x. F  ~" L9 X% z; E# c
// Disable CPU interrupts and clear all CPU interrupt flags:3 ^. T* h4 J4 a& A0 u, r
   IER = 0x0000;
3 @5 Q- \% e5 W) ^   IFR = 0x0000;
2 @1 j6 x9 h8 k1 A+ B8 h/ O3 o
( I7 u; J  \' p7 K) ]- S! D, `3 r
+ \- `8 D. @- T- P// Step 4. Write Data to SRAM:
5 `! m% I' ^2 ~+ ^! }" x
5 E; A- ]  _' D  B" ^        for(i = 0; i < 0xFFFF; i++)
, o1 B8 ~! j* v& j6 ]        {
" P7 ?3 E/ H, ~- x6 z8 W                *(ExRamStart + i) = 0x5555;* N0 @2 Q0 E3 r( A
                if(*(ExRamStart + i) != 0x5555)
* Y! k3 ^8 X- @# l9 z" I/ n8 Q1 q/ E                {
5 E- Y9 n5 `) B# N5 k3 d                        while(1);7 b* @( l0 ]0 n$ u' H
                }+ Y1 X' J! T1 @7 N- c$ l0 u' w
        }/ ^* W" t, {, s$ _9 B6 x4 A7 Z, k, Q+ B
      
( }" z6 d2 w' m9 j* [6 t; k        for(i = 0; i < 0xFFFF; i++)
( V" s3 o/ t0 O+ g1 k& U        {
" {1 J) E' J5 t0 C& U% l* T, E                *(ExRamStart + i) = 0xAAAA;& w9 W, r" `7 T7 M7 Z
                if(*(ExRamStart + i) != 0xAAAA)4 H" t4 q! w1 A: a' m
                {; z& ~+ [+ v& ]% J, ~. M
                        while(1);! V( q) ]! [8 T0 i9 x
                }
7 b  N0 N$ L' J! b$ s8 V! N        }) j% |; v- b+ f

/ b, N' o9 L3 H  _' _        for(i = 0; i< 0xFFFF; i++)( N4 p0 O" v& B0 Y" \, h  ~# v
        {# `8 [5 E/ v8 j" Z% Y
                *(ExRamStart + i) = i;
" n9 A  q9 ^4 f6 j                if(*(ExRamStart + i) != i)1 G. N. ^) ?0 o5 H( z
                {
. Z. ^1 x' A# T. I5 Y  c. Q7 X; o( O                        while(1);
& V& ~5 y' f) ?1 ]5 R- H                }$ `4 j; v8 Q9 ^& o
                if(*ExRamStart == 0x4000)* r4 }( v8 v0 P" F  I
                 {+ P  B  v/ l4 \0 {3 ]' m
             while(1);% B9 }/ R8 J4 v9 V' u' w
                 }6 @) t; M( V5 I- ?- I. A( \
        }# U; p" b$ l. j: Q2 m/ {
   i=0;/ l: x( h* K: N3 \/ [
   for(;;)
# @% k& C0 |1 r# u% o8 V6 W   {# W+ U3 X# Y6 P% T( m1 e
               * p- [3 u/ S! B3 G: ^& x
   }
7 z' j- W$ k, ]# b) V5 h- f- w, Q* n$ }" q/ B2 N3 j4 n& Y( o
}

8 j- M8 p0 a0 G( J) W% M
. P5 o! f. e% Y( d8 b5 q( _( k, G9 |! s# R

作者: xiaoming11    时间: 2021-12-24 10:52
建议重新安装ccs
作者: showmaker    时间: 2021-12-24 10:52
使用Project-->import Legacy CCSv3.3 Projects   导入文件即可解决
作者: faker12    时间: 2021-12-24 10:53
本项目存在非法路径,导致系统编译不通过,将该路径的中文路径去除,即可解决该问题
作者: CLBuu    时间: 2021-12-24 10:54
重新导入一下文件




欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/) Powered by Discuz! X3.2