dsPICDEM? 80-Pin Starter Development Board User’s Guide
2.7
DEBUGGING THE CODE
The MPLAB ICD 2 In-Circuit Debugger is used to run, halt and step the code. A
breakpoint can be set so that the program halts once the code has executed the
instruction at the breakpoint. The contents of the RAM and registers can be viewed
whenever the processor has been halted.
The MPLAB ICD 2 In-Circuit Debugger uses the following function keys to access the
main debugging functions:
<F5>
<F6>
<F7>
<F9>
Halt
Reset
Single Step
Run
In addition, there are more functions available by right clicking on a line of source code.
The most important of these are “Set Breakpoint” and “Run to Cursor”.
2.7.1
Display the Code
1. From the View menu, select the Program Memory menu.
2. On the Program Memory window, select the Symbolic tab, as shown in
FIGURE 2-14:
PROGRAM MEMORY WINDOW
3. Press <F5> to halt the processor and press <F6> to reset. The program memory
now shows a green arrow pointing to the line of code at address 00000, the reset
location.
The instruction at this location is goto _reset . This code is added by the linker
to make the program branch to the start of the code in the Eg1_BlinkLed.s file.
The code uses the _reset label at the start of the executable code and declares
the label as global to have visibility outside the source file. See Example 2-1.
EXAMPLE 2-1:
CODE START-UP
.global __reset
..text
__reset:
mov
mov
mov
#__SP_init, W15 Pointer
#__SPLIM_init, W0
W0, SPLIM
The linker also provides values for the __SP_init and __SPLIM_init
constants to initialize the Stack Pointer (W15) since the linker determines what
RAM is available for the stack.
DS51584B-page 22
? 2006 Microchip Technology Inc.
相关PDF资料
DM300024 KIT DEMO DSPICDEM 1.1
DM330012 KIT USB STARTER FOR DSPIC33E
DM330013 MICROSTICK DSPIC33F/PIC24H BOARD
DNET1 SURGE SUPPRESSOR ETHERNET RJ45
DR-8094 RACK DOUBLE 84"X20.25"X36" BLK
DR-IAC5E INPUT MODULE AC 5VDC
DRIDC24A INPUT MODULE DC 34MA 24VDC
DRODC24 OUTPUT MODULE DC 13MA 24VDC
相关代理商/技术参数
DM300019 制造商:Microchip Technology Inc 功能描述:DEMO BOARD STARTER ((NW))
DM300020 功能描述:开发板和工具包 - PIC / DSPIC dsPICDEM MC1 Motor C RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM300021 功能描述:开发板和工具包 - PIC / DSPIC High V Pwr Module RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM300021 制造商:Microchip Technology Inc 功能描述:MODULE dsPICDEM MC1H 3 PHASE
DM300022 功能描述:开发板和工具包 - PIC / DSPIC Low V Pwr Module RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM300023 功能描述:开发板和工具包 - PIC / DSPIC dsPICDEM SMPS Buck Demo Brd RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM300024 功能描述:开发板和工具包 - PIC / DSPIC dsPICDEM 1.1 GP RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM300027 功能描述:开发板和工具包 - PIC / DSPIC 16-bit Starter Demo Board RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: