Home
H-JTAG USER MANUAL
Contents
1. Fig 7 19 New RDI Menu USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 10 Note About H JTAG x H ITAI Ver Ho BUILD Date Http nan hitag com Http forum hjbag com Twentponetahitag cam Copyright E Twentyone 2004 2008 Ok Fig 7 20 H Jtag Information If user wants to use auto flash download in IAR please disable Verify Download and Use Flash Loader s in IAR Fig 7 21 shows how to disable these options USER MANUAL Options for node blinky Categor General Options C C Compiler Assembler Custom Build Build Actions Linker Simulator ngel IAA ROM monitor J Link J Trace M acraigor ADI Third Party Driver Copyright 2009 WWW HJTAG COM All Rights Reserved setup Download atra Options Plugins Attach to program Verify download Suppress download L Use flash loaders default Fig 7 21 Disable Verify Download Option X Factory Settings 7 4 Configure KEIL KEIL for ARM is an IDE from KEIL Corp This section introduces how to configure KEIL to work with H Jtag From H JTAG V0 9 2 H JTAG uses the AGDI interface under KEIL The RDI interface has been disabled by H JTAG under KEIL First run TOOLCONF EXE located under the installation direction of H JTAG The purpose is to update the configuration file TOOS INI of KEIL In TOOLCONF EXE use the browse button to locate the configuration file TOOLS I
2. Fig 5 5 Program Options USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 5 9 5 4 5 Programming After the configuration is completed in the first 4 steps user can operate on flash in this step First let s try to check the target information by click Check In this example the check result is shown in Fig 5 6 The result indicates that the configuration works well H Flasher Mew Load Save Program Wizard Flash Selection Configuration Init Scripts Programming Pom Options General On Chip Flash Mand Flash i FF Y unu MN P H Flasher Help 2101 xl Options Exit About gt gt Programming ATS1SAMfx256 ie ATII SAMTX256 04275680940 Reset Target ABMTDMI Litthe Endian Check Security UnProtect Type Auto Flash Download Program Dist Addr Verity Src File Entire Chip To Entire Chip t Address i Read Size Fig 5 6 Check Result AT91SAM7X256 Next let s try to program a binary file In this example the settings are shown in Fig 5 7 Plain binary format is selected the source file is TEST bin located under CA and the destination address is 0x0 Flash base address H Flasher New Load Save Program Wizard Flash Selection Configuration Init Scripts Programming Pom Options General On Chip Flash Mand Flash WF F FW E Whe H Flasher Help gt gt Programming ATSTSAM S256 Options Exit About Flash ATIISAM A256 Ox27580940
3. From Y Fig 2 30 Program Wizard Nand Flash Options Copyright O 2009 WWW HJTAG COM All Rights Reserved 2 13 6 Help In the wizard a help section is also included This help section has the basic information on how to use H Flasher USER MANUAL H Flasher New Load Save Save As Program Wizard Flash Selection Configuration Init Scripts Programming Pgm Options General On Chip Flash Nand Flash Flash Selection Configuration Init Script Programming Pom Gptoins Options Exit ol xl About gt gt H Flasher Help To program flash device please follow the steps listed below 1 Select a flash device 2 Configure target system 3 Fill the script for initialization 4 Select the pom options 5 Program Erate Check Blank To view the following helps please expand double click the left tem Help on flash selection Help on configuration Help on init script Help an programming Help on pom options Fig 2 31 Program Wizard Help Copyright O 2009 WWW HJTAG COM All Rights Reserved 2 14 Chapter 3 H JTAG USB Emulator This chapter introduces the hardware interface and some hardware features of H JTAG USB emulator and the installation of its driver 3 1 Hardware Features and Interface H JTAG USB emulator is a high performance ARM in circuit emulator which provides 10K 15M Hz JTAG clock The maximum download speed is up to 750KB S and the maximum upl
4. n H JTAG USER MANUAL WWW HJTAG COM H JTAG USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved Release Information Date Issue Change 2007 10 01 A Release first edition 2007 11 30 B Revised edition 2008 03 03 C Corrected the illustration of TAP configuration 2009 01 08 D Updated for new software version 2009 04 24 E Updated for new software version 2009 10 08 F Updated for new software version Property Notice l JTAG is a standard IEEE 1149 proposed by IEEE The copyright belongs to IEEE 2 All the registered trademarks and logos mentioned in this manual belong to their respective owners 3 All the products and services described in this manual also belong to their respective owners 4 If this manual harms your copyright please contact us and we will make the correction accordingly 5 This manual is an open document User can redistribute 1t freely 1f only the integrality can be guaranteed Official Website HTTPZANWW HJTAG COM Support Forum HTTP FORUM HJTAG COM USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved Preface Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Contents A About this Manual canina dass IV B Uso this Manual id llana IV C Ebc LE LE SP iaa IV H Jtag Introduction ET About TESTE oe A T eee eee 1 1 1 2 Communication Structure eee rii eee teste vest err EE S P EO EE C PERPE 1d I Supported ARM COLES Gan A A 1 2 L4 Supported DES usina
5. Adol x Mew Load Save Program Wizard Flash Selection Configuration Init Scripts Programming Pgm Options General On Chip Flash Mand Flash L g 3 y 5 P po H Flasher Help Options Exit About gt gt Flash Selection El ATSISAM 0 CSATSTSAMTA3 ATS1SAMTS128 ATSTSAMTSTE ATSTSAMTSTET ATSISAM S 256 ATS1S5AMT532 i ATSISAM FS 321 ATSTSAMTSET2 ATSTSAMTSE4A ATSTSAMTSE256 ATSTSAMTSE32 ATSTSAMTSES12 CR ES j E BET sol i ATSTSAMTXCT28 ATSTSAMTXD256 o ATSTSAMTXC512 2 AT OCA OYE 190 Vendor PartM a Type Sector Block Page Size AT31S5AM ATJ SAM 7256 ON CHIP FLASH 1024 H NAA 256 KB 0279603940 32 BIT Fig 5 2 Flash Selection AT91SAM7X256 5 4 2 Configuration In this step user needs to provide some basic memory information For AT91SAM7X256 the bit width flash start address and RAM start address are all fixed Default configuration 1s used In this example no XTAL needs to be specified H Flasher Mew Load Save Program Wizard L Flash Selection Init Scripts Programming Pom Options General On Chip Flash Mand Flash y Y F WE Wl H Flasher Help USER MANUAL Options Exit About Flash width Chip Flash Start Address RAM Start Address Ext KT AL MHz INIT TCK PGM TCK Fig 5 3 Configuration AT91SAM7X256 Copyright 2009 WWW HJTAG COM All Rights Reserved 5 8 5 4 3 Init Scri
6. Copyright O 2009 WWW HJTAG COM All Rights Reserved Fig 7 15 Dialog of Options 7 8 In Fig 7 15 select Debugger category and then active Setup page In Setup page please select RDI as the driver After the selection the page looks like Fig 7 16 Options for node blinky X Category Factory Settings General Options C C Compiler setup Download Extra Options Plugins Assembler Custom Build Driver M Run to Build Actions EC gt main main Lit LE Debugger Setup macros IAR ROM monitor Use macro file J Link J Trace OO El M acraigor ADI Third Party Driver Device description file Override default TOOLKIT_DIRS CONFIG iolpc2294 df El Cancel Fig 7 16 Debugger Configuration Then select RDI category as shown in following figure In this page user needs to specify the path for H JTAG DLL Options for node blinky x Category Factory Settings General Options LC Compiler RDI Assembler Manufacturer ADI driver Custom Build n l Build Actions Browse to pour HDI driver Linker m pa Allow hardware reset Use the HDI menu to specify additional driver settings This Angel menu iz available after the ROI IAR ROM monitor ETM trace driver has been located J Link J Trace i Catch exceptions Reset Data FIG Undef Prefetch sw IRG Log ADI communication TOOLKIT_DIR cspycomm tog E Cancel Fig 7 17 RDI
7. Mew Load Save Save s Options Est About Program Wizard gt gt Programming 53C2440 K9F1G06 L Flash Selection Flash Unchecked Reset 2 Configuration Target Unchecked Check 3 Init Scripts Security UnProtect Pom Options General Type Plain Binary Format Pragram On Chip Flash D st Addr Block 0000 Page 0000 V erify Mand Flash Gre File H Flasher Help Entire Chip Entire Chip Fig 2 26 Program Wizard Programming Nand Flash Is Selected Copyright O 2009 WWW HJTAG COM All Rights Reserved 2 11 5 Program Options This is the fifth step of the programming wizard As shown in following figures user can make different selections based on the selected FLASH chip H Flasher 1n j E D E 0 x Mew Load Save Save s Options Est About Program Wizard gt gt Pgm Options USER MANUAL Flash Selection Configuration Init Scripts Programming General On Chip Flash Mand Flash H Flasher Help Flash Programming Options General Options Options for On Chip Flash Options for Nand Flash Fig 2 27 Program Wizard Program Options H Flasher Mew Load Save Program Wizard Flash Selection Configuration Init Scripts Programming Fgm Options On Chip Flash Mand Flash H Flasher Help Save As ol xl Options Exit About gt gt Pgm Options RESET Reset the target after programming has been completed VERIFICATION Perform second verification by
8. it is mentioned that H Jtag determines the ARM core based on the device ID For chips can t be recognized user can specify the ARM core manually User can also add the new device ID into the chip list After the chip list is updated H Jtag can detect and recognize the new chip automatically All this can be done in the target manager To add a new device ID user needs to input the ID and specify the according ARM core In target manager user also can delete existing device IDs The target manager 1s shown in Fig 4 12 USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 4 6 Target Manager x Delete Existing ID Code ID Code x ve Close Fig 4 12 Target Manager 4 Tip According to the IEEE 1149 standard device ID is 32 bit and the lowest bit should be 1 User can tell whether an ID is valid or not based on this If you have any chip that H Jtag can t recognize please email us the device ID and the ARM core We will update the chip list in next version 4 10 TAP Configuration For most ARM chips the JTAG scan chains are separated For these chips the default TAP configuration should be adopted as shown in Fig 4 13 The figure indicates that no other scan chain is concatenated before and after that of the ARM core TAP Configuration x TBI BYPASS pm a LE Buto Default OF Cancel Fig 4 13 Default TAP Configuration Some chip integrates other scan chains besid
9. B Bit Width Bit width of the read operation which could be 8 bit 16 bit or 32 bit B Dest Address Destination address of the read operation Please ensure that the address is aligned Examples Getmem 0S Bit 0x0 Read the value at address 0x0 bit width 1s 8 bit Getmem 16 Bit 0x0 Read the value at address 0x0 bit width 1s 16 bit Getmem 32 Bit 0x0 Read the value at address 0x0 bit width 1s 32 bit 6 1 3 Delay Delay command is used to add certain delay between two scripts Some operation needs some time before it takes affect This command can be used as null operation to wait previous script gets completed The format of this script command is Delay time millisecond B Delay Command B Time Delay time in millisecond Examples Delay 100 Delay 100 milliseconds Delay 5000 Delay 5000 milliseconds 6 1 4 SysReset SysReset command is used to perform system reset This command can only be used as the first command in user s scripts If SysReset appears in other position it will be ignored Note SysReset command can only be used as the first command in user s scripts The format of this script command is SysReset No parameter USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 6 2 6 1 5 SoftReset SoftReset command is used to perform soft reset The main purpose is to reset CP15 control register For target with CACHE and MMU this command can be used to disable both the MMU
10. Configuration USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 9 In Fig 7 17 click Browse and select H JTAG DLL located under the installation folder of H JTAG After this the dialog looks like Fig 7 18 Options for node blinky X Category Factory Settings General Options C C Compiler RDI Assembler Custom Build Manufacturer ADI driver Build Actions Program Files HA TAGSH JT AG dll Linker Note E iai Allow hardware reset Use the ADI menu to specify MR additional driver settings This ies menu is available after the RDI IAR ROM monitor ETM trace diver has been located J Link Al Trace Macraigor Catch exceptions Rest Data FIG Third Party Driver Undef Prefetch swl TIRO Log ADI communication TOOLKIT_DIR cspycomm log El Cancel Fig 7 18 Choose H JTAG DLL In above figure click OK to complete the configuration After the configuration is completed a new menu named RDI is added in the main window as shown in Fig 7 19 To check the basic information about H Jtag click RDI gt Configure The basic information about H Jtag is shown in Fig 7 20 IAR Embedded Workbench IDE File Edit View Project RDI Tools Window Help ing d Configure Workspace ETM Trace window blinky Internal Flash Trace Setup Trace Save Breakpoint Usage Ha lblblinky 1 La lBlhello Inter w Overview hello
11. H Flasher Help Fig 2 21 Program Wizard Flash Selection 2 Configuration Configuration is the second step of the wizard The display is shown in Fig 2 22 In this step user needs to provide the basic addressing information for example bit width flash start address RAM start address XTAL init TCK and program TCK All this information is a must In this step if an input area is in gray it means no input is required Normally the information is fixed for on chip flash Mew Load Save SaveAs Options Exit About Program Wizard gt gt Configuration ji L Flash Selection Flash width Chip 168i 2 1 Chip Programming Flash Start Address Ox Init Scripts Pgm Options General RAM Start Address x1 0000 Gn Chip Flash EA Ext XTAL MHz UW F Y WE u H Flasher Help INIT TCK PGM TCE Fig 2 22 Program Wizard Configuration USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 2 9 3 Init Script Init script is the third step of the programming wizard In this step the display is shown in Fig 2 23 User can input any scripts for initialization During the programming H Flasher first executes the provided init script in order to initialize the target system For on chip flash the initialization has been included in the flash driver so no additional init script is needed In this case the buttons for editing are all disabled l H Flasher En lol New Load Save Save s Options Est Abo
12. TDI Pind D3 TDO Pini Busy nTRST Ping DO v nSAST NO SYS RST y OK Cancel Fig 4 9 Selection of LPT TCK Speed Copyright O 2009 WWW HJTAG COM All Rights Reserved 4 5 4 7 LPT Port Setting For most PCs the default LPT address is 0x378 but there are some exceptions In H Jtag different port addresses can be specified The dialog for port setting 1s shown in Fig 4 10 In the dialog there also has a test button which can be used for some simple port read write test xl Pork Addre LPI 0x378 C LP2 0x278 LPs 00 x Port Testing AAA OF Cancel Fig 4 10 LPT Port Setting 4 8 Target Setting H Jtag reads device ID via JTAG and determines what the ARM core is H Jtag can recognize most of the common chips For target that can t be recognized user can designate the ARM core in target settings The dialog for target settings is shown in Fig 4 11 Most of the ARM chips support both little endianess and big endianess With different endianess the storage of data and instructions are totally different If the endianess is not specified correctly the debug definitely goes wrong User can specify the endianess in target settings see below Target Settings X Fra ESO wand Auto Detect C anatomy le Ps O aam El Target Endian Em Little Endian C Big Endian E K Cancel Fig 4 11 Target Setting 4 9 Target Manager In above section
13. USB LPT Interface Selection 4 6 JTAG Configuration This section introduces the definition of JTAG interface connection to USB LPT port and the configuration of JTAG 4 6 1 JTAG Signals JTAG is a test standard proposed by IEEE For ARM debugging JTAG is used as the interface The ARM JTAG interface defines 7 signals TMS TCK TDI TDO RTCK nSRST and nTRST For the debugging of ARM7 and ARM9Y TMS TCK TDI and TDO are indispensable while RTCK nSRST and nTRST are optional A Note For XScale both nSRST and nTRST signals are indispensable In addition these two signals should be separate Otherwise debugging can not be proceeded 4 6 2 JTAG Connection The typical JTAG connection looks like Fig 4 5 The JTAG emulator connects to both the USB LPT and the target H JTAG generates JTAG signals via the JTAG emulator to control the target The JTAG interface between JTAG emulator and ARM target normally adopts the 14 pin or 20 pin standard The H Jtag server and the JTAG emulator can communicate to each other via USB or LPT When LPT is used user needs to provide the accurate JTAG configuration and tell H JTAG exactly how the JTAG emulator is connected to LPT For the details on how to configure JTAG please refer to the following sections H JTAG JTAG ARM SERVER EMULATOR JTAG TARGET Fig 4 5 JTAG Connection USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 4 3 4 6 3
14. USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved III Preface A About this manual H Jtag user manual introduces how to configure and use H Jtag and H Flasher Some illustrative examples are also given in this manual for reference For more information please visit www hjtag com or forum hjtag com B Using this manual This manual is intended to assist user in the use of H Jtag and H Flasher If you are a beginner this manual is a good quick start guide If you are not a beginner you can use this manual as a reference and read it selectively C Feedback If you find any error or omission in this document please contact us Any suggestions and comments are welcome The contact email address is twentyone hjtag com USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved IV 1 1 About H Jtag Chapter 1 H Jtag Introduction H Jtag 1s a debug agent likes the popular Multi ICE H Jtag includes three tools H Jtag server H Flasher and H Converter Fig 1 1 H Jtag server acts as a debug agent while H Flasher acts as a flash programmer H Converter 1s a conversion tools which supports common file formats like BIN HEX and ELF H JTAG SERVER H JTAG H FLASHER H CONVERTER Fig 1 1 H JTAG Structure H Jtag supports the debug of all the CORTEX M3 ARM7 ARMO and XSCALE based chips and can be used with most of the popular debuggers for example ADS RVDS
15. and CACHE For this kind of target the program or OS inside the flash may configure the MMU and perform complicated remap operation To re program the target it is suggested to disable the MMU and CACHE with SoftReset By disabling the MMU and CACHE it is easy to mange the memory map and make it same as what we expected The format of this command is SoftReset No parameter USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 6 3 6 2 Edit Init Script Both H Jtag and H Flasher provide script editor The editors are shown in Fig 6 1 and Fig 6 2 respectively Actually the editors of H Jtag and H Flasher are same The introduction in this section covers both ri H JTAG Server m File Control Flasher Init Tools O x Settings Options Help Init Script Address Value Enable Auto Init Mew Load OK Cancel A A ES USB Fig 6 1 H Jtag Script Editor Mew Load Save Save s Options Ext bout Flash Selection Configuration Init Scripts Programming Pom Options General On Chip Flash Nand Flash WF FFE a FU i H Flasher Help Fig 6 2 H Flasher Script Editor USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 6 4 6 2 1 Edit Buttons In the script editor there are four buttons for editing These four buttons are used to add delete move up or move down script The detailed definitions are listed below Move up the selected script 4 Add a new script D
16. for Target LPC2100 E xj Device Target Output Listing E Asm L Locate L Misc Debug Utilities Philips LPC2124 BigEndian v Use On chip ROM 0x0 0x3FFFF Operating system None M Use On chip RAM 0x40000000 0x40003FFF etal MHz External Hemon Start Size Cancel Defaults Fig 7 24 Dialog of Options In the dialog shown in Fig 7 24 active the Debug page Options for Target LPC2100 E X Device Target Output Listing E Asm L Locate LA Misk Debug Ph tilities Use Simulator Settings Use ULINK ARM Debugger Settings Limit Speed ta Real Time M Load Application at Startup MF Run to main v Load Application at Startup vw Run to main Initialization File Initialization File Restore Debug Session Settings v Breakpoints MW Toolbox Watchpoints M Memory Display Restore Debug Session Settings MF Breakpoints MW Toolbox M Watchpoints amp PA v Memory Display CPU DLL Parameter Driver DLL Parameter SARIM DLL PoLPC21 Dn SARM DLL Dialog DLL Parameter Dialog DLL Parameter DARMP DLL PLPC EN TARMP DLL PLPC EN Cancel Defaults Fig 7 25 Debug Page USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 13 In the Debug page click the drop down button two debug drivers H JTAG ARM and H JTAG CORTEX M3 can be found on the list as shown in Fig 7 26 User should select o
17. ii ia aaa 1 2 Installation and GUI 24 A ES 6211 DIM 2 1 2 2 UninstallatioM me S 2 3 PA WG UGE Cr A O 2 3 24 GUIOEEH FEIaSB6E ene conet ees sein none naine biens 2 7 H Jtag USB Emulator 5 1 Hardware Feature and IntEaCedAA 3 1 9 2 Different Emulator Versions io astas 3 3 3 9 Driver LMS ba ANON ADN Configure H Jtag Act Detect TABLE NE A ANN 4 1 A2 Reset VARGO ce 4 1 435 Auto Flash Downloads A dad 4 1 4 4 Inializati n SCri caia iio 4 2 Ao WUSBIELPT Interface Selecione 4 3 46 JTAG ConlBip9uratio0li oa 4 3 4 LET Port Setting ais E E 4 6 AS Tarzet SOU Dnm 4 6 49 Tarset Manat ET init RSR E 4 6 4 10 TAP Conhouration sencesa aa a a a aa 4 7 ALT HSJA Onions ti A AA Ee 4 8 Laici CR ee ES 4 9 135 Check tor Updates cia 4 9 Configure H Flasher SJ Workilow OF Haaser idos 5 1 9 2 H Flasher Prograni Wizard rs 5 2 Did SERIE TIDS Mc 5 7 USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved II Chapter 6 Chapter 7 5 4 Example T AT91SAM7X250 si 5 8 55 Example 2 LPC2210 SST39VFET60L ressens een ire 5 12 Initialization Script 6 1 Definition of Script Commands cccsscccccsssssssccccccccccccccccccccscesesessseeeees 6 1 62 Edit Initalization Criar id 6 4 Configure Debuggers Tel Connoure AXD Aere cT RU 7 1 72 Conticure RVDS uoces M e Index dite IE Me M E Ea ecc 7 4 Ted amp onHeure FAR sa ate ew 96 00900000 00 200 00 Qo ea aise eae we uoce iaa 7 8 T Contioure 0 peer RS 7 12
18. no PL or scope Click to Connect to a Target s M c 4 KI Dem Src 41 E b 41 El EDR on Sac faa Feria 5050 fios a RTT Fig 7 6 RVDS Main Window Next the connection control dialog is popped up Fig 7 7 zo RYDEBUG Unattached w File Edit Find View E Tools Debug PT rie io sounce ini a Not connected no Help e _E r Contexto APM Ltd RDI targets 2 ARMulator ARM instruction set simulator m ICE ARM JTAG debug interface parallel po El 214 F Remote A Angel debug protocol serial port Wal gi ds Connection Broker gt A localhost Simulator Broker Ele Searchfortextinfle a Fig 7 7 Connection Control Dialog USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 4 In Fig 7 7 right click inside the dialog to pop up the context menu shown in Fig 7 8 Z RYDEBUG Unattached ies File Edit Find View Project Tools Debug Help AECE 116560 12 E pere lolx r Contexto Se Mal ti ICE Expand S parallel po a Fl Remote El port Val de Co ion erties x n a SS See MM localhost Add Remowe Edit evitas o mi gt search forte inf a TOO TV 1 F F Fig 7 8 Context Menu In the menu shown in Fig 7 8 click Add Revmove Edit Devices the RDI Target List dialog is popped up The dialog 1s shown in following figure e
19. supports only 16 Bit mode So we can use the default bit width SST39VF1601 is expanded via BANKO so that the flash start address is 0x80000000 Although LPC2210 has internal SRAM we use external SDRAM in this example for illustration The external SDRAM is expanded via BANKI Hence the RAM start address is 0x81000000 Actually we can specify any 4K space within the SDRAM range The XTAL also doesn t need to be specified In this example the final settings are shown in Fig 5 10 USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 5 12 P H Flasher ES T olki Mew Load Save Saveds Options Est About Program Wizard gt gt Configuration 419154M7x256 L Flash Selection Flash Width x Chip C 328its1 Chip 4 Programming Flash Start Address 3 Init Scripts amp Pgm Options P General RAM Start Address O 00000 ke On Chip Flash Est XTAL MHz C 2 H Flasher Help IMIT TCE PGM TCK C hi0 MHz Fig 5 10 Configuration LPC2210 SST39VF1601 5 5 3 Init Script According to the datasheet of LPC2210 we need to configure three registers PINSEL2 0xE002C014 BCFG0 0xFFE00000 and BCFG1 0xFFE00004 PINSEL2 is a pin selection register which is used to configure some multiplexed pins BCFGx is bank configuration register which is used to set the bus width and read write wait cycles For details please refer the datasheet In this example we need three scripts listed in Fig 4 10 to make sure that t
20. wizard First let s try to check the target information by clicking Check In this example the check result is shown in Fig 5 13 The result indicates that the configuration is correct P H Flasher B BE Inl xl Mew Load Save SaveAs ptions Ext About Program Wizard gt gt Programming 55139VWF1601 L Flash Selection Flash SST3SVFIBUI Ox234B00BF Reset P Configuration Target SABM TDMI S LITTLE ENDIAN P 3 Init Scripts Security UnProtect Rem NN rea Pgm Options p UM General Type Auto Flash Download y Program On Chip Flash Dist Addr Verity Nand Flash BEES H Flasher Help Eme NL Pead Entire Chip Entire Chip 1 Head Fig 5 13 Check Result LPC2210 SST39VF1601 USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 5 14 Next let s try to program a binary file In this example the settings are shown in Fig 5 14 Plain binary format is selected the source file is TEST bin located under C and the destination address 1s 0x80000000 H Flasher B E ial xl Mew Load Save Save s Options Est About Program Wizard gt gt Programming 5ST39 FI601 I E l Flash Selection Flash SST39VF1601 0x2348008F Reset Configuration Target ARM7TDMI S LITTLE ENDIAN Check Init Scripts Security UnProtect Programming z Pom Options General Plain Binary Format Program On Chip Flash Flash Base Address V erify Mand Flash Sre File CATES
21. 3 8 Completing dialog After the above steps H JTAG will be listed as a device in the device manager as shown in Fig 3 8 If you can t see H JTAG in the device manager please try to install the driver again 10 x File Action View Help ml s Network adapters Ed 4 Ports COM amp LPT EE Processors He SCSI and RAID controllers m Sound videa and game controllers E d System devices M Universal Serial Bus controllers H JTAG Intel R amp 2801DBJ DBM USE 2 0 Enhanced Host Controller 24CD Intel R 82801 0B D6M USE Universal Host Controller 2422 Intel R amp 2801DBJ DBM USE Universal Host Controller 2404 Intel R amp 2801DBJ DBM USE Universal Host Controller 2407 Logitech USB Camera IM Connect USB Root Hub USB Root Hub USB Root Hub USB Root Hub Fig 3 9 Device manager USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 3 6 Chapter 4 Configure H Jtag This chapter introduces how to configure and use H Jtag in details Meanwhile some simple examples are given for reference 4 1 Detect Target Before detection please connect the JTAG emulator to the USB or parallel port and connect target to the JTAG emulator During the start up H Jtag tries to detect the target automatically After H Jtag 1s started up user can click the detect button to detect target If the target is detected successfully the ARM core and device ID are displayed in the middle of the main wi
22. IAR and KEIL MDK H Jtag provides flexible configuration with which H Jtag can work with Wiggler SDT Jtag other user defined JTAG interface boards and USB H JTAG emulator The included H Flasher supports the programming of most common flash chips With H Jtag it is easy to build up a debug platform Summed up H Jtag has following features support Semihosting O D I ON 4 HB D support RDI 1 5 0 and RDII 5 1 Support all CORTEX M3 ARM7 ARM and XSCALE chips Support THUMB and ARM instructions Support Little Endian and Bit Endian 1 2 Communication Structure Support Wiggler SDT Jtag user defined JTAG interface boards and USB H JTAG emulator support WINDOW 9 X NT 2000 XP VISTA Support the programming of most common On Chip flash Nor flash and Nand flash chips Support auto flash download for LPC1700 2000 AT91SAM LUMINARY and STM32F series H Jtag supports RDI interface from ARM Limited Through the RDI interface H Jtag can support most of the popular debuggers The connection for debugging is shown in Fig 1 2 DEBUGGER AXD RVDS IAR KEIL RDI USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved H JTAG SERVER JTAG EMULATOR JTAG Fig 1 2 Connection for Debugging ARM TARGET 1 1 Debuggers communicate with H Jtag server via RDI H Jtag server accesses the JTAG port of target system through the JTAG controlle
23. M All Rights Reserved 3 2 3 2 Different Emulator Versions H JTAG USB emulator has three versions which are personal version standard version and enhanced version These three versions can be differentiated by colors as shown in Fig 3 3 a Personal Version b Standard Version c Enhanced Version Fig 3 3 Different emulator versions The differences of functionalities are listed in Table 3 1 5 x LPT 750KB S 750KB S Speed Upload 5 x LPT 550KB S 550KB S arma xe ess ARM CORE Lm wo o 5 Caa o nodes Table 3 1 Differences of functionalities USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 3 3 3 3 Driver Installation After the installation of H JTAG software a folder named Driver is created under the installation directory Next user needs to install the driver for emulator This section shows how to install the driver step by step First connect the emulator to PC via a USB cable The PC will show a new hardware wizard dialog soon which looks like Fig 3 3 Found New Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps pon install software for H ITAG If your hardware came with an installation CD 42 or floppy disk insert it now What do pon want the wizard to do Install the software automatically Recommended C Install from a list or specific location Advanced Click Next ta continue Back Cancel Fig 3 4 New h
24. NI which can be found under the installation direction of KEIL as shown in Fig 7 22 Then click the Config button to perform the update After the update is completed successfully click Exit to exit TOOLCONF EXE T ToolConf for KEIL En x REIL TOOLS IHI D KeiNTOOLS INI EM Config Exit Next start KEIL and open a project Then click Project gt Options for Target as shown in Fig 7 23 lu Blinky Mision3 D Keil ARM Examples Blinky Blinky c m x E Eile Edit view Project Debug Flash Peripherals Tools SYCS Window Help E EJ ejl Mew Project d hi Import visioni Project aer Open Project gi E S Close Project HH HHH Project Workspace A Components senvranment Ecole AE ee EE EE EE EE EE EH psp ppp p pp CE TESTET D DE l Jug ran LPC2100 uVision ARM development tools a Select Device for Target LPC2100 K GmbH 2002 2004 Ely Startup FRE RRR e E Star i Options For Target LPE2100 3 Build target Fe Eem r a 2 i Lr E a qu TT gu m3 uw li zT m Wi ge Translate D eil aRMYExamplesWBlinkyBlinky c gr 5 1 D KeilARM Examples Blinky Blinky Uv2 STATE enia Lal Unknown Target Lis C67 CZ Fig 7 23 Menu of Options Set Project options USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 12 Then a dialog of options is shown up which looks like Fig 7 24 Options
25. Normally the downloaded file is zipped and need to be unzipped first After unzipped user can get the installation exe file h jtag exe By double clicking the exe file the installation can be started First user will see the welcome dialog as shown in Fig 2 1 Click Next and go to next step Installing H JTAG xj Welcome to the H JTAG Installation This setup program will install H JTAG 0 4 4 BUILD 20070401 on your computer Click Exit if you do not want to install this application Click Next to continue the installation WARNING This program is protected by international copyright law and treaties Unauthorized reproduction or distribution of this program or any portion of it may result in severe civil and criminal penalties and will be prosecuted to the maximum extent of the law Fig 2 1 Installation Step 1 In the second step user will see the license agreement as shown in Fig 2 2 Please read the agreement carefully To accept it tick I agree with the above terms and conditions Then click Next Otherwise click Exit to exit the installation A Installing H JTAG License Agreement To proceed with the installation you must accept this License Agreement Please read it carefully D H JTAG is a free software For personal use only Please do not use For any commercial purpose Please note that this program is distributed in the hope that it will be useful but WI
26. RYDEBUG Unattached Ioj x B ct Ta EL ur S Li ar E Use the check boxes to add or remove RO targets from the connection manager PSS Not connect Me Remote_4 v1 2 Angel debug protocol serial port Click to Ct Se Multi CE v2 2 ARM JTAG debug interface parallel port MB AMulator v1 2 ARM instruction set simulator Add DLL E Reset list Configure Remove Duplicate Searchfortextinfle ma Fig 7 9 RDI Target List Dialog USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 1 9 In Fig 7 9 click Add DLL the Select RDI DLL dialog 1s popped up The Select RDI DLL dialog is shown below In this dialog choose H JTAG DLL located under the installation folder of H Jtag Then click Open e RYDEBUC Select RDI DLL WF ci Look in c3 H AITAG do FE DSL File fio s SRE Not conne y Recent Click to Documents 4 Desktop E Name hy Documents SE hy Computer eh TINTE File name Hurra dl ii Places Seen tor tes Files of type RDI Target DLL Cancel Au is 7 10 6 H JTAGDLL After H JTAG DLL is selected a new dialog Fig 7 11 is popped up The new dialog is used to create a new RDI target In this dialog user can input a short name and a brief description or use the default ones RYDEBUG Unattached NES nl xi MN rie c MIE x SE Li m Use the check boxes to add or remove ADI targets from the connection mana
27. Reset Target ARMFTOMI Little Endian Check Security UnProtect Plain Binary Format Pragram Flash Base Address Verity Entire Chip Erase To Entire Chip Blank Address 11 Head Size Sre File Fig 5 7 Programming Settings Then click Program to start the programming During the process user can see the progress average speed and used time When the programming is completed successfully H Flasher notifies user with a message as shown in Fig 5 8 USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 5 10 E H Flasher E E E 10 x New Load Save Save s Options Est About Program Wizard gt gt Programming A T9154M7x256 Flash Selection Flash 419154M7256 Ox27580940 Reset 1 P Configuration Target ARM7TDMI Litle Endian Check 3 Init Scripts Security UnProtect RS PM 5 Pom Options b General Programmed and Verified 2 successfully mage P On Chip Flash Fl an Verify Nand Flash AO KB s 512 KB s Size 255 KB a H Flasher Help Close Eraze To Entire Chip Blank Address i Read Size lei lek lable Fig 5 8 Programming Is Completed 5 4 6 Save Configuration User can save the above configuration as a HFC file Later user can load the HFC file in H Flasher directly and need not to configure again USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 5 11 5 5 Example 2 LPC2210 SST39VF1601 LPC2210 is a
28. T BIN H Flasher Help Entire Chip Erase Entire Chip Blank PO i Read IEEE y Y Y Y WE um m Fig 5 14 Programming Settings Then click Program to start the programming During the process user can see the progress average speed and used time When the programming is completed successfully H Flasher notifies user with a message as shown in Fig 5 15 F H Flasher Lx New Load Save Save s Options Est About Program Wizard gt gt Programming 55139YF1601 Flash Selection Flash 5571394F1601 0x2348008F Reset 1 2 Configuration Target ARMYTOMI S LITTLE ENDIAN Check 3 Init Scripts M Programming EU UnProtect G Pom Options eG Programmed and Verified x2 successfully Program enera mms e On Chip Flash Li Verify e Hand Flash 110 KB s 122 KB s Size 2 MB 3 H Flasher Help Cloze Erase To Entire Chip Blank Address i Read Size RU Fig 5 15 Programming Is Completed 5 5 6 Save Configuration As shown in previous example user can also save the above configuration as a HEC file for future use USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 5 15 Chapter 6 Initialization Script This chapter introduces the definition of initialization scripts and how to edit scripts in H Jtag and H Flasher 6 1 Definition of Script Commands H Jtag defines 3 script commands Setmem Getmem Delay SysReset and SoftReset The purpose of each s
29. THOUT ANY WARRANTY User should be responsible for any consequences caused Install or use this software means you agree with and accept the above terms and conditions Otherwise please stop to use this software All rights reserved Copyright C Twentyone 2004 2007 I agree with the above terms and conditions lt Back Fig 2 2 Installation Step 2 In the third step user will see the destination folder dialog shown in Fig 2 3 In this dialog user can choose the destination folder After choosing the destination folder click Next and go to next step USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 2 1 A Installing H JTAG xj Destination folder Select a destination folder where H JTAG will be installed A Setup will install Files in the Following Folder Tf you would like to install H JTAG into a different Folder then click Browse and select another Folder c Program Files H JTAG Browse Ex folder css DE er Fig 2 3 Installation Step 3 In step 4 the progress dialog shown in Fig 2 4 will be seen This dialog shows the progress of installation In this step H Jtag will install all the files automatically A Installing H JTAG Xi Installing Files Copying H JTAG files to your computer A 2 To interrupt or pause the installation process click Cancel Directory C Program Files H JTAG FDevice AMD File AM29F800BB m Fig 2 4 Installatio
30. USB JTAG Setting H Jtag USB emulator supports different TCK speeds 25K 15M Hz User can choose the appropriate TCK speed in the USB JTAG setting dialog Fig 4 6 When AUTO TCK is chose H Jtag will choose an appropriate TCK speed automatically through testing USB JTAG Setting x C AUTO TCK 10 15 MHz Fig 4 6 USB JTAG Setting Note The TCK speed has direct affect on the debugging performance Different target system has different highest supported TCK speed The highest supported TCK speed also depends on the system clock configuration of target system Appropriate TCK speed should be designated Over high TCK speed leads to unpredictable debugging behavior AUTO TCK may not work under some situation In this case please designate a lower TCK speed manually 4 6 4 LPT JTAG Setting The LPT based JTAG controller does not have a fixed schematic even for WIGGLER and SDT JTAG Some JTAG emulator comes with nSRST while others don t have Some JTAG emulator provides separate nSRST and nTRST while others connected them together To support different LPT based JTAG emulators H JTAG provides a flexible configuration interface What user needs to do is tell H Jtag exactly how the JTAG emulator is connected to LPT The LPT provides 8 data bits DO D7 as output and several status bits as input The data bits can be used as JTAG output signals TMS TCK TDI nSRST and nTRST Any one of the status bits can be used as input to
31. alog USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 6 8 USER MANUAL gt gt Init Scripts Address Value 1 SetMem 3e Bi O 10000000 0312345578 Script Comment Copyright 2009 WWW HJTAG COM All Rights Reserved 6 9 Chapter 7 Configure Debuggers This chapter illustrates how to configure common debugger software which include AXD RVDS IAR and KEIL For details on how to use respective debuggers please refer to their own user manuals 7 1 Configure AXD ADS Arm Developer Suit is the most widely used IDE from ARM Corp AXD is the debugger comes with ADS This section introduces how to configure AXD and use it with H Jtag First start AXD and click Options gt Configure Target as shown in Fig 7 1 File Search Processor Views System Views Execute Options Window Help EE amp a5 LE PALA Disassembly Mode Configure Interface Configure Target Configure Processor E clas SEE Target Image Files Class Source Path w Status Bar Profiling System Output Monitor ROI Log Debug Log Log file HDI Severe Error 00500 Could not find h jtag server Please make sure that h jtag server has been started properly Ho Pos gt No Image Mames Configure target and debugging agent options Fig 7 1 Configure Target Menu USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 7 1 Next the choose target dialog Fig 7 2 1s p
32. and check whether the flash can be accessed by the specified address 5 1 4 Read Erase Program Verify Check Blank After the previous three steps have been executed successfully H Flasher can perform any operations on target flash as required The supported operations include read erase program verify and check whether the flash is empty 5 2 H Flasher Program Wizard H Flasher comes with a program wizard to easy the configuration User can follow the wizard to complete the configuration 5 2 1 Flash Section In this first step user can select the target flash from the list User needs to check the information and ensure that the selection is correct The correct selection is very important because different flash chips define different command sets 5 2 2 Configuration In this step user needs to provide necessary information about the target system which includes flash bit width flash start address RAM start address XTAL and TCK Bit Width and Chip Number Some external flash chips can operate at different bit widths for example 8 Bit 16 Bit and 32 Bit Normally drivers for different bit widths are different Hence user needs to specify the bit width for this kind of chips For chips support only one bit width the default one is used and user doesn t need to specify it In some design multiple chips are used In this case user also needs to specify the right chip number Flash Start Address To operate on the ta
33. ardware wizard In the wizard choose Install from a list or specific location as shown in Fig 3 4 Then click Next Found New Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps vou install software for HITS G If your hardware came with an installation CD 42 or floppy disk insert it now What do you want the wizard to do C Install the software automatically Recommended Install from a list or specific location Advanced Click Next to continue Back Cancel Fig 3 5 Install from list USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 3 4 Next a search and installation options dialog Fig 3 5 will be shown In this dialog choose Search for the best driver in these locations De select Search removable media Select Include this location in the search Meanwhile use the Browse button to locate the Driver folder under H JTAG installation directory Then click Next Found New Hardware Wizard Please choose pour search and installation options a S Search for the best driver in these locations Use the check boses below to limit or expand the default search which includes local paths and removable media The best driver found will be installed Search removable media floppy CD ROM v Include this location in the search C Program Files HJTAG Driver C Don t search will choose the driver to install Choose this opti
34. ase note that vector catch also consumes breakpoint resources So user 1s suggested to disable vector catch B REPORT DATA ABORT During debugging even when the processor is halted debugger needs to access the memory of target Data abort may occur when undefined space or access protected area 1s accessed If report data abort is enabled H Jtag would notify user when data abort occurs Otherwise H Jtag would only handle the data abort internally without notifying user B DISABLE IAR BKPT 0x8 Under IAR a breakpoint is set at 0x8 during debugging This breakpoint is invisible in the breakpoint list When debugging inside flash user can disable this invisible breakpoint to free a breakpoint unit 4 12 H jtag Tools H Jtag provides some tool under the Tools menu In the future we are going to add more tools to this menu as required by user 4 13 Check for Updates User can check for updates by using the check menu If there is any newer version available H Jtag would notify user User also can visit the homepage of H Jtag for more information USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 4 9 Chapter 5 Configure H Flasher This chapter introduces how to configure and use H Flasher in details At the end of this chapter two examples are provided for reference 9 1 H Flasher Workflow The workflow of H Flasher is very simple As shown in Fig 5 1 the workflow includes four steps execute init script do
35. ation is sector based To avoid the loss of data H Flasher provides auto backup and restore mechanism H Flasher will backup some data before erase and restore them during the programming With this mechanism the contents of the flash are kept unchanged except those covered by current programming Tip 6 When user sees the error message Destination flash address is out of range it means that the specified destination address or the destination address extracted from HEX file is not inside the valid flash address range Please check the destination address and ensure it is valid Tip 7 For some chip the ID might be changed after some new version is released In this case please contact us We will provide updated flash driver Tip 8 If something goes wrong during the operation please check the configuration and ensure that correct configuration is provided If the error still occurs when correct configuration is provided please contact us We will analyze where the problem is and provide updated flash driver when necessary USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 5 7 5 4 Example 1 AT91SAM7X256 AT91SAM7X256 is an ARM7 based chip from ATMEL This chip comes with 256K Bytes internal flash and 64K Bytes internal SRAM This section shows how to configure and program it with H Flasher 5 4 1 Flash Selection In this step select AT91SAM7X256 as the target flash as shown in Fig 5 2 H Flasher
36. cified address Most of the time the cause is no init script is provided or the init script 1s not correct To provide right scripts user needs to have good understanding on the target system Hence user is suggested to read the datasheet carefully especially the memory configuration 4 Tip When USB based H JTAG emulator is used user is suggest to configure the system clock through init scripts to gain better performance 5 2 4 Programming In this step user can perform operations on flash The supported operations include check flash and target information program flash verify flash erase flash and check whether the flash is empty USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 5 3 B Reset The reset operation can be used to perform system reset on target B Check The check operation reads the flash ID and other basic target information User can use this operation to test whether the configuration 1s correct or not B UnProtect This operation can be used to un protect a protected flash chip When the selected flash is not supported by this operation the button will be disabled automatically Currently the STM32F series are supported B Program H Flasher provides three types of programming Auto Flash Download Intel HEX Format and Plain Binary Format for different scenarios For flash programming both the data to be written and the destination address are indispensable The difference among these thre
37. configure according to the schematic of user s own JTAG emulator Jtag Settings x Jtag Settings x Jtag Selection C SdtJtag Predefined C User Defined Wiggler Predefined r Reset Signal Output nSRST output inverted v nTRST output inverted m TEK Control TCK Speed Max 71 y Wiggler Pin Assignment Pind D3 Pinll Busy nTRST Ping DO y nSRST No svs RST v OK Cancel Jtag Selection C Wiggler Predefined C_SdtJtag Predefined User Defined Reset Signal Output M nTRST output inverted F nSRST output inverted m TEK Control TCK Speed Max 71 y User Defined Pin Assignment TMS Pind D1 x TCK Pint D2 x TD Pins D3 x TDO Pitt Busy y nTRST Pin2 DO x nSRST no SYS RST 7 OK Cancel Fig 4 8 Example JTAG Settings In the dialog of LPT JTAG settings user can also choose different TCK speed The selectable TCK speed ranges from MAX to MAX 8 Actually the parallel port is a low speed interface In practice user is suggested to use MAX I as the default speed to achieve maximum performance USER MANUAL Jtag Selection Wiggler Predefined C SdtJtag Predefined C User Defined Reset Signal Output v nTRST output inverted n8RST output inverted TCK Contro TCK Speed M x 1 y iste Jtag Settings x Wiggler Pin Assignment TMS TCK
38. cript command is listed in Table 6 1 These 5 script commands can be combined to initialize different systems Table 6 1 Script Commands Command Function Setmem Set memory value Read memory value SysReset Perform system reset SoftReset Perform soft reset Note Currently only 5 script commands are defined But these commands can satisfy most situations In the future the command set may be extended to accommodate new requirements 6 1 1 Setmem Setmem is the most important script command This command can be used to set the value of memory which includes memory mapped registers The format of this script command is Setmem bit width dest address value B Setmem Command B Bit Width Bit width of the write operation which could be 8 bit 16 bit or 32 bit B Dest Address Destination address of the write operation Please ensure that the address is aligned B Value The value written to the destination address Examples Setmem 08 Bit 0x0 0x12 Write 0x12 to 0x0 bit width is 8 bit Setmem 16 Bit 0x0 0x1234 Write 0x1234 to 0x0 bit width is 16 bit Setmem 32 Bit 0x0 0x12345678 Write 0x12345678 to 0x0 bit width is 32 bit USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 6 1 6 1 2 Setmem This command can be used to read the value of a specific memory address The format of this script command is Getmem bit width dest address B Getmem Command
39. e types is where is the information comes from A Auto Flash Download For Auto Flash Download no source file and destination address are needed to be specified All the information is from H Jtag B Intel HEX Format HEX file includes both the data program and address information Hence user only needs to specify the source file when Intel HEX format is selected H Flasher extracts the address from HEX file automatically and uses it as the destination address C Plain Binary Format Plain binary file includes only the program data For plain binary format user needs to specify both the source file and the destination address B Verify This operation can be used to verify the programming by reading the content of target flash and comparing it with the source file B Erase amp Check Blank The erase and check blank operations can be used to erase the flash or check whether the flash is empty For both operations user can specify the range using the list boxes B Read The read operation is provided to dump the content of memory on specified address To read the content of memory please specify both the start address and size in terms of bytes for Nor Flash and On Chip Flash or specify the starting sector starting page ending sector and ending page for Nand Flash USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 5 4 5 2 5 Program Options H Flasher provides some useful operation options for example r
40. elete the selected script Move down the selected script 6 2 2 Edit Script For each new script user first needs to select a command and then specify the parameters as defined To add a new script click Add on the right side After a new script has been added the editor looks like Fig 6 3 gt gt Init Script Fig 6 3 Add a New Script A command list can be shown up by double clicking the Cmd column The command list is shown in Fig 6 4 User can select a command from the list as needed gt gt Init Scripts ld Cmd_ f width_ Address 1 Softhezet amp Fig 6 4 Command List USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 6 5 If SysReset is selected no other parameter is needed Fig 6 3 shows how the editor looks like after the completion of the SysReset script gt gt Init Scripts Fig 6 5 SysReset Script If SoftReset is selected no other parameter is needed Fig 6 6 shows how the editor looks like after the completion of the SoftReset script gt gt Init Script ide 1h Eu t Fig 6 6 SoftReset Script USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 6 6 If Delay command is selected the delay value also needs to be specified Fig 6 7 shows a script which delays 5000 milliseconds Cid Cmd width Address Value pla JLE 41 Delay Fig 6 7 Delay Script If Setmem command is selected a
41. erver Z D RDI1 5 1 TCK 1 0M 058 Fig 2 7 Main window of H Jtag The menu includes all the operations and configurations and the toolbar includes most of the common ones When a connected target is detected H Jtag displays the ARM core and 32 bit device ID in the middle of the main window When no target is detected or the target is unrecognized H Jtag displays UNKNOWN USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 2 3 2 3 1 Menu of H Jtag B File Menu as shown in following figure H H JTAG Server ENS Lini x File Control Flasher Init Tools Settings Options Help F S b amp g Fig 2 8 File Menu Exit Exit H Jtag B Control Menu as shown in Fig 2 9 A H JTAG Server E File Control Flasher Init Tools Settings Options Help te Reset Target amp 0 E i a Dietect Target 2 Kill Connection Fig 2 9 Control Menu E Reset Target Reset target e Detect Target Detect target Kill Connection Kill current connection B Flasher menu as shown in Fig 2 10 HM H JTAG Server NES iml xj File Control Flasher Init Tools Settings Options Help Ar Start H Flasher a ou Eli Auto Download Fig 2 10 Flasher Menu Start H Flasher Start H Flasher E Auto Download Enable Disable auto flash download B Init Menu as shown in Fig 2 11 Al H JTAG Server BEES im xj File Control Flasher init D Tools Settings Option
42. es that for ARM core For this kind of chips user needs to configure TAP accordingly STR91XF is a chip from ST This chip integrates several scan chains inside as shown in Fig 4 14 STR9IxF has 3 TAPs TAP 1 TAP 2 and TAP 3 Among all these TAPs only TAP 2 is for ARM debugging TAP 1 and TAP 3 are concatenated before and after TAP 2 The IR length of TAP 1 and TAP 3 is 5 Bit and 8 Bit respectively For this chip the TAP configuration should look like Fig 4 15 The TAP configuration shown in Fig 4 15 tells that there is one scan chain before that of the ARM core and its IR length is 5 Bit In addition there is another scan chain after that of the ARM core and its IR length is 8 Bit Based on the TAP configuration H Jtag knows how to access the scan chain of the ARM core for debugging USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 4 7 TCK TCK TMS TMS TAP 1 TAP 2 TAP Boundary Scan ARM DEBUG Flash Memory IR 5 IR 4 IR 8 TDI TDO TDI TDO TDI nTRST m nTRST m nTRST Fig 4 14 STR9IxF Scan Chains TAP Configuration B x Default OF Cancel Fig 4 15 TAP Configuration STR91xF 4 11 H Jtag Options H Jtag provides some common options User can make the selection using the main options window or the option menu The main window of options 1s shown in Fig 4 16 a x v Disable Semihosting Semihosting Vector Catch Data Abort Note If you don t need semihosting for debugg
43. eset target after programming additional verification and encryptions User can choose these options on demand RESET When enabled H Flasher will reset the target when the programming is done VERIFICATION When enabled H Flasher will read the data from flash and compare them with the source file for the second time when the programming is done SKIP ID CHECK When enabled H Flasher will skip the check of flash ID during the operations ERASE CHIP When enabled H Flasher will erase the entire flash chip instead of those affected sector before perform the flash programming SMART MODE When enabled H Flasher will backup the content of the flash before programming and then restore them during the programming This option can ensure the data which are not covered by the source file keep unchanged NXP LPC1700 2000 This option determines if H Flasher adjusts the checksum of the vector table before the programming ATMEL AT91SAM When enabled H Flasher will set the security bit to enable flash protection when the programming is done ST STM32F When enabled H Flasher will set the RDP option byte to enable flash protection when the programming is done NAND FLASH PGM OPTIONS To program NAND flash user needs to provide the following information to H Flasher Y Programming Mode Specify how to program the NAND flash skip bad blocks or relocate bad blocks v Scan of Bad Blocks Specify how to scan the bad bl
44. etahitag cam Copyright C Twentpone 2004 2008 Ok Fig 7 13 H Jtag Information USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 7 7 3 Configure IAR IAR stands for AR Embedded Workbench which is from IAR Corp This section introduces how to configure IAR to work with H Jtag First start IAR and click Project gt Options TAR Embedded Workbench IDE File Edit View Project Tools window Help ini x D cw kd Cj Addis 4 3 3 Vx D pe D IE ERIT Add Group ae Import File List a Edit Configurations Remove O fojphytec_t S blink Create New Project Shella Add Existing Project Options AlE F Source Code Control Make FY Compile Girl Rebuild All Clean Batch build F8 Stop Build i blink Overview blink Debug Ctrl D Make amp Restart Debugger A d LL d Fig 7 14 IAR Options Menu Edit options Far the Then following dialog of options is shown up Options for node blinky Category General Option L C Compiler Target Output Library Configuration Library options MISHA E disi Processor variant Custom Build Build Actions C Core ARM TDMI S Linker Debugger Device Philip LPE2294 E Simulator Angel LR AOR monitor FPL J LinkU Trace Hone M acraigar REI M Generate nterwork code Third Party Driver Processor mode Endian mode Little C Big C Am Thumb USER MANUAL
45. g 2 14 Options Menu Options Window Open the main window of options Connection Mode Selection of different connection modes Vector Catch Config Configuration for vector catch Disable Semihosting Disable semihosting function Disable Vector Catch Disable vector catch function Report Data Abort Enable Disable report of data abort USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 2 5 e Disable IAR bkpt E 0x8 Disable the breakpoint set at 0x8 by IAR B Help menu as shown in Fig 2 15 H H JTAG Server B IOl x File Control Flasher Init Tools Settings Options Help i3 a ra A b ill t H ITAG Home ij Check Update Auto Update User Manual CH User Manual EN 3 About H ITAG Fig 2 15 Help Menu e H JTAG Home Visit H Jtag homepage Check Update Check for updates E Auto Update Enable Disable automatic check for updates User Manual CN Chinese user manual User Manual EN English user manual LE About H JTAG Information about H Jtag 2 3 2 H Jtag Toolbar This section gives a brief introduction to the toolbar The toolbar of H Jtag includes most of the common operations and settings The toolbar is shown in Fig 2 16 QAx F5 4 Fig 2 16 Toolbar of H Jtag The definition and function of each button is shown below Reset target Detect target Kill current connection Start H Flasher Configure init script Selectio
46. ger File BNO SOL TEN PEER Mame Create New RDI Target x Not connect Mer Remote Click to Ec PS Multi ICE Enter a name and a description for the new entry in the MI ARMulator connection list Description at petit sine c LABM f T gt TUN Add DLL Reset list Configure Remowe Duplicate Close Currently opened file Ln 1 Col 1 pa ai Fig 7 11 Create New RDI Target Dialog USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 6 After that user can find that H Jtag has been added into RVDS as shown in Fig 7 12 In this step user can check the basic information about H Jtag by clicking Configure or double clicking H JTAG The basic information is shown in Fig 7 13 To complete the configuration please click Close in Fig 7 12 RYDEBUG Unattached E xj CEA File Edit ayEQETMTEEC xj Li Du El E Use the check boses to add or remove ADI targets from the connection manager File Bio SOL Not connect Click to Ec ze Remote Angel E protocol serial part Me Multi E ya a ARM JTAG debug interface parallel part ME AMulator v1 2 ARM instruction set simulator Add DLL Reset list Configure Hemove Duplicate Close Currently opened File Ln 1 Col 1 We a oe Fig 7 12 RVDS Configuration About H JTAG xj o AUTAG VerNo BUILD Date Http nan Ajkag com Http forum hjbag com Twentpon
47. he flash and SDRAM are accessible E H Flasher A ll xj Mew Load Save Save s Options Est About Program Wizard gt gt Init Scripts SST39VFIBUT L Flash Selection lcd AT SetMem 32Bit OxE002C014 O 0F814914 2 SetMem 32 Bit O FFEODODO Ox10007DE 4 Programming SetMern 32 Bit OxFFEOOOO4 010000400 D Porn Options kb General ke On Chip Flash kb Mand Flash 2 H Flasher Help Fig 5 11 Init Script LPC2210 SST39VF1601 USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 5 13 5 5 4 Program Options Before starting the operation user can choose different program options as required In this example we choose to perform the additional verification and reset target when the programming is done E H Flasher 4 f E E 21501 x Mew Load Save Save s Options Exit About Program Wizard gt gt Pgm Options SST39 F1601 Flash Selection RESET Configuration eset the target after programming has been completed Maple WERIFICATION Programming erform second verification by reading after programming ll SKIP ID CHECK Skip the check of flash id before all the flash operations Nand Flash Erase entire chip instead of sectors before programming Backup flash data before erasing and then restore them during programming ADD OH Enabke h Hasher addion Fig 5 12 Program Options 5 5 5 Programming After the configuration is done we can operate on target flash in the fourth step of the
48. ill call H Flasher to achieve 1t automatically A H JTAG Server E 151 Flasher Init Tools Settings Options Help 4 F Start H Flasher Auto Download f Fig 4 1 Auto Flash Download File Control Note Normally auto flash download only supports on chip flash like LPC2000 and AT91SAMT The reason is that the memory systems of these chips are relatively simpler For chips supports complicated memory configuration like MMU REMPA please write the program into flash using H Flasher before starting debug USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 4 1 Note H Flasher Lite does not support Auto Flash Download To use Auto Flash Download please run H Flasher 4 4 Initialization Script For most systems initialization need to be completed after powered up The initialization of memory system is one of these Most of the time flash and on chip SRAM can be accessed directly after powered up but this is not the case for external SDRAM External SDRAM needs to be initialized before 1t can be accessed correctly For beginners one of the common problems is that the program can not be downloaded into external SDRAM correctly The reason is that the external SDRAM is not initialized properly There are two methods to initialize the target system The first one is to write an initialization program into flash This program will be executed right after the target is powered up So the target is ini
49. ing you can disable it here Fig 4 16 Main Window of Options B CONNECTION MODE Different connection modes are defined in H Jtag From the connection mode list user can select different modes as required B VECTOR CATCH CONFIG H Jtag server manages the vector catch configuration In the configuration dialog Fig 4 17 user can decide which exception s interrupt s to be caught during the debugging When all the flags are cleared vector catch is disabled automatically In another case where the global disable vector catch option is enabled the configuration on the following dialog is ignored automatically USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 4 8 ector Catch x CORTEX M3 RESET M STATERR F MMERR BUSERR NOCPERR INTERR CHKERR HARDERR OK Cancel Fig 4 17 Vector Catch Configuration B DISABLE SEMIHOSTING Semihosting is a mechanism for debugging which can be used for the communication between host and target Semihosting needs the support from both the emulator and the program running inside the target In addition semihosting can only be used for debugging and can t be use in real product Semihosting also consumes breakpoint resources So user is suggested to disable semihosting B DISABLE VECTOR CATCH Vector catch is used to capture exceptions When vector catch is enabled in both H Jtag and debugger exceptions are notified when they occur Ple
50. ll the bit width destination address and target value need to be specified When Setmem command is selected a bit width list will be shown up by double clicking the Width column Fig 6 8 User can select the right bit width from the list Next user needs to input the destination address and value in the Address column and Value column respectively Fig 6 9 shows script Setmem 32 Bit 0x0 0x12345678 which is to write 0x 12345678 to 0x0 gt gt Init Script Fig 6 8 List of Bit width gt gt Init Script Tax ona Lee ME Setmem E Fig 6 9 Setmen Script USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 6 7 If Getmem command is selected both the bit width and destination address need to be specified When Getmem command is selected a bit width list will be shown up by double clicking the Width column Fig 6 10 User can select the right bit width from the list Next user needs to input the destination address in the Address column Fig 6 11 shows script Getmem 8 Bit Ox10000000 which is to read the 8 bit value at address 0x 10000000 Cid Cmd width Fig 6 10 List of Bit width gt gt Init Scripts Fig 6 11 Getmen Script 6 2 3 Add Script Comment For each script command user can add a comment In the script editor double click the index number before a command a dialog will be popped up as shown in Fig 6 12 User can review the existing comment or add a new one in the di
51. n ARM 7 based chip from NXP Former PHILIPS Semiconduct This chip is equipped with 16K Bytes internal SRAM but without internal flash This chip has four external memory banks which can be used to expand external flash and SDRAM In this example it is assumed that BANKO is used for external flash SST39VF1601 The address range is 0x80000000 to OXS0FFFFFF BANKI is used for external SDRAM and the address range is 0x81000000 to OxS81FFFFFF Next we are going to introduce how to program H Flasher SST39VF1601 with H Flasher 5 5 1 Flash Selection In the first step as indicated select target flash In this example SST39VF1601 should be selected The selection is shown in Fig 5 9 H Flasher E 15 x Mew Load Save Save z Options Exit About Program Wizard gt gt Flash Selection Flash Selecti ash Selection 5 T39LFOSO Vendor SST 1 g Configuration L GST3SLF1ED E PartNo 557239471601 3 Init Scripts o SSTSSLF 2008 i e SST39LF400A Type NOR FLASH our 88T39LF512 Eu G Pam Options SST38LFBUDA j e SST395F010A Block N A RSSST3S85F 20A On Chip Flash 8ST3SSFDAD Pepe pes Nand Flash 0 SST3SVF TO Sie 2MB C 58T38VF 20 2 H Flasher Help ZEN SET33VFDAD Ox 34BODBF SSTIIFOSO 1G BIT General C 58T38VF1681 o SST38VFT682 o L GeTaduEonnA hd Fig 5 9 Flash Selection SST39VF1601 5 5 2 Configuration In this step we need to provide the information on memory system SST39VF1601
52. n Step 4 In the final step user will see the dialog shown in Fig 2 5 The dialog indicates that H Jtag has been installed successfully To complete the installation click Finish A Installing H JTAG H JTAG has been successfully installed Thank you For choosing H JTAG Click Finish to complete the installation Fig 2 5 Installation Step 5 USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 2 2 After the installation shortcuts will be created on the desktop and the start menu respectively The shortcuts are shown in Fig 2 6 HI H JTAG Fl H Flasher E EE E H Flasher Lite ri pe a Ed Ed Ed Ed E H Converter H JTAG H Flasher H Flasher Lite H Converter TaalCanf T Teel ant TE H ITAG USER MANUAL CH TE H JTAG USER MANUAL EM i Uninstall Fig 2 6 Shortcuts of H Jtag A Start E NOTE The driver for H JTAG USB emulator need to be installed manually Please refer to Chapter 3 on how to install the driver 2 2 Uninstallation To uninstall H Jtag please run unstall exe from the start menu This program will uninstall H Jtag automatically During the process please follow the instructions to perform the uninstallation 2 3 GUI of H Jtag The main window of H Jtag is shown in Fig 2 7 In the figure 1 is the menu 2 is the toolbar 3 is the detected ARM core 4 is the device ID and 5 shows the connected debugger RDI version and hardware interface rl H JTAG S
53. n find that H JTAG DLL has been added as shown in Fig 7 4 In this step user can check the basic information about H Jtag by clicking Configure or double clicking H JTAG The basic information is shown in Fig 7 5 To complete the configuration please click OK in Fig 7 4 IL NEN ai OS File Search Diners ee Dar Fara Midi Farka Prises lim Halm Choose Target al ay eS Target Environments Target Im Add Remove Rename Save As Configure System Outpa l H JTAG Debug Interface for SAM In Cireuit E mulation RDI Log L Log file HDI Severe Cancel Help gt For Help press Fl l lt No Pos gt No Image Name gt lt Fig 7 4 AXD Configuration H ITAI Ver Ha BUILD Date Http nan hitag com Http forum hjbag com Twentponetahiag cam Copyright E Twentyone 2004 2008 Ok Fig 7 5 H Jtag Information USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 3 7 2 Configure RVDS RVDS stands for Realview Developer Suit which is from ARM Corp This section introduces how to configure RVDS to use with H Jtag The introduction is based on RVDS2 0 but the configuration for other versions 1s similar First start RVDS and then click Click to Connect to a Target as shown in Fig 7 6 E File Edit Find View Project Tools Debug Help CH BRIS CP im i BET ox ur d DP File BO SOURCE Find Not connected
54. n of USB LPT Configure target Device ID manager Open the option window Exit H Jtag FF FF FE AEREO ps 2 3 3 H Jtag Tray Menu When H Jtag is minimized the main window is hidden automatically and only an icon is shown in the system tray The main window can be restored by left clicking the icon Right clicking the icon the system tray menu is popped up The tray menu includes some common operations and settings USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved Restore H JT 4 Home 2 About H JTAG Options Script Flasher Kill Connection Detect Target Reset Target B Exit Fig 2 17 System Tray Menu of H Jtag The tray menu is defined as follows Restore Restore the main window H JTAG Home Visit homepage of H Jtag E About H JTAG Information about H Jtag E Options Options menu b Script Script menu E Flasher H Flasher menu e Kill Connection Kill current connection Detect Target Detect target LE Reset Target Reset target Exit Exit H Jtag 2 4 GUI of H Flasher The main window of H Flasher looks like Fig 2 18 In the figure 1 is the menu 2 is the program wizard and 3 1s the configuration area In the wizard user can go to different steps According to the selection on the wizard the configuration area has different displays For detailed information please refer to Chapter 5 F H Flasher Mew Load Save Sa
55. ndow Otherwise please check the configuration and hardware connection 4 2 Reset Target User can reset target via H Jtag For a standard JTAG interface two independent reset signals system reset nSRST and JTAG TAP reset nTRST are defined With these two reset signals H Jtag can perform system reset or JTAG TAP reset User can choose to perform system reset JTAG TAP reset or both H Jtag provides different options Please refer following section for details Note Some LPT based JTAG emulator doesn t provide system reset signal so H Jtag can t perform system reset on target The target can only be reset manually Some LPT based JTAG emulator connects the system reset and JTAG TAP reset together In this case any reset operation actually asserts both signals 4 3 Auto Flash Download Some ARM chips come with internal flash and RAM so no external memory is needed For this kind of chips for example LPC2000 AT91SAM7 LUMINARY CORTEX M3 and STM32F series H Jtag supports auto flash download With auto flash download program can be directly downloaded or written to flash for debugging just like debug in RAM SDRAM To use auto flash download please enable the auto download option as shown in Fig 4 1 Meanwhile please choose appropriate target flash in H Flasher During downloading H Jtag will determine where the program should be downloaded according to the destination address For those need to be written to flash H Jtag w
56. ne of the drivers accordingly Then click OK to complete the configuration Options for Target Target 1 y 3 xl Device Target Output Listing User C C Asm Linker Debug Utilities C Use Simulator Settings f Use H ITAR ARM Settings Limit Speed to Real Time OLINE 4AM Debugger LINE Cortex Debugger ae HDI Interface Driver M Load Application at Startup Run to main M Load Aller Blaster Cortex USAGE Luminary Eyal Board Signum Sustems J TAG yet J LIMK J TRACE amp T Li aA BE ETE E A JTAG ARM BAH 746 CORTE m3 NENA MW watchpoints v Memory Display Initializatic Initialization File CG El Edit Restore Debug Session Settings v Breakpoints W Toolbox v watehpoints amp PA v Memory Display CPU DLL Parameter Driver DLL Parameter SARM DLL 5ARM DLL Dialog DLL Parameter Dialog DLL Parameter DARMP DLL TARMP DLL Fig 7 26 H JTAG Debug Drivers USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 7 14
57. oad speed is up to 550KB S Hardware Features USB 2 0 Controller FPGA design High speed USB 2 0 Powered through USB 10K 15MHz JTAG speed 20 PIN std JTAG interface Wide target voltage 1 8 5 0V A Note H JTAG USB emulator only supports high speed USB 2 0 interface Maximum RAM Read Write Speed ARM7 Max write speed 750KB S Max read speed 550K S ARMO Max write speed 750KB S Max read speed 520K S XSCALE Max write speed 750KB S Max read speed 520K S CORTEX M3 Max write speed 420KB S Max read speed 340K S Note The above data is for reference only The actual speed may be different Appearance The appearance of the emulator is shown in Fig 3 1 The USB interface locates on the left side and the 20 pin JTAG interface locates on the right side Fig 3 1 Appearance of Emulator USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 3 1 There are three LED indicators on the upper side which are used to indicate the USB power target power and JTAG activity respectively A USB Represent the USB power B TGT Indicate if target is connected appropriately C ACT Indicate JTAG activity when flashing The H JTAG emulator equipped with a standard 20 pin JTAG interface The definitions of signals are shown in Fig 3 2 VREF NC nTRST GND TDI GND TMS GND TCK GND NC GND TDO GND nSRST GND NC GND NC GND Fig 3 2 JTAG interface of H JTAG emulator USER MANUAL Copyright 2009 WWW HJTAG CO
58. ocks for relocation mode erase the entire chip or only erase the affected blocks reserved area for relocation and reserved blocks for relocation Y Reserved Area for Relocation Specify the reserved blocks for relocation USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 5 5 Y Reserved Area for User Table Specify the reserved area for bad block table relocation table or user data H Flasher supports two NAND flash programming modes skip mode and relocation mode For the skip mode H Flasher will skip a bad block and jump to the next good one For the relocate mode H Flasher will relocate a bad block to a good block in the specified reserved area When skip mode is selected H Flasher will simply skip a bad block and program the data to the next good one in sequence When the relocate mode 1s selected H Flasher will first scan the flash to collect the bad block information by erasing the entire chip or only erasing the affected blocks the reserved area for relocation and the reserved area for user tables During the programming if a bad block 1s encountered H Flasher will program the data to the first free good block in the reserved area for relocation At the same H Flasher will record the relocation information When the programming is done H Flasher will send the bad block table and relocation table information to the NAND flash driver In the flash driver a function named nand_info_table will accept all the info
59. of the external crystal oscillator H Flasher uses this for the configuration of system clock When the flash chip is specified the input for XTAL may be disabled or enabled accordingly When it is enabled please specify the XTAL Otherwise ignore it INIT TCK amp PGM TCK INIT TCK specifies the TCK speed used during the initialization stage and the PGM TCK specifies the TCK speed used during the actual programming stage Normally the target system can support higher TCK speed after appropriate initialization Hence user can specify a lower TCK speed for successful initialization and a higher TCK speed for better programming speed Please note that INIT TCK and PGM TCK are active only when USB based H JTAG emulator is in use 5 2 3 Init Script In this step user needs to provide the init scripts for the initialization of target system User can edit scripts in the editor comes with H Flasher For more information on the definition of scripts please refer to Chapter 6 For on chip flash no init script is needed because the driver already includes it For external flash init scripts are necessary The purpose of init scripts 1s to configure the system clock and memory system The later one is more important because correct initialization of memory system is the prerequisite Otherwise H Flasher can t access flash and SDRAM If H Flasher can t download driver to RAM it notifies user with error message Can t download driver to spe
60. on to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware lt Back Henst gt Cancel Fig 3 6 Search and installation options Soon a confirm dialog will be popped up after a quick search In the following picture click Continue Anyway to proceed with the installation Found New Hardware Wizard Please wait while the wizard installs the software Hardware Installation AN The software you are installing for this hardware H TA has not passed Windows Logo testing to verify its compatibility with Windows XP Tell me why this testing ls important Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing Continue Anyway STOP Installation Back Cancel Fig 3 7 Confirm dialog USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 3 5 Later a completing dialog will be seen If the installation is completed successfully the dialog looks like Fig 3 7 Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for H JTAG aS Click Finish to close the wizard Back Cancel Fig
61. opped up lime Halr Dekara diii Escrita Dimke File Search Crececrar Mise O Choose Target feet er ES eee Target Environments Teo tm Tage Lab me Ven 5 p Remove Rename gave os Eonfiqgure 5 vstem Dlutpi Sy Please select a target environment from the above list or add a target environment ADI Log JU ta the list Mate that target environment has to be configured at least once before Log file it can be used ADI Severe D Cancel Help 4 eMo Pos gt No Image Name For Help press F1 Fig 7 2 Choose Target Dialog In the above figure click Add an open dialog Fig 7 3 is popped up In this dialog please choose H JTAG DLL which is located under the folder where H Jtag is installed Then click Open File Search Deinrarcent hice Cockers iii Exsriiba intime Wind Heln Choose Target E asi Target mo DM NN gt Target Im T arc A EE Add Look in E H JTAG E e ER Penna z Rename Save as PeF Eum dil A Configure System Outpt ADI Log L m Log file File name HITAG dI ADI Severe Files of type DLLs dif Cancel zt h Bk Cancel Help y For Help press F1 eMo Pas fi l lt No Image Name gt p Fig 7 3 Choose H JTAG DLL USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 7 2 After H JTAG DLL is selected user ca
62. pt In this third step user needs to provide the init script For AT91SAM7X256 the driver already includes the initialization Hence user doesn t need to provide init script for ATOISAM7X256 In this case the edit buttons are all disabled automatically as shown in Fig 5 4 H Flasher Mew Load Saves Options Exit About Program Wizard gt gt Init Scripts AT9154M7Xx256 Flash Selecti rem Ids Cmd width Address Value Configuration Init Scripts Programming Fgm Options General On Chip Flash Mand Flash y TT Y M a MN P H Flasher Help Fig 5 4 Init Script AT91SAM7X256 5 4 4 Program Options Before starting the operation user can choose different program options as required In this example we choose to perform the additional verification and reset target when the programming is done E H Flasher ES Mew Load Save Saves Options Ext About Program Wizard Pgm Options AT91SAM X256 E Flash Selectian RESET Configuration Pje the target after programming has been completed Init Scripts VERIFICATION Programming erform second verification by reading after programming Pam Options SKIP ID CHECK Skip the check of flash id before all the flash operations ERASE CHIP General On Chip Flash Nand Flash Erase entire chip instead of sectors before programming U T Y Y OE SL TM e Backup flash data before erasing and then restore them during programming EDEN Enabke flasher addion
63. r connected to LPT USB With proper configuration H Jtag can work with different LPT JTAG emulators or H JTAG USB JTAG emulator Besides debugging H Flasher can download data program into flash chip Currently H Flasher supports most common on chip flashes and external flashes In the future H Flasher will support more and more chips For programming the connection between H Flasher and H Jtag server is shown in Fig 1 3 H JTAG JTAG ARM H FLASHER SERVER EMULATOR TARGET Fig 1 3 Connection between H Flasher and H Jtag Server As shown in the above figure H Flasher also talks to H Jtag server via RDI The communication is similar to that for debugging 1 3Supported ARM Cores H JTAG supports the debugging and programming of all the common ARM cores CORTEX M3 ARM7TDMI ARMT7TDMI S ARM720T ARM 740T ARM9TDMI ARM920T ARM922T ARM940T ARM926EJ S ARM946E S ARM966E S PXA21X PXA25X PXA27X PXA3XX IXPAXX 1 4 Supported IDEs H JTAG supports all the popular IDEs which include SDT2 5 ADS1 2 RVDS2 0 RVDS2 2 KEIL MDK and IAR Embedded Workbench USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 1 2 Chapter 2 Installation and GUI This chapter introduces both the installation uninstallation and the GUI For the detailed configurations please refer to Chapter 4 7 2 1 Installation User can download the latest version installation file from www hjtag com
64. reading after programming SKIP ID CHECK Skipthe check of flash id before all the flash operations ERASE CHIP Erase entire chip instead of sectors before programming SMART MODE Backup flash data before erasing and then restore them during programming Ap UN Enabke hflasher addian Fig 2 28 Program Wizard General Options Copyright 2009 WWW HJTAG COM All Rights Reserved 2 12 USER MANUAL H Flasher Hew Load Save Save de Options Ext About Program Wizard gt gt Pgm Options Plash Selection Configuration Init Scripts Programming Pom Options General Nand Flash H Flasher Help MAP LPC 7002000 Disable the adjustment of the vector table check sum ATMEL AT31SAM Set the security bit after programming to enable protection ST STM32 Active the read protection by setting the RDP option byte Fig 2 29 Program Wizard On Chip Flash Options F H Flasher Mew Load Save Saves Options Ext About Program Wizard gt gt Pgm Options Ju y v FW EF sr Flash Selection Configuration Init Scripts Programming Pom Options General On Chip Flash Mand Flash H Flasher Help Programming Mode Skip bad block and jump to next one Relocate bad block to reserved area Scan of Bad Blocks f Erase and scan the entire Hash chip Erase and ecan the covered Blacks Reserved Area for Relocation From E To r Reserved Area for User Table
65. rget flash H Flasher needs to know the flash start address So user needs to specify the start address of the flash To H Flasher the valid address space is from Flash Start Address to Flash Start Address Size 1 Any address out of this range is treated as illegal Generally flash can be accessed by address 0x0 without initialization But some system supports remap and can map flash to different addresses For this case user needs to ensure that the specified flash start address is consistent to the provided init scripts In a word please provide the init scripts when necessary and make sure that H Flasher can access flash on the specified address USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 5 2 RAM Start Address User needs to designate a RAM space which should be gt 4K Bytes because H Flasher requires a 4K Bytes RAM space for driver use The valid address range 1s from RAM Start Address to RAM Start Address 4K 1 H Flasher downloads the flash driver into this area The flash driver can be downloaded into both SRAM and SDRAM If the target system has on chip SRAM it is suggested to use on chip SRAM instead of external SDRAM The reason is that the access of SRAM is much faster than that of SDRAM Meanwhile please provide necessary init scripts for the initialization of memory system and ensure that the designated RAM space is accessible XTAL For some chips H Flasher needs to know the frequency
66. rmation sent by H Flasher User can modify this function to build the bad block table and relocation table in the reserved area for user table as required Note 1 In skip mode H Flasher will not send the bad block table and relocation table information to the NAND flash driver when the programming is done Note 2 Due to the characteristic of NAND flash it is not possible to provide a common flash driver which fits all hardware platforms When the bad block table or relocation table are needed user should modify the nand_info_table function in the flash driver based on user s own requirements Note 3 Some options only work under normal operation mode For auto flash download mode H Flasher ignores all these options USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 5 6 5 3 Useful Tips Tip 1 H Flasher and Flasher Lite are same except that H Flasher Lite does not support Auto Flash Download To use Auto Flash Download please run and configure H Flasher instead of H Flasher Lite Tip 2 During the configuration if any edit box or list box is in gray it means that only one option is available User doesn t need to specify Tip 3 In H Flasher the entire configuration can be saved as HFC file for later use Tip 4 Before starting the programming H Flasher will erase certain part of the flash automatically Hence user doesn t need to erase the flash manually Tip 5 The erase oper
67. s Help oax F gt 23 B Init Script Auto Init Fig 2 11 Init Menu E Init Script Configure init script Auto Init Enable Disable auto init USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 2 4 B Tools Menu as shown in Fig2 12 Unlock Debug Port rn H JTAG Server File Control Flasher Init Tools Settings Options Help Unlock Debug Port Luminary ax FP Sr Fig 2 12 Tools Menu Unlock debug port for Luminary series B Settings Menu as shown in Fig2 13 6o FC amp FF H H JTAG Server E 210 xl File Control Flasher Init Tools Settings Options Help LISBJLPT Selection USE Jtag Setting LPT Jtag Setting LPT Port Setting Target Setting Target Manager TAP Configuration Fig 2 13 Settings Menu USB LPT Selection Selection of hardware interface USB JTAG Setting JTAG setting for USB LPT JTAG Setting JTAG setting for LPT LPT PORT Setting Port setting for LPT Target Setting Target setting Target Manager Device ID manager TAP Configuration TAP configuration B Options menu as shown in Fig2 14 6 o Y H JTAG Server ES File Control Flasher Init Tools Settings Options Help Ax PS 4 p E mov D Connection Mode aL vector Catch Config Disable Semihosting Disable vector Catch Report Data Abort Disable IAF bkpt 0x6 Fi
68. sample TDO The JTAG configuration is to specify how the JTAG signals are connected with the data bits and status bits On some JTAG emulator the nSRST and nTRST are inverted These also need to be specified in the JTAG configuration Next let s look at an illustrative example The schematic of the JTAG emulator used in the example is show in Fig 4 7 The connection between LPT and JTAG can be obtained from the schematic and is listed in following table Please note that the nTRST signal is inverted and no nSRST signal is provided TMS gt PT DI PIN3 TCK gt PT D2 PIN4 TDI gt PT D3 PINS TDO gt PT BUSY PINI1 nTRST mm LPT DO PIN2 INVERTED nSRST X NOT AVAILABLE USER MANUAL Copyright O 2009 WWW HJTAG COM All Rights Reserved 4 4 1 14 t LPT TDI gt 2 18 RA 51 TDI 2 LPT RSTpo LPT TMS 4 16 R 51 IMS P 15 LPT TCK 6 14 R 51 TCK L3 LPT TMSp1 TDO a R8 51 LPT TDO eo LPT TCK 13 2I 315 L5 LPT TDI p3 7 a EA L E M IF P 20 74HC244 8 R3 51 nTRST Sr e LPT RST at Hx 2N3114 CONN FLEX 20 gt 11 LPT TD usx os a 1 13 DB25 j T Fig 4 7 Example Schematic of JTAG Emulator Based on the schematic given in Fig 4 7 and the above analysis any of the following settings can be used Both the settings given in Fig 4 8 tell exactly how LPT is connected to the JTAG interface via the JTAG emulator The given example is only for reference In practice please
69. stem tray menu is popped up BP Restore SS About Exit Fig 2 20 H Flasher Tray Menu The tray menu 1s defined as follows Restore Restore the main window About Information about H Flasher 4 Exit Exit H Flasher 2 4 3 H Flasher Program Wizard The program wizard includes 5 steps and 1 help section This section gives a brief introduction to the program wizard 1 Flash Selection Flash selection 1s the first step of the program wizard as shown in Fig 2 21 In this step all the supported flash chips are categorized by vendors User needs to specify the target flash chip When a chip is selected the basic information of the chip is displayed on the right side USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 2 8 H Flasher i d a zal xl Mew Load Save Saves Options Est About Program Wizard gt gt Flash Selection El ATSISAM Vendor ATS1SAM Configuration COLL ATOISAM7AS PartNo AT91S AM 7X25E Init Scripts ATSTSAM75128 Vo AT91SAM7516 Type ON CHIP FLASH ATSTSAMTSTE l Pgm Options ATSTSAM S256 is ATSTSAMTS32 Block N A ATSTSAM S321 On Chip Flash 0 LOATSTSAMTSEI2 Page N A Nand Flash SATSTSAMTSEA Size 255KB ATSTSAMTSE25E ATSISAM SE32 ID Ox275B0940 ATSTSAMTSES12 32 BIT ATSTSAMTHT28 ATSTSAMTH25E ATSTSAMTH512 ATSTSAMTHCT28 ATSTSAMTAC256 ATSTSAMTXESI2 Law TOM Ahd Che 170 Programming General WF T Y WE u MHE
70. tialized automatically after powered up and is ready for use The second one is to use initialization script For the convenience of user H Jtag defines some script commands and provides auto initialization To use auto init user needs to input or load proper initialization scripts and enables auto init If auto init is enabled H Jtag will execute the provided initialization scripts whenever a connection is opened by debugger The script editor is shown in following figure For the details on the initialization script please refer to Chapter 6 ids Cmd Width Address Value setmem 32 Bit OxOO000000 Ow12 456 Mews Load DK Cancel Fig 4 2 Script Editor rn H JTAG Server E File Control Flasher Init Tools Settings Options Help ax F gt D amp 101 xi Init Script Fig 4 3 Auto Init Note If auto init is enabled in H Jtag server initialization scripts must be provided Otherwise H Jtag would notify user with error message Can t open specified init script Note For the detailed definition of script commands please refer to Chapter 6 USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 4 2 4 5 USB LPT Interface Selection H Jtag supports both LPT based JTAG emulator and USB based H JTAG emulator User should select the right hardware interface accordingly USB LPT Selection x LPT Parallel Port C USE Universal Serial Bus Fig 4 4
71. ut Program Wizard gt gt Init Scripts ui Flash Selection Idx Cmd width Address Value Configuration 4 Programming Fgm Options General On Chip Flash Mand Flash 2 H Flasher Help Fig 2 23 Program Wizard Init Script 4 Programming Programming 1s the fourth step of the wizard In this step user can operate on the target flash like reset target check flash write erase flash verify and check if it is blank Depends on the type of the selected flash user can see different dialogs as shown in Figs 2 24 2 25 and 2 26 El H Flasher E lal xl Mew Load Save SaveAs Optons Exit About Program Wizard gt gt Programming Flash Selection Configuration Init Scripts Pgm Options PLEASE SELECT THE TARGET FLASH DEWICE General On Chip Flash Mand Flash 2 H Flasher Help Fig 2 24 Program Wizard Programming No Chip Is Selected USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 2 10 USER MANUAL H Flasher Mew Load Save Save s Options Est About Program Wizard gt gt Programming ATI154M 564 L Flash Selection Flash Unchecked Reset 2 Configuration Target Unchecked Check 3 Init Scripts Security UnProtect Pom Options Type General yp Auto Flash Download E Program On Chip Flash Det Addr Verify Mand Flash Gre File H Flasher Help Entire Chip Entire Chip Fig 2 25 Program Wizard Programming On Chip Flash or Nor Flash Is Selected H Flasher
72. veds Options Est About Program Yvizard gt gt Flash Selection ATSISAM Vendor amp T315AM Configuration Init Scripts Programming Pom Options General On Chip Flash Mand Flash WF Y Y WE WU rn H Flasher Help USER MANUAL ATOTSAM7A3 AT915AM75128 ATSISAM S16 Type ON CHIP FLASH ATSISAM S 161 ATIISAM S 256 ATOTSAM S32 Black NAA ATIISAM S 321 ATSISAM7S512 pone ATSISAMTSBA Size 256KB ATSISAMTSE256 i ATOISAM SE32 ATSTSAMTSEB12 32 BIT ATSISAMZXT28 ATSTSAMTAZBE ATSTSAMTXET2 AT91SAM7x0128 ATEISAMZXC256 ATEISAMZXCEI2 LOATOTEAMUVE230 PartNo AT31SAM 7255 Sector 1024 H ID Ox2 7560940 Fig 2 18 Main Window of H Flasher Copyright 2009 WWW HJTAG COM All Rights Reserved 2 7 2 4 1 Menu of H Flasher The menu of H Flasher is shown in Fig 2 19 E H Flasher E lal xl Mew Load Save Save s Options Exit About Fig 2 19 Menu of H Flasher The menu is defined as follows e Load Load configuration file A Save Save current configuration SaveAs Save current configuration as another file E Options Select different options BO Exit Exit H Flasher About Information about H Flasher 2 4 2 H Flasher Tray Menu When H Flasher is minimized the main window is hidden automatically and only an icon is shown in the system tray The main window can be restored by left clicking the icon Right clicking the icon the sy
73. wnload flash driver check flash ID and operate on flash These four steps are executed in sequence If any step goes wrong the operation is interrupted immediately Y Execute Check Init Script Flash ID Is ID Stop Correct Stop Read or Download Erase Flash Driver or Program or Check Blank Download Slop Succesfully us Complete Successfully Fig 5 1 Workflow of H Flasher 5 1 1 Execute Init Script If init scripts are specified H Flasher first executes them to initialize the target If no init script is specified or no script is needed H Flasher skips this step If something goes wrong during the initialization H Flasher stops immediately and notifies user 5 1 2 Download Flash Driver After successful completion of initialization H Flasher searches appropriate flash driver according to the selected flash and specified bit width Then H Flasher downloads the flash driver into SRAM SDRAM based on the designated RAM start address If the download is successful go to next step Otherwise error out and notify USER MANUAL Copyright 2009 WWW HJTAG COM All Rights Reserved 9 1 user with message Can t download driver to specified address 5 1 3 Check Flash ID After the download of driver H Flasher checks the flash ID The purpose is to ensure that the selected flash is the right one
Download Pdf Manuals
Related Search
Related Contents
Istruzioni Quadro Automatico ATS 60KVA Angela Detanico et Rafael Lain - les églises Informations sur la mesure de volumes edital de licitação pregão eletrônico nº 002/2014 イタリアと日本の 緻密な技のコラボレーション Rele actuador telefónico Copyright © All rights reserved.
Failed to retrieve file