1.å¦ä½ç¼è¯Windowsä¸çOpenOCD
å¦ä½ç¼è¯Windowsä¸çOpenOCD
ãOpenOCDä»ç»ã
OpenOCD为åµå ¥å¼ç®æ ç³»ç»æä¾ä¸ä¸ªè°è¯ï¼å¨çº¿ç¼ç¨åJTAGè¾¹çæ«ææµè¯çå·¥å ·ãæ¯æWigglerï¼åºäºFTçJTAGçé¢çä¸äºè°è¯å¨ãç®æ è¯çæ¯æARM7,源码aoa驱动源码ARM9, ARM, ARMåCortexçæ ¸å¿çè¯çã并æä¾ä¸ä¸ªGDB Serveræ¥å£ã
ãOpenOCDçç¼è¯åå®è£ ã
1. å¦ææ¯Windowså¹³å°çè¯ï¼éè¦å å®è£ Cygwinç¯å¢ï¼æ³¨æä¸å®è¦éæ©å®è£ 以ä¸å¼åå ï¼
- autoconf: Wrapper scripts for autoconf commands
- automake: Wrapper scripts for automake and aclocals
- gcc: C compiler upgrade helper
- make: The GNU version og the 'make' utility
- subversion: A version control system
(å¯ä»¥å®å ¨å®è£ ï¼å ç¨5Gå¤ç空é´ï¼éè¦ä¸è½½Mçæ件)ã
2. ä¸è½½OpenOCDçSVNæºä»£ç ï¼æå¼Cygwinå½ä»¤è¡çé¢ï¼æ§è¡å¦ä¸çå½ä»¤ï¼
mkdir /home/openocd
cd /home/openocd
svn checkout svn://svn.berlios.de/openocd/trunkãææ¯
svn checkout bined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#LPCs need reset pulled while RTCK is low. 0 to activate JTAG, power-on reset is not enough
jtag_reset 1 1
jtag_reset 0 0
#jtag scan chain
jtag_device 4 0x1 0xf 0xe
target arm7tdmi little 0 arm7tdmi-s_r4
[new_target_name] configure -event reset-init {
# Force target into ARM state
soft_reset_halt
#do not remap 0x-0x to anything but the flash
mwb 0xEFC 0x
}
working_area 0 0x 0x nobackup
#flash bank lpc <base> <size> 0 0 <target#> <variant>
flash bank lpc 0x0 0x7d 0 0 0 lpc_v2
ãOpenOCDçæµè¯ã
æå¼Cygwinå½ä»¤è¡çé¢ï¼æ§è¡å½ä»¤ï¼
openocd -f openocd.cfg
以ä¸æ¯æçè¿è¡æªå¾ï¼
ãIARçé ç½®ã
å¨é¡¹ç®é项çDebugä¸çsetup页éï¼éæ©GDB Serverï¼
å¦æ代ç éè¦ä¸è½½å°flashä¸è¿è¡ï¼Download页ééæ©Use flash loaderï¼å¨plugin页éï¼å¯ä»¥å»æstack以æé«é度ã
å¨ä¸é¢çGDB Serverä¸ï¼TCP/IP address or hostnameä¸æ·»localhostã
ä¹åå°±å¯ä»¥æè°è¯æé®å¼å§è°è¯äºã