diff options
author | Edward Fewell | 2018-06-13 15:11:51 -0500 |
---|---|---|
committer | Edward Fewell | 2018-06-13 15:11:51 -0500 |
commit | 43c542713ba6df3360bc4b3ea927d1ae46bc32fe (patch) | |
tree | 65fda66f757c219da1284b38d9c44e3c13d48be8 | |
parent | e9e7441f7878e14faa0104248fff961ddb8ecb48 (diff) | |
download | openocd-43c542713ba6df3360bc4b3ea927d1ae46bc32fe.tar.gz openocd-43c542713ba6df3360bc4b3ea927d1ae46bc32fe.tar.xz openocd-43c542713ba6df3360bc4b3ea927d1ae46bc32fe.zip |
Update XDS110 support to version merged into OpenOCD master branch
-rw-r--r-- | openocd/contrib/60-openocd.rules | 6 | ||||
-rw-r--r-- | openocd/doc/openocd.info | 172 | ||||
-rw-r--r-- | openocd/doc/openocd.info-1 | 68 | ||||
-rw-r--r-- | openocd/doc/openocd.info-2 | 283 | ||||
-rw-r--r-- | openocd/doc/openocd.texi | 5 | ||||
-rw-r--r-- | openocd/doc/stamp-vti | 4 | ||||
-rw-r--r-- | openocd/doc/version.texi | 4 | ||||
-rw-r--r-- | openocd/src/jtag/drivers/xds110.c | 438 | ||||
-rw-r--r-- | openocd/tcl/interface/xds110.cfg | 1 |
9 files changed, 524 insertions, 457 deletions
diff --git a/openocd/contrib/60-openocd.rules b/openocd/contrib/60-openocd.rules index 3da1f73..bd3627c 100644 --- a/openocd/contrib/60-openocd.rules +++ b/openocd/contrib/60-openocd.rules | |||
@@ -122,6 +122,12 @@ ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c63", MODE="660", GROUP="plugdev", | |||
122 | # TI/Luminary Stellaris In-Circuit Debug Interface (ICDI) Board | 122 | # TI/Luminary Stellaris In-Circuit Debug Interface (ICDI) Board |
123 | ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="660", GROUP="plugdev", TAG+="uaccess" | 123 | ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="660", GROUP="plugdev", TAG+="uaccess" |
124 | 124 | ||
125 | # TI XDS110 Debug Probe (Launchpads and Standalone) | ||
126 | ATTRS{idVendor}=="0451", ATTRS{idProduct}=="bef3", MODE="660", GROUP="plugdev", TAG+="uaccess" | ||
127 | |||
128 | # TI Tiva-based ICDI and XDS110 probes in DFU mode | ||
129 | ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00ff", MODE="660", GROUP="plugdev", TAG+="uaccess" | ||
130 | |||
125 | # Marvell Sheevaplug | 131 | # Marvell Sheevaplug |
126 | ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="660", GROUP="plugdev", TAG+="uaccess" | 132 | ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="660", GROUP="plugdev", TAG+="uaccess" |
127 | 133 | ||
diff --git a/openocd/doc/openocd.info b/openocd/doc/openocd.info index ff98986..b487b85 100644 --- a/openocd/doc/openocd.info +++ b/openocd/doc/openocd.info | |||
@@ -1,8 +1,8 @@ | |||
1 | This is openocd.info, produced by makeinfo version 6.1 from | 1 | This is openocd.info, produced by makeinfo version 6.1 from |
2 | openocd.texi. | 2 | openocd.texi. |
3 | 3 | ||
4 | This User's Guide documents release 0.10.0, dated 18 December 2017, of | 4 | This User's Guide documents release 0.10.0, dated 13 June 2018, of the |
5 | the Open On-Chip Debugger (OpenOCD). | 5 | Open On-Chip Debugger (OpenOCD). |
6 | 6 | ||
7 | * Copyright (C) 2008 The OpenOCD Project | 7 | * Copyright (C) 2008 The OpenOCD Project |
8 | * Copyright (C) 2007-2008 Spencer Oliver <spen@spen-soft.co.uk> | 8 | * Copyright (C) 2007-2008 Spencer Oliver <spen@spen-soft.co.uk> |
@@ -23,92 +23,92 @@ END-INFO-DIR-ENTRY | |||
23 | 23 | ||
24 | 24 | ||
25 | Indirect: | 25 | Indirect: |
26 | openocd.info-1: 997 | 26 | openocd.info-1: 993 |
27 | openocd.info-2: 318350 | 27 | openocd.info-2: 321137 |
28 | 28 | ||
29 | Tag Table: | 29 | Tag Table: |
30 | (Indirect) | 30 | (Indirect) |
31 | Node: Top997 | 31 | Node: Top993 |
32 | Node: About3507 | 32 | Node: About3499 |
33 | Node: Developers7824 | 33 | Node: Developers7816 |
34 | Node: Debug Adapter Hardware11162 | 34 | Node: Debug Adapter Hardware11154 |
35 | Node: About Jim-Tcl22626 | 35 | Node: About Jim-Tcl22936 |
36 | Node: Running24771 | 36 | Node: Running25081 |
37 | Node: OpenOCD Project Setup29939 | 37 | Node: OpenOCD Project Setup30249 |
38 | Ref: OpenOCD Project Setup-Footnote-149892 | 38 | Ref: OpenOCD Project Setup-Footnote-150202 |
39 | Ref: OpenOCD Project Setup-Footnote-250232 | 39 | Ref: OpenOCD Project Setup-Footnote-250542 |
40 | Ref: OpenOCD Project Setup-Footnote-350500 | 40 | Ref: OpenOCD Project Setup-Footnote-350810 |
41 | Node: Config File Guidelines50828 | 41 | Node: Config File Guidelines51138 |
42 | Ref: theinitboardprocedure61702 | 42 | Ref: theinitboardprocedure62012 |
43 | Ref: definecputargetsworkinginsmp68491 | 43 | Ref: definecputargetsworkinginsmp68801 |
44 | Ref: theinittargetsprocedure72925 | 44 | Ref: theinittargetsprocedure73235 |
45 | Ref: theinittargeteventsprocedure74743 | 45 | Ref: theinittargeteventsprocedure75053 |
46 | Ref: translatingconfigurationfiles76596 | 46 | Ref: translatingconfigurationfiles76906 |
47 | Ref: Config File Guidelines-Footnote-177823 | 47 | Ref: Config File Guidelines-Footnote-178133 |
48 | Node: Server Configuration77898 | 48 | Node: Server Configuration78208 |
49 | Ref: configurationstage78220 | 49 | Ref: configurationstage78530 |
50 | Ref: enteringtherunstage79072 | 50 | Ref: enteringtherunstage79382 |
51 | Ref: tcpipports81521 | 51 | Ref: tcpipports81831 |
52 | Ref: gdbconfiguration84090 | 52 | Ref: gdbconfiguration84400 |
53 | Ref: gdbbreakpointoverride84405 | 53 | Ref: gdbbreakpointoverride84715 |
54 | Ref: gdbflashprogram84780 | 54 | Ref: gdbflashprogram85090 |
55 | Ref: eventpolling86008 | 55 | Ref: eventpolling86318 |
56 | Node: Debug Adapter Configuration88444 | 56 | Node: Debug Adapter Configuration88754 |
57 | Ref: hla_interface112710 | 57 | Ref: hla_interface113020 |
58 | Ref: jtagspeed118376 | 58 | Ref: jtagspeed118686 |
59 | Node: Reset Configuration121334 | 59 | Node: Reset Configuration121644 |
60 | Ref: srstandtrstissues124262 | 60 | Ref: srstandtrstissues124572 |
61 | Node: TAP Declaration136307 | 61 | Node: TAP Declaration136617 |
62 | Ref: enablinganddisablingtaps147485 | 62 | Ref: enablinganddisablingtaps147795 |
63 | Ref: autoprobing150132 | 63 | Ref: autoprobing150442 |
64 | Ref: TAP Declaration-Footnote-1152823 | 64 | Ref: TAP Declaration-Footnote-1153133 |
65 | Node: CPU Configuration153023 | 65 | Node: CPU Configuration153333 |
66 | Ref: targettypes155917 | 66 | Ref: targettypes156227 |
67 | Ref: targetconfiguration158450 | 67 | Ref: targetconfiguration158760 |
68 | Ref: rtostype163826 | 68 | Ref: rtostype164136 |
69 | Ref: targetcurstate167771 | 69 | Ref: targetcurstate168081 |
70 | Ref: targetevents169012 | 70 | Ref: targetevents169322 |
71 | Node: Flash Commands174003 | 71 | Node: Flash Commands174313 |
72 | Ref: norconfiguration175535 | 72 | Ref: norconfiguration175845 |
73 | Ref: flashprogrammingcommands178194 | 73 | Ref: flashprogrammingcommands178504 |
74 | Ref: flashprotect184440 | 74 | Ref: flashprotect184750 |
75 | Ref: program185266 | 75 | Ref: program185576 |
76 | Ref: flashdriverlist185524 | 76 | Ref: flashdriverlist185834 |
77 | Ref: at91samd194470 | 77 | Ref: at91samd194780 |
78 | Ref: at91sam3197005 | 78 | Ref: at91sam3197315 |
79 | Ref: nandconfiguration237499 | 79 | Ref: nandconfiguration240290 |
80 | Ref: nanddriverlist247886 | 80 | Ref: nanddriverlist250677 |
81 | Ref: Flash Commands-Footnote-1254286 | 81 | Ref: Flash Commands-Footnote-1257077 |
82 | Ref: Flash Commands-Footnote-2254452 | 82 | Ref: Flash Commands-Footnote-2257243 |
83 | Node: Flash Programming254617 | 83 | Node: Flash Programming257408 |
84 | Node: PLD/FPGA Commands256113 | 84 | Node: PLD/FPGA Commands258904 |
85 | Node: General Commands258277 | 85 | Node: General Commands261068 |
86 | Ref: debuglevel260331 | 86 | Ref: debuglevel263122 |
87 | Ref: targetstatehandling261438 | 87 | Ref: targetstatehandling264229 |
88 | Ref: resetcommand265194 | 88 | Ref: resetcommand267985 |
89 | Ref: memoryaccess267464 | 89 | Ref: memoryaccess270255 |
90 | Ref: imageaccess269091 | 90 | Ref: imageaccess271882 |
91 | Node: Architecture and Core Commands273860 | 91 | Node: Architecture and Core Commands276651 |
92 | Ref: armhardwaretracing274330 | 92 | Ref: armhardwaretracing277121 |
93 | Ref: traceportdrivers282248 | 93 | Ref: traceportdrivers285039 |
94 | Ref: arm9vectorcatch290526 | 94 | Ref: arm9vectorcatch293317 |
95 | Ref: xscalevectorcatch298929 | 95 | Ref: xscalevectorcatch301720 |
96 | Ref: softwaredebugmessagesandtracing313886 | 96 | Ref: softwaredebugmessagesandtracing316677 |
97 | Node: JTAG Commands318350 | 97 | Node: JTAG Commands321137 |
98 | Node: Boundary Scan Commands326800 | 98 | Node: Boundary Scan Commands329587 |
99 | Node: Utility Commands329262 | 99 | Node: Utility Commands332049 |
100 | Node: TFTP331096 | 100 | Node: TFTP333883 |
101 | Node: GDB and OpenOCD331965 | 101 | Node: GDB and OpenOCD334752 |
102 | Ref: programmingusinggdb336860 | 102 | Ref: programmingusinggdb339647 |
103 | Ref: usingopenocdsmpwithgdb338305 | 103 | Ref: usingopenocdsmpwithgdb341092 |
104 | Ref: gdbrtossupport339773 | 104 | Ref: gdbrtossupport342560 |
105 | Node: Tcl Scripting API341468 | 105 | Node: Tcl Scripting API344255 |
106 | Node: FAQ346270 | 106 | Node: FAQ349057 |
107 | Ref: faqrtck346380 | 107 | Ref: faqrtck349167 |
108 | Ref: faqtaporder358262 | 108 | Ref: faqtaporder361049 |
109 | Node: Tcl Crash Course360025 | 109 | Node: Tcl Crash Course362812 |
110 | Node: License372023 | 110 | Node: License374810 |
111 | Node: OpenOCD Concept Index394434 | 111 | Node: OpenOCD Concept Index397221 |
112 | Node: Command and Driver Index415244 | 112 | Node: Command and Driver Index418031 |
113 | 113 | ||
114 | End Tag Table | 114 | End Tag Table |
diff --git a/openocd/doc/openocd.info-1 b/openocd/doc/openocd.info-1 index 2d29f99..b4cc678 100644 --- a/openocd/doc/openocd.info-1 +++ b/openocd/doc/openocd.info-1 | |||
@@ -1,8 +1,8 @@ | |||
1 | This is openocd.info, produced by makeinfo version 6.1 from | 1 | This is openocd.info, produced by makeinfo version 6.1 from |
2 | openocd.texi. | 2 | openocd.texi. |
3 | 3 | ||
4 | This User's Guide documents release 0.10.0, dated 18 December 2017, of | 4 | This User's Guide documents release 0.10.0, dated 13 June 2018, of the |
5 | the Open On-Chip Debugger (OpenOCD). | 5 | Open On-Chip Debugger (OpenOCD). |
6 | 6 | ||
7 | * Copyright (C) 2008 The OpenOCD Project | 7 | * Copyright (C) 2008 The OpenOCD Project |
8 | * Copyright (C) 2007-2008 Spencer Oliver <spen@spen-soft.co.uk> | 8 | * Copyright (C) 2007-2008 Spencer Oliver <spen@spen-soft.co.uk> |
@@ -27,8 +27,8 @@ File: openocd.info, Node: Top, Next: About, Up: (dir) | |||
27 | OpenOCD User's Guide | 27 | OpenOCD User's Guide |
28 | ******************** | 28 | ******************** |
29 | 29 | ||
30 | This User's Guide documents release 0.10.0, dated 18 December 2017, of | 30 | This User's Guide documents release 0.10.0, dated 13 June 2018, of the |
31 | the Open On-Chip Debugger (OpenOCD). | 31 | Open On-Chip Debugger (OpenOCD). |
32 | 32 | ||
33 | * Copyright (C) 2008 The OpenOCD Project | 33 | * Copyright (C) 2008 The OpenOCD Project |
34 | * Copyright (C) 2007-2008 Spencer Oliver <spen@spen-soft.co.uk> | 34 | * Copyright (C) 2007-2008 Spencer Oliver <spen@spen-soft.co.uk> |
@@ -525,6 +525,13 @@ connecting debuggers to ARM Cortex based targets | |||
525 | * Keil ULINK v1 | 525 | * Keil ULINK v1 |
526 | Link: <http://www.keil.com/ulink1/> | 526 | Link: <http://www.keil.com/ulink1/> |
527 | 527 | ||
528 | * TI XDS110 Debug Probe | ||
529 | The XDS110 is included as the embedded debug probe on many Texas | ||
530 | Instruments LaunchPad evaluation boards. | ||
531 | Link: <http://processors.wiki.ti.com/index.php/XDS110> | ||
532 | Link: | ||
533 | <http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package#XDS110_Support_Utilities> | ||
534 | |||
528 | 2.11 IBM PC Parallel Printer Port Based | 535 | 2.11 IBM PC Parallel Printer Port Based |
529 | ======================================= | 536 | ======================================= |
530 | 537 | ||
@@ -4515,6 +4522,28 @@ activate driver-specific commands. | |||
4515 | The AVR 8-bit microcontrollers from Atmel integrate flash memory. | 4522 | The AVR 8-bit microcontrollers from Atmel integrate flash memory. |
4516 | _The current implementation is incomplete._ | 4523 | _The current implementation is incomplete._ |
4517 | 4524 | ||
4525 | -- Flash Driver: cc26xx | ||
4526 | All versions of the SimpleLink CC13xx and CC26xx microcontrollers | ||
4527 | from Texas Instruments include internal flash. The cc26xx flash | ||
4528 | driver supports both the CC13xx and CC26xx family of devices. The | ||
4529 | driver automatically recognizes the specific version's flash | ||
4530 | parameters and autoconfigures itself. Flash bank 0 starts at | ||
4531 | address 0. | ||
4532 | |||
4533 | flash bank $_FLASHNAME cc26xx 0 0 0 0 $_TARGETNAME | ||
4534 | |||
4535 | -- Flash Driver: cc3220sf | ||
4536 | The CC3220SF version of the SimpleLink CC32xx microcontrollers from | ||
4537 | Texas Instruments includes 1MB of internal flash. The cc3220sf | ||
4538 | flash driver only supports the internal flash. The serial flash on | ||
4539 | SimpleLink boards is programmed via the bootloader over a UART | ||
4540 | connection. Security features of the CC3220SF may erase the | ||
4541 | internal flash during power on reset. Refer to documentation at | ||
4542 | <www.ti.com/cc3220sf> for details on security features and | ||
4543 | programming the serial flash. | ||
4544 | |||
4545 | flash bank $_FLASHNAME cc3220sf 0 0 0 0 $_TARGETNAME | ||
4546 | |||
4518 | -- Flash Driver: efm32 | 4547 | -- Flash Driver: efm32 |
4519 | All members of the EFM32 microcontroller family from Energy Micro | 4548 | All members of the EFM32 microcontroller family from Energy Micro |
4520 | include internal flash and use ARM Cortex-M3 cores. The driver | 4549 | include internal flash and use ARM Cortex-M3 cores. The driver |
@@ -4821,6 +4850,37 @@ activate driver-specific commands. | |||
4821 | 0 0 $_TARGETNAME 0 32 4 | 4850 | 0 0 $_TARGETNAME 0 32 4 |
4822 | } | 4851 | } |
4823 | 4852 | ||
4853 | -- Flash Driver: msp432 | ||
4854 | All versions of the SimpleLink MSP432 microcontrollers from Texas | ||
4855 | Instruments include internal flash. The msp432 flash driver | ||
4856 | automatically recognizes the specific version's flash parameters | ||
4857 | and autoconfigures itself. Main program flash (starting at address | ||
4858 | 0) is flash bank 0. Information flash region on MSP432P4 versions | ||
4859 | (starting at address 0x200000) is flash bank 1. | ||
4860 | |||
4861 | flash bank $_FLASHNAME msp432 0 0 0 0 $_TARGETNAME | ||
4862 | |||
4863 | -- Command: msp432 mass_erase [main|all] | ||
4864 | Performs a complete erase of flash. By default, 'mass_erase' | ||
4865 | will erase only the main program flash. | ||
4866 | |||
4867 | On MSP432P4 versions, using 'mass_erase all' will erase both | ||
4868 | the main program and information flash regions. To also erase | ||
4869 | the BSL in information flash, the user must first use the | ||
4870 | 'bsl' command. | ||
4871 | |||
4872 | -- Command: msp432 bsl [unlock|lock] | ||
4873 | On MSP432P4 versions, 'bsl' unlocks and locks the bootstrap | ||
4874 | loader (BSL) region in information flash so that flash | ||
4875 | commands can erase or write the BSL. Leave the BSL locked to | ||
4876 | prevent accidentally corrupting the bootstrap loader. | ||
4877 | |||
4878 | To erase and program the BSL: | ||
4879 | msp432 bsl unlock | ||
4880 | flash erase_address 0x202000 0x2000 | ||
4881 | flash write_image bsl.bin 0x202000 | ||
4882 | msp432 bsl lock | ||
4883 | |||
4824 | -- Flash Driver: niietcm4 | 4884 | -- Flash Driver: niietcm4 |
4825 | This drivers handles the integrated NOR flash on NIIET Cortex-M4 | 4885 | This drivers handles the integrated NOR flash on NIIET Cortex-M4 |
4826 | based controllers. Flash size and sector layout are | 4886 | based controllers. Flash size and sector layout are |
diff --git a/openocd/doc/openocd.info-2 b/openocd/doc/openocd.info-2 index c28a93e..1f32ad8 100644 --- a/openocd/doc/openocd.info-2 +++ b/openocd/doc/openocd.info-2 | |||
@@ -1,8 +1,8 @@ | |||
1 | This is openocd.info, produced by makeinfo version 6.1 from | 1 | This is openocd.info, produced by makeinfo version 6.1 from |
2 | openocd.texi. | 2 | openocd.texi. |
3 | 3 | ||
4 | This User's Guide documents release 0.10.0, dated 18 December 2017, of | 4 | This User's Guide documents release 0.10.0, dated 13 June 2018, of the |
5 | the Open On-Chip Debugger (OpenOCD). | 5 | Open On-Chip Debugger (OpenOCD). |
6 | 6 | ||
7 | * Copyright (C) 2008 The OpenOCD Project | 7 | * Copyright (C) 2008 The OpenOCD Project |
8 | * Copyright (C) 2007-2008 Spencer Oliver <spen@spen-soft.co.uk> | 8 | * Copyright (C) 2007-2008 Spencer Oliver <spen@spen-soft.co.uk> |
@@ -1961,8 +1961,8 @@ OpenOCD Concept Index | |||
1961 | * JTAG Commands: JTAG Commands. (line 6) | 1961 | * JTAG Commands: JTAG Commands. (line 6) |
1962 | * JTAG Route Controller: TAP Declaration. (line 246) | 1962 | * JTAG Route Controller: TAP Declaration. (line 246) |
1963 | * jtagspi: Flash Commands. (line 287) | 1963 | * jtagspi: Flash Commands. (line 287) |
1964 | * kinetis: Flash Commands. (line 635) | 1964 | * kinetis: Flash Commands. (line 657) |
1965 | * kinetis_ke: Flash Commands. (line 710) | 1965 | * kinetis_ke: Flash Commands. (line 732) |
1966 | * libdcc: Architecture and Core Commands. | 1966 | * libdcc: Architecture and Core Commands. |
1967 | (line 930) | 1967 | (line 930) |
1968 | * Linux-ARM DCC support: Architecture and Core Commands. | 1968 | * Linux-ARM DCC support: Architecture and Core Commands. |
@@ -1971,18 +1971,18 @@ OpenOCD Concept Index | |||
1971 | * lpcspifi: Flash Commands. (line 324) | 1971 | * lpcspifi: Flash Commands. (line 324) |
1972 | * memory access: General Commands. (line 236) | 1972 | * memory access: General Commands. (line 236) |
1973 | * message level: General Commands. (line 55) | 1973 | * message level: General Commands. (line 55) |
1974 | * mFlash commands: Flash Commands. (line 1695) | 1974 | * mFlash commands: Flash Commands. (line 1748) |
1975 | * mFlash Configuration: Flash Commands. (line 1679) | 1975 | * mFlash Configuration: Flash Commands. (line 1732) |
1976 | * NAND: Flash Commands. (line 1315) | 1976 | * NAND: Flash Commands. (line 1368) |
1977 | * NAND configuration: Flash Commands. (line 1370) | 1977 | * NAND configuration: Flash Commands. (line 1423) |
1978 | * NAND erasing: Flash Commands. (line 1450) | 1978 | * NAND erasing: Flash Commands. (line 1503) |
1979 | * NAND other commands: Flash Commands. (line 1541) | 1979 | * NAND other commands: Flash Commands. (line 1594) |
1980 | * NAND programming: Flash Commands. (line 1450) | 1980 | * NAND programming: Flash Commands. (line 1503) |
1981 | * NAND programming <1>: Flash Commands. (line 1463) | 1981 | * NAND programming <1>: Flash Commands. (line 1516) |
1982 | * NAND programming <2>: Flash Commands. (line 1516) | 1982 | * NAND programming <2>: Flash Commands. (line 1569) |
1983 | * NAND reading: Flash Commands. (line 1417) | 1983 | * NAND reading: Flash Commands. (line 1470) |
1984 | * NAND verification: Flash Commands. (line 1516) | 1984 | * NAND verification: Flash Commands. (line 1569) |
1985 | * NAND writing: Flash Commands. (line 1463) | 1985 | * NAND writing: Flash Commands. (line 1516) |
1986 | * NXP SPI Flash Interface: Flash Commands. (line 324) | 1986 | * NXP SPI Flash Interface: Flash Commands. (line 324) |
1987 | * object command: CPU Configuration. (line 246) | 1987 | * object command: CPU Configuration. (line 246) |
1988 | * PLD: PLD/FPGA Commands. (line 6) | 1988 | * PLD: PLD/FPGA Commands. (line 6) |
@@ -2029,7 +2029,7 @@ OpenOCD Concept Index | |||
2029 | * STMicroelectronics Serial Memory Interface: Flash Commands. | 2029 | * STMicroelectronics Serial Memory Interface: Flash Commands. |
2030 | (line 341) | 2030 | (line 341) |
2031 | * stmsmi: Flash Commands. (line 341) | 2031 | * stmsmi: Flash Commands. (line 341) |
2032 | * str9xpec: Flash Commands. (line 1198) | 2032 | * str9xpec: Flash Commands. (line 1251) |
2033 | * SVF: Boundary Scan Commands. | 2033 | * SVF: Boundary Scan Commands. |
2034 | (line 13) | 2034 | (line 13) |
2035 | * SWD: Debug Adapter Configuration. | 2035 | * SWD: Debug Adapter Configuration. |
@@ -2211,11 +2211,11 @@ Command and Driver Index | |||
2211 | * at91sam4l smap_reset_deassert: Flash Commands. (line 538) | 2211 | * at91sam4l smap_reset_deassert: Flash Commands. (line 538) |
2212 | * at91sam7: Flash Commands. (line 548) | 2212 | * at91sam7: Flash Commands. (line 548) |
2213 | * at91sam7 gpnvm: Flash Commands. (line 581) | 2213 | * at91sam7 gpnvm: Flash Commands. (line 581) |
2214 | * at91sam9: Flash Commands. (line 1582) | 2214 | * at91sam9: Flash Commands. (line 1635) |
2215 | * at91sam9 ale: Flash Commands. (line 1596) | 2215 | * at91sam9 ale: Flash Commands. (line 1649) |
2216 | * at91sam9 ce: Flash Commands. (line 1607) | 2216 | * at91sam9 ce: Flash Commands. (line 1660) |
2217 | * at91sam9 cle: Flash Commands. (line 1593) | 2217 | * at91sam9 cle: Flash Commands. (line 1646) |
2218 | * at91sam9 rdy_busy: Flash Commands. (line 1602) | 2218 | * at91sam9 rdy_busy: Flash Commands. (line 1655) |
2219 | * at91samd: Flash Commands. (line 419) | 2219 | * at91samd: Flash Commands. (line 419) |
2220 | * at91samd bootloader: Flash Commands. (line 455) | 2220 | * at91samd bootloader: Flash Commands. (line 455) |
2221 | * at91samd chip-erase: Flash Commands. (line 425) | 2221 | * at91samd chip-erase: Flash Commands. (line 425) |
@@ -2231,6 +2231,8 @@ Command and Driver Index | |||
2231 | * cache_config l2x: Architecture and Core Commands. | 2231 | * cache_config l2x: Architecture and Core Commands. |
2232 | (line 696) | 2232 | (line 696) |
2233 | * cat: General Commands. (line 202) | 2233 | * cat: General Commands. (line 202) |
2234 | * cc26xx: Flash Commands. (line 593) | ||
2235 | * cc3220sf: Flash Commands. (line 603) | ||
2234 | * cfi: Flash Commands. (line 251) | 2236 | * cfi: Flash Commands. (line 251) |
2235 | * cmsis-dap: Debug Adapter Configuration. | 2237 | * cmsis-dap: Debug Adapter Configuration. |
2236 | (line 87) | 2238 | (line 87) |
@@ -2281,7 +2283,7 @@ Command and Driver Index | |||
2281 | (line 655) | 2283 | (line 655) |
2282 | * dap ti_be_32_quirks: Architecture and Core Commands. | 2284 | * dap ti_be_32_quirks: Architecture and Core Commands. |
2283 | (line 664) | 2285 | (line 664) |
2284 | * davinci: Flash Commands. (line 1613) | 2286 | * davinci: Flash Commands. (line 1666) |
2285 | * debug_level: General Commands. (line 54) | 2287 | * debug_level: General Commands. (line 54) |
2286 | * drscan: JTAG Commands. (line 42) | 2288 | * drscan: JTAG Commands. (line 42) |
2287 | * dummy: Debug Adapter Configuration. | 2289 | * dummy: Debug Adapter Configuration. |
@@ -2292,7 +2294,7 @@ Command and Driver Index | |||
2292 | * du_select: Architecture and Core Commands. | 2294 | * du_select: Architecture and Core Commands. |
2293 | (line 894) | 2295 | (line 894) |
2294 | * echo: General Commands. (line 63) | 2296 | * echo: General Commands. (line 63) |
2295 | * efm32: Flash Commands. (line 593) | 2297 | * efm32: Flash Commands. (line 615) |
2296 | * ep93xx: Debug Adapter Configuration. | 2298 | * ep93xx: Debug Adapter Configuration. |
2297 | (line 108) | 2299 | (line 108) |
2298 | * etb: Architecture and Core Commands. | 2300 | * etb: Architecture and Core Commands. |
@@ -2346,8 +2348,8 @@ Command and Driver Index | |||
2346 | * flash write_bank: Flash Commands. (line 143) | 2348 | * flash write_bank: Flash Commands. (line 143) |
2347 | * flash write_image: Flash Commands. (line 158) | 2349 | * flash write_image: Flash Commands. (line 158) |
2348 | * flush_count: JTAG Commands. (line 70) | 2350 | * flush_count: JTAG Commands. (line 70) |
2349 | * fm3: Flash Commands. (line 609) | 2351 | * fm3: Flash Commands. (line 631) |
2350 | * fm4: Flash Commands. (line 618) | 2352 | * fm4: Flash Commands. (line 640) |
2351 | * ftdi: Debug Adapter Configuration. | 2353 | * ftdi: Debug Adapter Configuration. |
2352 | (line 112) | 2354 | (line 112) |
2353 | * ftdi_channel: Debug Adapter Configuration. | 2355 | * ftdi_channel: Debug Adapter Configuration. |
@@ -2467,82 +2469,85 @@ Command and Driver Index | |||
2467 | * jtag_rclk: Debug Adapter Configuration. | 2469 | * jtag_rclk: Debug Adapter Configuration. |
2468 | (line 715) | 2470 | (line 715) |
2469 | * jtag_reset: JTAG Commands. (line 98) | 2471 | * jtag_reset: JTAG Commands. (line 98) |
2470 | * kinetis: Flash Commands. (line 634) | 2472 | * kinetis: Flash Commands. (line 656) |
2471 | * kinetis disable_wdog: Flash Commands. (line 705) | 2473 | * kinetis disable_wdog: Flash Commands. (line 727) |
2472 | * kinetis fcf_source: Flash Commands. (line 643) | 2474 | * kinetis fcf_source: Flash Commands. (line 665) |
2473 | * kinetis fopt: Flash Commands. (line 655) | 2475 | * kinetis fopt: Flash Commands. (line 677) |
2474 | * kinetis mdm check_security: Flash Commands. (line 659) | 2476 | * kinetis mdm check_security: Flash Commands. (line 681) |
2475 | * kinetis mdm halt: Flash Commands. (line 663) | 2477 | * kinetis mdm halt: Flash Commands. (line 685) |
2476 | * kinetis mdm mass_erase: Flash Commands. (line 668) | 2478 | * kinetis mdm mass_erase: Flash Commands. (line 690) |
2477 | * kinetis mdm reset: Flash Commands. (line 700) | 2479 | * kinetis mdm reset: Flash Commands. (line 722) |
2478 | * kinetis nvm_partition: Flash Commands. (line 675) | 2480 | * kinetis nvm_partition: Flash Commands. (line 697) |
2479 | * kinetis_ke: Flash Commands. (line 709) | 2481 | * kinetis_ke: Flash Commands. (line 731) |
2480 | * kinetis_ke disable_wdog: Flash Commands. (line 727) | 2482 | * kinetis_ke disable_wdog: Flash Commands. (line 749) |
2481 | * kinetis_ke mdm check_security: Flash Commands. (line 717) | 2483 | * kinetis_ke mdm check_security: Flash Commands. (line 739) |
2482 | * kinetis_ke mdm mass_erase: Flash Commands. (line 721) | 2484 | * kinetis_ke mdm mass_erase: Flash Commands. (line 743) |
2483 | * load_image: General Commands. (line 288) | 2485 | * load_image: General Commands. (line 288) |
2484 | * log_output: General Commands. (line 68) | 2486 | * log_output: General Commands. (line 68) |
2485 | * lpc2000: Flash Commands. (line 730) | 2487 | * lpc2000: Flash Commands. (line 752) |
2486 | * lpc2000 part_id: Flash Commands. (line 768) | 2488 | * lpc2000 part_id: Flash Commands. (line 790) |
2487 | * lpc288x: Flash Commands. (line 772) | 2489 | * lpc288x: Flash Commands. (line 794) |
2488 | * lpc2900: Flash Commands. (line 780) | 2490 | * lpc2900: Flash Commands. (line 802) |
2489 | * lpc2900 password: Flash Commands. (line 836) | 2491 | * lpc2900 password: Flash Commands. (line 858) |
2490 | * lpc2900 read_custom: Flash Commands. (line 825) | 2492 | * lpc2900 read_custom: Flash Commands. (line 847) |
2491 | * lpc2900 secure_jtag: Flash Commands. (line 871) | 2493 | * lpc2900 secure_jtag: Flash Commands. (line 893) |
2492 | * lpc2900 secure_sector: Flash Commands. (line 857) | 2494 | * lpc2900 secure_sector: Flash Commands. (line 879) |
2493 | * lpc2900 signature: Flash Commands. (line 816) | 2495 | * lpc2900 signature: Flash Commands. (line 838) |
2494 | * lpc2900 write_custom: Flash Commands. (line 846) | 2496 | * lpc2900 write_custom: Flash Commands. (line 868) |
2495 | * lpc3180: Flash Commands. (line 1626) | 2497 | * lpc3180: Flash Commands. (line 1679) |
2496 | * lpc3180 select: Flash Commands. (line 1629) | 2498 | * lpc3180 select: Flash Commands. (line 1682) |
2497 | * lpcspifi: Flash Commands. (line 323) | 2499 | * lpcspifi: Flash Commands. (line 323) |
2498 | * ls: General Commands. (line 211) | 2500 | * ls: General Commands. (line 211) |
2499 | * mac: General Commands. (line 214) | 2501 | * mac: General Commands. (line 214) |
2500 | * mdb: General Commands. (line 248) | 2502 | * mdb: General Commands. (line 248) |
2501 | * mdh: General Commands. (line 247) | 2503 | * mdh: General Commands. (line 247) |
2502 | * mdr: Flash Commands. (line 878) | 2504 | * mdr: Flash Commands. (line 900) |
2503 | * mdw: General Commands. (line 246) | 2505 | * mdw: General Commands. (line 246) |
2504 | * meminfo: General Commands. (line 217) | 2506 | * meminfo: General Commands. (line 217) |
2505 | * memTestAddressBus: Utility Commands. (line 29) | 2507 | * memTestAddressBus: Utility Commands. (line 29) |
2506 | * memTestDataBus: Utility Commands. (line 25) | 2508 | * memTestDataBus: Utility Commands. (line 25) |
2507 | * memTestDevice: Utility Commands. (line 34) | 2509 | * memTestDevice: Utility Commands. (line 34) |
2508 | * mflash bank: Flash Commands. (line 1679) | 2510 | * mflash bank: Flash Commands. (line 1732) |
2509 | * mflash config boot: Flash Commands. (line 1702) | 2511 | * mflash config boot: Flash Commands. (line 1755) |
2510 | * mflash config pll: Flash Commands. (line 1695) | 2512 | * mflash config pll: Flash Commands. (line 1748) |
2511 | * mflash config storage: Flash Commands. (line 1706) | 2513 | * mflash config storage: Flash Commands. (line 1759) |
2512 | * mflash dump: Flash Commands. (line 1710) | 2514 | * mflash dump: Flash Commands. (line 1763) |
2513 | * mflash probe: Flash Commands. (line 1714) | 2515 | * mflash probe: Flash Commands. (line 1767) |
2514 | * mflash write: Flash Commands. (line 1717) | 2516 | * mflash write: Flash Commands. (line 1770) |
2515 | * mrvlqspi: Flash Commands. (line 360) | 2517 | * mrvlqspi: Flash Commands. (line 360) |
2518 | * msp432: Flash Commands. (line 921) | ||
2519 | * msp432 bsl: Flash Commands. (line 940) | ||
2520 | * msp432 mass_erase: Flash Commands. (line 931) | ||
2516 | * mwb: General Commands. (line 259) | 2521 | * mwb: General Commands. (line 259) |
2517 | * mwh: General Commands. (line 258) | 2522 | * mwh: General Commands. (line 258) |
2518 | * mww: General Commands. (line 257) | 2523 | * mww: General Commands. (line 257) |
2519 | * mx3: Flash Commands. (line 1639) | 2524 | * mx3: Flash Commands. (line 1692) |
2520 | * mxc: Flash Commands. (line 1643) | 2525 | * mxc: Flash Commands. (line 1696) |
2521 | * mxc biswap: Flash Commands. (line 1651) | 2526 | * mxc biswap: Flash Commands. (line 1704) |
2522 | * nand check_bad_blocks: Flash Commands. (line 1541) | 2527 | * nand check_bad_blocks: Flash Commands. (line 1594) |
2523 | * nand device: Flash Commands. (line 1373) | 2528 | * nand device: Flash Commands. (line 1426) |
2524 | * nand dump: Flash Commands. (line 1416) | 2529 | * nand dump: Flash Commands. (line 1469) |
2525 | * nand erase: Flash Commands. (line 1449) | 2530 | * nand erase: Flash Commands. (line 1502) |
2526 | * nand info: Flash Commands. (line 1553) | 2531 | * nand info: Flash Commands. (line 1606) |
2527 | * nand list: Flash Commands. (line 1396) | 2532 | * nand list: Flash Commands. (line 1449) |
2528 | * nand probe: Flash Commands. (line 1406) | 2533 | * nand probe: Flash Commands. (line 1459) |
2529 | * nand raw_access: Flash Commands. (line 1558) | 2534 | * nand raw_access: Flash Commands. (line 1611) |
2530 | * nand verify: Flash Commands. (line 1515) | 2535 | * nand verify: Flash Commands. (line 1568) |
2531 | * nand write: Flash Commands. (line 1462) | 2536 | * nand write: Flash Commands. (line 1515) |
2532 | * niietcm4: Flash Commands. (line 899) | 2537 | * niietcm4: Flash Commands. (line 952) |
2533 | * niietcm4 bflash_info_remap: Flash Commands. (line 939) | 2538 | * niietcm4 bflash_info_remap: Flash Commands. (line 992) |
2534 | * niietcm4 driver_info: Flash Commands. (line 952) | 2539 | * niietcm4 driver_info: Flash Commands. (line 1005) |
2535 | * niietcm4 extmem_cfg: Flash Commands. (line 943) | 2540 | * niietcm4 extmem_cfg: Flash Commands. (line 996) |
2536 | * niietcm4 service_mode_erase: Flash Commands. (line 948) | 2541 | * niietcm4 service_mode_erase: Flash Commands. (line 1001) |
2537 | * niietcm4 uflash_erase: Flash Commands. (line 926) | 2542 | * niietcm4 uflash_erase: Flash Commands. (line 979) |
2538 | * niietcm4 uflash_full_erase: Flash Commands. (line 923) | 2543 | * niietcm4 uflash_full_erase: Flash Commands. (line 976) |
2539 | * niietcm4 uflash_protect: Flash Commands. (line 934) | 2544 | * niietcm4 uflash_protect: Flash Commands. (line 987) |
2540 | * niietcm4 uflash_protect_check: Flash Commands. (line 931) | 2545 | * niietcm4 uflash_protect_check: Flash Commands. (line 984) |
2541 | * niietcm4 uflash_read_byte: Flash Commands. (line 916) | 2546 | * niietcm4 uflash_read_byte: Flash Commands. (line 969) |
2542 | * niietcm4 uflash_write_byte: Flash Commands. (line 919) | 2547 | * niietcm4 uflash_write_byte: Flash Commands. (line 972) |
2543 | * nrf51: Flash Commands. (line 955) | 2548 | * nrf51: Flash Commands. (line 1008) |
2544 | * nrf51 mass_erase: Flash Commands. (line 963) | 2549 | * nrf51 mass_erase: Flash Commands. (line 1016) |
2545 | * ocl: Flash Commands. (line 969) | 2550 | * ocl: Flash Commands. (line 1022) |
2546 | * oocd_trace: Architecture and Core Commands. | 2551 | * oocd_trace: Architecture and Core Commands. |
2547 | (line 222) | 2552 | (line 222) |
2548 | * oocd_trace config: Architecture and Core Commands. | 2553 | * oocd_trace config: Architecture and Core Commands. |
@@ -2559,7 +2564,7 @@ Command and Driver Index | |||
2559 | (line 593) | 2564 | (line 593) |
2560 | * openjtag_variant: Debug Adapter Configuration. | 2565 | * openjtag_variant: Debug Adapter Configuration. |
2561 | (line 583) | 2566 | (line 583) |
2562 | * orion: Flash Commands. (line 1655) | 2567 | * orion: Flash Commands. (line 1708) |
2563 | * parport: Debug Adapter Configuration. | 2568 | * parport: Debug Adapter Configuration. |
2564 | (line 415) | 2569 | (line 415) |
2565 | * parport_cable: Debug Adapter Configuration. | 2570 | * parport_cable: Debug Adapter Configuration. |
@@ -2576,9 +2581,9 @@ Command and Driver Index | |||
2576 | (line 494) | 2581 | (line 494) |
2577 | * pathmove: JTAG Commands. (line 115) | 2582 | * pathmove: JTAG Commands. (line 115) |
2578 | * peek: General Commands. (line 221) | 2583 | * peek: General Commands. (line 221) |
2579 | * pic32mx: Flash Commands. (line 980) | 2584 | * pic32mx: Flash Commands. (line 1033) |
2580 | * pic32mx pgm_word: Flash Commands. (line 988) | 2585 | * pic32mx pgm_word: Flash Commands. (line 1041) |
2581 | * pic32mx unlock: Flash Commands. (line 991) | 2586 | * pic32mx unlock: Flash Commands. (line 1044) |
2582 | * pld device: PLD/FPGA Commands. (line 23) | 2587 | * pld device: PLD/FPGA Commands. (line 23) |
2583 | * pld devices: PLD/FPGA Commands. (line 28) | 2588 | * pld devices: PLD/FPGA Commands. (line 28) |
2584 | * pld load: PLD/FPGA Commands. (line 31) | 2589 | * pld load: PLD/FPGA Commands. (line 31) |
@@ -2593,9 +2598,9 @@ Command and Driver Index | |||
2593 | (line 508) | 2598 | (line 508) |
2594 | * profile: General Commands. (line 355) | 2599 | * profile: General Commands. (line 355) |
2595 | * program: Flash Commands. (line 217) | 2600 | * program: Flash Commands. (line 217) |
2596 | * psoc4: Flash Commands. (line 995) | 2601 | * psoc4: Flash Commands. (line 1048) |
2597 | * psoc4 flash_autoerase: Flash Commands. (line 1007) | 2602 | * psoc4 flash_autoerase: Flash Commands. (line 1060) |
2598 | * psoc4 mass_erase: Flash Commands. (line 1020) | 2603 | * psoc4 mass_erase: Flash Commands. (line 1073) |
2599 | * rbp: General Commands. (line 337) | 2604 | * rbp: General Commands. (line 337) |
2600 | * readgroup: Architecture and Core Commands. | 2605 | * readgroup: Architecture and Core Commands. |
2601 | (line 920) | 2606 | (line 920) |
@@ -2621,50 +2626,50 @@ Command and Driver Index | |||
2621 | * runAllMemTests: Utility Commands. (line 39) | 2626 | * runAllMemTests: Utility Commands. (line 39) |
2622 | * runtest: JTAG Commands. (line 123) | 2627 | * runtest: JTAG Commands. (line 123) |
2623 | * rwp: General Commands. (line 340) | 2628 | * rwp: General Commands. (line 340) |
2624 | * s3c2410: Flash Commands. (line 1663) | 2629 | * s3c2410: Flash Commands. (line 1716) |
2625 | * s3c2412: Flash Commands. (line 1664) | 2630 | * s3c2412: Flash Commands. (line 1717) |
2626 | * s3c2440: Flash Commands. (line 1665) | 2631 | * s3c2440: Flash Commands. (line 1718) |
2627 | * s3c2443: Flash Commands. (line 1666) | 2632 | * s3c2443: Flash Commands. (line 1719) |
2628 | * s3c6400: Flash Commands. (line 1667) | 2633 | * s3c6400: Flash Commands. (line 1720) |
2629 | * scan_chain: TAP Declaration. (line 89) | 2634 | * scan_chain: TAP Declaration. (line 89) |
2630 | * shutdown: General Commands. (line 49) | 2635 | * shutdown: General Commands. (line 49) |
2631 | * sim3x: Flash Commands. (line 1026) | 2636 | * sim3x: Flash Commands. (line 1079) |
2632 | * sim3x lock: Flash Commands. (line 1042) | 2637 | * sim3x lock: Flash Commands. (line 1095) |
2633 | * sim3x mass_erase: Flash Commands. (line 1037) | 2638 | * sim3x mass_erase: Flash Commands. (line 1090) |
2634 | * sleep: General Commands. (line 43) | 2639 | * sleep: General Commands. (line 43) |
2635 | * soft_reset_halt: General Commands. (line 180) | 2640 | * soft_reset_halt: General Commands. (line 180) |
2636 | * stellaris: Flash Commands. (line 1045) | 2641 | * stellaris: Flash Commands. (line 1098) |
2637 | * stellaris recover: Flash Commands. (line 1054) | 2642 | * stellaris recover: Flash Commands. (line 1107) |
2638 | * step: General Commands. (line 158) | 2643 | * step: General Commands. (line 158) |
2639 | * stm32f1x: Flash Commands. (line 1067) | 2644 | * stm32f1x: Flash Commands. (line 1120) |
2640 | * stm32f1x lock: Flash Commands. (line 1088) | 2645 | * stm32f1x lock: Flash Commands. (line 1141) |
2641 | * stm32f1x options_read: Flash Commands. (line 1096) | 2646 | * stm32f1x options_read: Flash Commands. (line 1149) |
2642 | * stm32f1x options_write: Flash Commands. (line 1101) | 2647 | * stm32f1x options_write: Flash Commands. (line 1154) |
2643 | * stm32f1x unlock: Flash Commands. (line 1092) | 2648 | * stm32f1x unlock: Flash Commands. (line 1145) |
2644 | * stm32f2x: Flash Commands. (line 1106) | 2649 | * stm32f2x: Flash Commands. (line 1159) |
2645 | * stm32f2x lock: Flash Commands. (line 1121) | 2650 | * stm32f2x lock: Flash Commands. (line 1174) |
2646 | * stm32f2x options_read: Flash Commands. (line 1129) | 2651 | * stm32f2x options_read: Flash Commands. (line 1182) |
2647 | * stm32f2x options_write: Flash Commands. (line 1134) | 2652 | * stm32f2x options_write: Flash Commands. (line 1187) |
2648 | * stm32f2x unlock: Flash Commands. (line 1125) | 2653 | * stm32f2x unlock: Flash Commands. (line 1178) |
2649 | * stm32lx: Flash Commands. (line 1143) | 2654 | * stm32lx: Flash Commands. (line 1196) |
2650 | * stm32lx mass_erase: Flash Commands. (line 1160) | 2655 | * stm32lx mass_erase: Flash Commands. (line 1213) |
2651 | * stmsmi: Flash Commands. (line 340) | 2656 | * stmsmi: Flash Commands. (line 340) |
2652 | * str7x: Flash Commands. (line 1166) | 2657 | * str7x: Flash Commands. (line 1219) |
2653 | * str7x disable_jtag: Flash Commands. (line 1175) | 2658 | * str7x disable_jtag: Flash Commands. (line 1228) |
2654 | * str9x: Flash Commands. (line 1179) | 2659 | * str9x: Flash Commands. (line 1232) |
2655 | * str9x flash_config: Flash Commands. (line 1188) | 2660 | * str9x flash_config: Flash Commands. (line 1241) |
2656 | * str9xpec: Flash Commands. (line 1197) | 2661 | * str9xpec: Flash Commands. (line 1250) |
2657 | * str9xpec disable_turbo: Flash Commands. (line 1240) | 2662 | * str9xpec disable_turbo: Flash Commands. (line 1293) |
2658 | * str9xpec enable_turbo: Flash Commands. (line 1243) | 2663 | * str9xpec enable_turbo: Flash Commands. (line 1296) |
2659 | * str9xpec lock: Flash Commands. (line 1247) | 2664 | * str9xpec lock: Flash Commands. (line 1300) |
2660 | * str9xpec options_cmap: Flash Commands. (line 1254) | 2665 | * str9xpec options_cmap: Flash Commands. (line 1307) |
2661 | * str9xpec options_lvdsel: Flash Commands. (line 1257) | 2666 | * str9xpec options_lvdsel: Flash Commands. (line 1310) |
2662 | * str9xpec options_lvdthd: Flash Commands. (line 1260) | 2667 | * str9xpec options_lvdthd: Flash Commands. (line 1313) |
2663 | * str9xpec options_lvdwarn: Flash Commands. (line 1263) | 2668 | * str9xpec options_lvdwarn: Flash Commands. (line 1316) |
2664 | * str9xpec options_read: Flash Commands. (line 1266) | 2669 | * str9xpec options_read: Flash Commands. (line 1319) |
2665 | * str9xpec options_write: Flash Commands. (line 1269) | 2670 | * str9xpec options_write: Flash Commands. (line 1322) |
2666 | * str9xpec part_id: Flash Commands. (line 1251) | 2671 | * str9xpec part_id: Flash Commands. (line 1304) |
2667 | * str9xpec unlock: Flash Commands. (line 1272) | 2672 | * str9xpec unlock: Flash Commands. (line 1325) |
2668 | * svf: Boundary Scan Commands. | 2673 | * svf: Boundary Scan Commands. |
2669 | (line 17) | 2674 | (line 17) |
2670 | * swd newdap: Debug Adapter Configuration. | 2675 | * swd newdap: Debug Adapter Configuration. |
@@ -2687,10 +2692,10 @@ Command and Driver Index | |||
2687 | * telnet_port: Server Configuration. | 2692 | * telnet_port: Server Configuration. |
2688 | (line 127) | 2693 | (line 127) |
2689 | * test_image: General Commands. (line 303) | 2694 | * test_image: General Commands. (line 303) |
2690 | * tms470: Flash Commands. (line 1275) | 2695 | * tms470: Flash Commands. (line 1328) |
2691 | * tms470 flash_keyset: Flash Commands. (line 1282) | 2696 | * tms470 flash_keyset: Flash Commands. (line 1335) |
2692 | * tms470 osc_mhz: Flash Commands. (line 1286) | 2697 | * tms470 osc_mhz: Flash Commands. (line 1339) |
2693 | * tms470 plldis: Flash Commands. (line 1289) | 2698 | * tms470 plldis: Flash Commands. (line 1342) |
2694 | * tpiu config: Architecture and Core Commands. | 2699 | * tpiu config: Architecture and Core Commands. |
2695 | (line 712) | 2700 | (line 712) |
2696 | * trace history: Architecture and Core Commands. | 2701 | * trace history: Architecture and Core Commands. |
@@ -2743,10 +2748,10 @@ Command and Driver Index | |||
2743 | (line 874) | 2748 | (line 874) |
2744 | * x86_32 iww: Architecture and Core Commands. | 2749 | * x86_32 iww: Architecture and Core Commands. |
2745 | (line 870) | 2750 | (line 870) |
2746 | * xmc1xxx: Flash Commands. (line 1293) | 2751 | * xmc1xxx: Flash Commands. (line 1346) |
2747 | * xmc4xxx: Flash Commands. (line 1298) | 2752 | * xmc4xxx: Flash Commands. (line 1351) |
2748 | * xmc4xxx flash_password: Flash Commands. (line 1305) | 2753 | * xmc4xxx flash_password: Flash Commands. (line 1358) |
2749 | * xmc4xxx flash_unprotect: Flash Commands. (line 1309) | 2754 | * xmc4xxx flash_unprotect: Flash Commands. (line 1362) |
2750 | * xscale analyze_trace: Architecture and Core Commands. | 2755 | * xscale analyze_trace: Architecture and Core Commands. |
2751 | (line 523) | 2756 | (line 523) |
2752 | * xscale cache_clean_address: Architecture and Core Commands. | 2757 | * xscale cache_clean_address: Architecture and Core Commands. |
diff --git a/openocd/doc/openocd.texi b/openocd/doc/openocd.texi index 65ff00c..6472951 100644 --- a/openocd/doc/openocd.texi +++ b/openocd/doc/openocd.texi | |||
@@ -534,8 +534,9 @@ debuggers to ARM Cortex based targets @url{http://www.keil.com/support/man/docs/ | |||
534 | 534 | ||
535 | @item @b{TI XDS110 Debug Probe} | 535 | @item @b{TI XDS110 Debug Probe} |
536 | @* The XDS110 is included as the embedded debug probe on many Texas Instruments | 536 | @* The XDS110 is included as the embedded debug probe on many Texas Instruments |
537 | LaunchPad evaluation boards. | 537 | LaunchPad evaluation boards. |
538 | Link: @url{http://processors.wiki.ti.com/index.php/XDS110} | 538 | @* Link: @url{http://processors.wiki.ti.com/index.php/XDS110} |
539 | @* Link: @url{http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package#XDS110_Support_Utilities} | ||
539 | @end itemize | 540 | @end itemize |
540 | 541 | ||
541 | @section IBM PC Parallel Printer Port Based | 542 | @section IBM PC Parallel Printer Port Based |
diff --git a/openocd/doc/stamp-vti b/openocd/doc/stamp-vti index 8899cb3..86b9ccb 100644 --- a/openocd/doc/stamp-vti +++ b/openocd/doc/stamp-vti | |||
@@ -1,4 +1,4 @@ | |||
1 | @set UPDATED 19 December 2017 | 1 | @set UPDATED 13 June 2018 |
2 | @set UPDATED-MONTH December 2017 | 2 | @set UPDATED-MONTH June 2018 |
3 | @set EDITION 0.10.0 | 3 | @set EDITION 0.10.0 |
4 | @set VERSION 0.10.0 | 4 | @set VERSION 0.10.0 |
diff --git a/openocd/doc/version.texi b/openocd/doc/version.texi index 8899cb3..86b9ccb 100644 --- a/openocd/doc/version.texi +++ b/openocd/doc/version.texi | |||
@@ -1,4 +1,4 @@ | |||
1 | @set UPDATED 19 December 2017 | 1 | @set UPDATED 13 June 2018 |
2 | @set UPDATED-MONTH December 2017 | 2 | @set UPDATED-MONTH June 2018 |
3 | @set EDITION 0.10.0 | 3 | @set EDITION 0.10.0 |
4 | @set VERSION 0.10.0 | 4 | @set VERSION 0.10.0 |
diff --git a/openocd/src/jtag/drivers/xds110.c b/openocd/src/jtag/drivers/xds110.c index 5e1a7bf..b97eef2 100644 --- a/openocd/src/jtag/drivers/xds110.c +++ b/openocd/src/jtag/drivers/xds110.c | |||
@@ -26,10 +26,6 @@ | |||
26 | #include <jtag/tcl.h> | 26 | #include <jtag/tcl.h> |
27 | #include <libusb.h> | 27 | #include <libusb.h> |
28 | 28 | ||
29 | #if defined(__APPLE_CC__) | ||
30 | #pragma GCC diagnostic ignored "-Wcast-align" | ||
31 | #endif | ||
32 | |||
33 | /* XDS110 USB serial number length */ | 29 | /* XDS110 USB serial number length */ |
34 | #define XDS110_SERIAL_LEN 8 | 30 | #define XDS110_SERIAL_LEN 8 |
35 | 31 | ||
@@ -77,7 +73,7 @@ | |||
77 | #define DEFAULT_ATTEMPTS (1) | 73 | #define DEFAULT_ATTEMPTS (1) |
78 | #define DEFAULT_TIMEOUT (4000) | 74 | #define DEFAULT_TIMEOUT (4000) |
79 | 75 | ||
80 | /* Error codes */ | 76 | /* XDS110 API error codes */ |
81 | #define SC_ERR_NONE 0 | 77 | #define SC_ERR_NONE 0 |
82 | #define SC_ERR_XDS110_FAIL -261 | 78 | #define SC_ERR_XDS110_FAIL -261 |
83 | #define SC_ERR_SWD_WAIT -613 | 79 | #define SC_ERR_SWD_WAIT -613 |
@@ -146,7 +142,7 @@ | |||
146 | #define XDS_OUT_LEN 1 /* command (byte) */ | 142 | #define XDS_OUT_LEN 1 /* command (byte) */ |
147 | #define XDS_IN_LEN 4 /* error code (int) */ | 143 | #define XDS_IN_LEN 4 /* error code (int) */ |
148 | 144 | ||
149 | /* XDS Commands */ | 145 | /* XDS API Commands */ |
150 | #define XDS_CONNECT 0x01 /* Connect JTAG connection */ | 146 | #define XDS_CONNECT 0x01 /* Connect JTAG connection */ |
151 | #define XDS_DISCONNECT 0x02 /* Disconnect JTAG connection */ | 147 | #define XDS_DISCONNECT 0x02 /* Disconnect JTAG connection */ |
152 | #define XDS_VERSION 0x03 /* Get firmware version and hardware ID */ | 148 | #define XDS_VERSION 0x03 /* Get firmware version and hardware ID */ |
@@ -175,7 +171,7 @@ | |||
175 | #define CMD_RUNTEST 3 | 171 | #define CMD_RUNTEST 3 |
176 | #define CMD_STABLECLOCKS 4 | 172 | #define CMD_STABLECLOCKS 4 |
177 | 173 | ||
178 | /* Array to convert from tap_state_t to XDS JTAG state */ | 174 | /* Array to convert from OpenOCD tap_state_t to XDS JTAG state */ |
179 | const uint32_t xds_jtag_state[] = { | 175 | const uint32_t xds_jtag_state[] = { |
180 | XDS_JTAG_STATE_EXIT2_DR, /* TAP_DREXIT2 = 0x0 */ | 176 | XDS_JTAG_STATE_EXIT2_DR, /* TAP_DREXIT2 = 0x0 */ |
181 | XDS_JTAG_STATE_EXIT1_DR, /* TAP_DREXIT1 = 0x1 */ | 177 | XDS_JTAG_STATE_EXIT1_DR, /* TAP_DREXIT1 = 0x1 */ |
@@ -236,8 +232,8 @@ struct xds110_info { | |||
236 | }; | 232 | }; |
237 | 233 | ||
238 | static struct xds110_info xds110 = { | 234 | static struct xds110_info xds110 = { |
239 | .ctx = 0, | 235 | .ctx = NULL, |
240 | .dev = 0, | 236 | .dev = NULL, |
241 | .is_connected = false, | 237 | .is_connected = false, |
242 | .is_cmapi_connected = false, | 238 | .is_cmapi_connected = false, |
243 | .is_cmapi_acquired = false, | 239 | .is_cmapi_acquired = false, |
@@ -253,6 +249,36 @@ static struct xds110_info xds110 = { | |||
253 | .txn_result_count = 0 | 249 | .txn_result_count = 0 |
254 | }; | 250 | }; |
255 | 251 | ||
252 | static inline void xds110_set_u32(uint8_t *buffer, uint32_t value) | ||
253 | { | ||
254 | buffer[3] = (value >> 24) & 0xff; | ||
255 | buffer[2] = (value >> 16) & 0xff; | ||
256 | buffer[1] = (value >> 8) & 0xff; | ||
257 | buffer[0] = (value >> 0) & 0xff; | ||
258 | } | ||
259 | |||
260 | static inline void xds110_set_u16(uint8_t *buffer, uint16_t value) | ||
261 | { | ||
262 | buffer[1] = (value >> 8) & 0xff; | ||
263 | buffer[0] = (value >> 0) & 0xff; | ||
264 | } | ||
265 | |||
266 | static inline uint32_t xds110_get_u32(uint8_t *buffer) | ||
267 | { | ||
268 | uint32_t value = (((uint32_t)buffer[3]) << 24) | | ||
269 | (((uint32_t)buffer[2]) << 16) | | ||
270 | (((uint32_t)buffer[1]) << 8) | | ||
271 | (((uint32_t)buffer[0]) << 0); | ||
272 | return value; | ||
273 | } | ||
274 | |||
275 | static inline uint16_t xds110_get_u16(uint8_t *buffer) | ||
276 | { | ||
277 | uint16_t value = (((uint32_t)buffer[1]) << 8) | | ||
278 | (((uint32_t)buffer[0]) << 0); | ||
279 | return value; | ||
280 | } | ||
281 | |||
256 | /*************************************************************************** | 282 | /*************************************************************************** |
257 | * usb connection routines * | 283 | * usb connection routines * |
258 | * * | 284 | * * |
@@ -262,9 +288,9 @@ static struct xds110_info xds110 = { | |||
262 | 288 | ||
263 | static bool usb_connect(void) | 289 | static bool usb_connect(void) |
264 | { | 290 | { |
265 | libusb_context *ctx = 0; | 291 | libusb_context *ctx = NULL; |
266 | libusb_device **list = 0; | 292 | libusb_device **list = NULL; |
267 | libusb_device_handle *dev = 0; | 293 | libusb_device_handle *dev = NULL; |
268 | 294 | ||
269 | struct libusb_device_descriptor desc; | 295 | struct libusb_device_descriptor desc; |
270 | 296 | ||
@@ -283,7 +309,7 @@ static bool usb_connect(void) | |||
283 | count = libusb_get_device_list(ctx, &list); | 309 | count = libusb_get_device_list(ctx, &list); |
284 | if (count <= 0) { | 310 | if (count <= 0) { |
285 | result = -1; | 311 | result = -1; |
286 | list = 0; | 312 | list = NULL; |
287 | } | 313 | } |
288 | } | 314 | } |
289 | 315 | ||
@@ -317,7 +343,7 @@ static bool usb_connect(void) | |||
317 | 343 | ||
318 | /* If we fall though to here, we don't want this device */ | 344 | /* If we fall though to here, we don't want this device */ |
319 | libusb_close(dev); | 345 | libusb_close(dev); |
320 | dev = 0; | 346 | dev = NULL; |
321 | } | 347 | } |
322 | } | 348 | } |
323 | } | 349 | } |
@@ -329,7 +355,7 @@ static bool usb_connect(void) | |||
329 | * 2) didn't find the XDS110, and no devices are currently open | 355 | * 2) didn't find the XDS110, and no devices are currently open |
330 | */ | 356 | */ |
331 | 357 | ||
332 | if (0 != list) { | 358 | if (NULL != list) { |
333 | /* Free the device list, we're done with it */ | 359 | /* Free the device list, we're done with it */ |
334 | libusb_free_device_list(list, 1); | 360 | libusb_free_device_list(list, 1); |
335 | } | 361 | } |
@@ -339,9 +365,8 @@ static bool usb_connect(void) | |||
339 | xds110.ctx = ctx; | 365 | xds110.ctx = ctx; |
340 | xds110.dev = dev; | 366 | xds110.dev = dev; |
341 | 367 | ||
342 | /* Set libusb to auto detach kernel and disable debug messages */ | 368 | /* Set libusb to auto detach kernel */ |
343 | (void)libusb_set_auto_detach_kernel_driver(dev, 1); | 369 | (void)libusb_set_auto_detach_kernel_driver(dev, 1); |
344 | libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_NONE); | ||
345 | 370 | ||
346 | /* Claim the debug interface on the XDS110 */ | 371 | /* Claim the debug interface on the XDS110 */ |
347 | result = libusb_claim_interface(dev, INTERFACE_DEBUG); | 372 | result = libusb_claim_interface(dev, INTERFACE_DEBUG); |
@@ -352,18 +377,15 @@ static bool usb_connect(void) | |||
352 | 377 | ||
353 | /* On an error, clean up what we can */ | 378 | /* On an error, clean up what we can */ |
354 | if (0 != result) { | 379 | if (0 != result) { |
355 | if (0 != dev) { | 380 | if (NULL != dev) { |
356 | /* Release the debug and data interface on the XDS110 */ | 381 | /* Release the debug and data interface on the XDS110 */ |
357 | (void)libusb_release_interface(dev, INTERFACE_DEBUG); | 382 | (void)libusb_release_interface(dev, INTERFACE_DEBUG); |
358 | libusb_close(dev); | 383 | libusb_close(dev); |
359 | dev = 0; | ||
360 | } | 384 | } |
361 | if (0 != ctx) { | 385 | if (NULL != ctx) |
362 | libusb_exit(ctx); | 386 | libusb_exit(ctx); |
363 | ctx = 0; | 387 | xds110.ctx = NULL; |
364 | } | 388 | xds110.dev = NULL; |
365 | xds110.ctx = 0; | ||
366 | xds110.dev = 0; | ||
367 | } | 389 | } |
368 | 390 | ||
369 | /* Log the results */ | 391 | /* Log the results */ |
@@ -377,15 +399,15 @@ static bool usb_connect(void) | |||
377 | 399 | ||
378 | static void usb_disconnect(void) | 400 | static void usb_disconnect(void) |
379 | { | 401 | { |
380 | if (0 != xds110.dev) { | 402 | if (NULL != xds110.dev) { |
381 | /* Release the debug and data interface on the XDS110 */ | 403 | /* Release the debug and data interface on the XDS110 */ |
382 | (void)libusb_release_interface(xds110.dev, INTERFACE_DEBUG); | 404 | (void)libusb_release_interface(xds110.dev, INTERFACE_DEBUG); |
383 | libusb_close(xds110.dev); | 405 | libusb_close(xds110.dev); |
384 | xds110.dev = 0; | 406 | xds110.dev = NULL; |
385 | } | 407 | } |
386 | if (0 != xds110.ctx) { | 408 | if (NULL != xds110.ctx) { |
387 | libusb_exit(xds110.ctx); | 409 | libusb_exit(xds110.ctx); |
388 | xds110.ctx = 0; | 410 | xds110.ctx = NULL; |
389 | } | 411 | } |
390 | 412 | ||
391 | LOG_INFO("XDS110: disconnected"); | 413 | LOG_INFO("XDS110: disconnected"); |
@@ -396,9 +418,13 @@ static bool usb_read(unsigned char *buffer, int size, int *bytes_read, | |||
396 | { | 418 | { |
397 | int result; | 419 | int result; |
398 | 420 | ||
399 | if (0 == xds110.dev || 0 == buffer || 0 == bytes_read) | 421 | if (NULL == xds110.dev || NULL == buffer || NULL == bytes_read) |
400 | return false; | 422 | return false; |
401 | 423 | ||
424 | /* Force a non-zero timeout to prevent blocking */ | ||
425 | if (0 == timeout) | ||
426 | timeout = DEFAULT_TIMEOUT; | ||
427 | |||
402 | result = libusb_bulk_transfer(xds110.dev, ENDPOINT_DEBUG_IN, buffer, size, | 428 | result = libusb_bulk_transfer(xds110.dev, ENDPOINT_DEBUG_IN, buffer, size, |
403 | bytes_read, timeout); | 429 | bytes_read, timeout); |
404 | 430 | ||
@@ -411,7 +437,7 @@ static bool usb_write(unsigned char *buffer, int size, int *written) | |||
411 | int result = LIBUSB_SUCCESS; | 437 | int result = LIBUSB_SUCCESS; |
412 | int retries = 0; | 438 | int retries = 0; |
413 | 439 | ||
414 | if (0 == xds110.dev || 0 == buffer) | 440 | if (NULL == xds110.dev || NULL == buffer) |
415 | return false; | 441 | return false; |
416 | 442 | ||
417 | result = libusb_bulk_transfer(xds110.dev, ENDPOINT_DEBUG_OUT, buffer, | 443 | result = libusb_bulk_transfer(xds110.dev, ENDPOINT_DEBUG_OUT, buffer, |
@@ -425,7 +451,7 @@ static bool usb_write(unsigned char *buffer, int size, int *written) | |||
425 | retries++; | 451 | retries++; |
426 | } | 452 | } |
427 | 453 | ||
428 | if (0 != written) | 454 | if (NULL != written) |
429 | *written = bytes_written; | 455 | *written = bytes_written; |
430 | 456 | ||
431 | return (0 == result && size == bytes_written) ? true : false; | 457 | return (0 == result && size == bytes_written) ? true : false; |
@@ -439,10 +465,6 @@ static bool usb_get_response(uint32_t *total_bytes_read, uint32_t timeout) | |||
439 | uint16_t count; | 465 | uint16_t count; |
440 | bool success; | 466 | bool success; |
441 | 467 | ||
442 | /* Set a non-zero timeout to prevent blocking */ | ||
443 | if (0 == timeout) | ||
444 | timeout = DEFAULT_TIMEOUT; | ||
445 | |||
446 | size = 0; | 468 | size = 0; |
447 | success = true; | 469 | success = true; |
448 | while (success) { | 470 | while (success) { |
@@ -455,7 +477,7 @@ static bool usb_get_response(uint32_t *total_bytes_read, uint32_t timeout) | |||
455 | */ | 477 | */ |
456 | if (bytes_read >= 7 && '*' == buffer[0]) { | 478 | if (bytes_read >= 7 && '*' == buffer[0]) { |
457 | /* Extract the payload size */ | 479 | /* Extract the payload size */ |
458 | size = buffer[1] + (buffer[2] << 8); | 480 | size = xds110_get_u16(&buffer[1]); |
459 | /* Sanity test on payload size */ | 481 | /* Sanity test on payload size */ |
460 | if (USB_PAYLOAD_SIZE >= size && 4 <= size) { | 482 | if (USB_PAYLOAD_SIZE >= size && 4 <= size) { |
461 | /* Check we didn't get more data than expected */ | 483 | /* Check we didn't get more data than expected */ |
@@ -474,7 +496,7 @@ static bool usb_get_response(uint32_t *total_bytes_read, uint32_t timeout) | |||
474 | 496 | ||
475 | /* Abort now if we didn't receive a valid response */ | 497 | /* Abort now if we didn't receive a valid response */ |
476 | if (!success) { | 498 | if (!success) { |
477 | if (0 != total_bytes_read) | 499 | if (NULL != total_bytes_read) |
478 | *total_bytes_read = 0; | 500 | *total_bytes_read = 0; |
479 | return false; | 501 | return false; |
480 | } | 502 | } |
@@ -511,13 +533,13 @@ static bool usb_get_response(uint32_t *total_bytes_read, uint32_t timeout) | |||
511 | 533 | ||
512 | if (!success) | 534 | if (!success) |
513 | count = 0; | 535 | count = 0; |
514 | if (0 != total_bytes_read) | 536 | if (NULL != total_bytes_read) |
515 | *total_bytes_read = count; | 537 | *total_bytes_read = count; |
516 | 538 | ||
517 | return success; | 539 | return success; |
518 | } | 540 | } |
519 | 541 | ||
520 | static bool usb_send_command(uint32_t size) | 542 | static bool usb_send_command(uint16_t size) |
521 | { | 543 | { |
522 | int written; | 544 | int written; |
523 | bool success = true; | 545 | bool success = true; |
@@ -530,8 +552,7 @@ static bool usb_send_command(uint32_t size) | |||
530 | xds110.write_packet[0] = '*'; | 552 | xds110.write_packet[0] = '*'; |
531 | 553 | ||
532 | /* Place the payload size into the packet buffer */ | 554 | /* Place the payload size into the packet buffer */ |
533 | xds110.write_packet[1] = (size & 0x00ff) >> 0; | 555 | xds110_set_u16(&xds110.write_packet[1], size); |
534 | xds110.write_packet[2] = (size & 0xff00) >> 8; | ||
535 | 556 | ||
536 | /* Adjust size to include header */ | 557 | /* Adjust size to include header */ |
537 | size += 3; | 558 | size += 3; |
@@ -559,10 +580,9 @@ static bool xds_execute(uint32_t out_length, uint32_t in_length, | |||
559 | bool done = false; | 580 | bool done = false; |
560 | bool success = true; | 581 | bool success = true; |
561 | int error = 0; | 582 | int error = 0; |
562 | int *error_pntr; | ||
563 | uint32_t bytes_read = 0; | 583 | uint32_t bytes_read = 0; |
564 | 584 | ||
565 | if (0 == xds110.dev) | 585 | if (NULL == xds110.dev) |
566 | return false; | 586 | return false; |
567 | 587 | ||
568 | while (!done && attempts > 0) { | 588 | while (!done && attempts > 0) { |
@@ -571,9 +591,10 @@ static bool xds_execute(uint32_t out_length, uint32_t in_length, | |||
571 | /* Send command to XDS110 */ | 591 | /* Send command to XDS110 */ |
572 | success = usb_send_command(out_length); | 592 | success = usb_send_command(out_length); |
573 | 593 | ||
574 | if (success) | 594 | if (success) { |
575 | /* Get response from XDS110 */ | 595 | /* Get response from XDS110 */ |
576 | success = usb_get_response(&bytes_read, timeout); | 596 | success = usb_get_response(&bytes_read, timeout); |
597 | } | ||
577 | 598 | ||
578 | if (success) { | 599 | if (success) { |
579 | /* Check for valid response from XDS code handling */ | 600 | /* Check for valid response from XDS code handling */ |
@@ -582,8 +603,7 @@ static bool xds_execute(uint32_t out_length, uint32_t in_length, | |||
582 | success = false; | 603 | success = false; |
583 | } else { | 604 | } else { |
584 | /* Extract error code from return packet */ | 605 | /* Extract error code from return packet */ |
585 | error_pntr = (int *)&xds110.read_payload[0]; | 606 | error = (int)xds110_get_u32(&xds110.read_payload[0]); |
586 | error = *error_pntr; | ||
587 | done = true; | 607 | done = true; |
588 | } | 608 | } |
589 | } | 609 | } |
@@ -624,24 +644,21 @@ static bool xds_disconnect(void) | |||
624 | 644 | ||
625 | static bool xds_version(uint32_t *firmware_id, uint16_t *hardware_id) | 645 | static bool xds_version(uint32_t *firmware_id, uint16_t *hardware_id) |
626 | { | 646 | { |
627 | uint32_t *fw_id_pntr; | 647 | uint8_t *fw_id_pntr = &xds110.read_payload[XDS_IN_LEN + 0]; /* 32-bits */ |
628 | uint16_t *hw_id_pntr; | 648 | uint8_t *hw_id_pntr = &xds110.read_payload[XDS_IN_LEN + 4]; /* 16-bits */ |
629 | |||
630 | fw_id_pntr = (uint32_t *)&xds110.read_payload[XDS_IN_LEN+0]; | ||
631 | hw_id_pntr = (uint16_t *)&xds110.read_payload[XDS_IN_LEN+4]; | ||
632 | 649 | ||
633 | bool success; | 650 | bool success; |
634 | 651 | ||
635 | xds110.write_payload[0] = XDS_VERSION; | 652 | xds110.write_payload[0] = XDS_VERSION; |
636 | 653 | ||
637 | success = xds_execute(XDS_OUT_LEN, XDS_IN_LEN+6, DEFAULT_ATTEMPTS, | 654 | success = xds_execute(XDS_OUT_LEN, XDS_IN_LEN + 6, DEFAULT_ATTEMPTS, |
638 | DEFAULT_TIMEOUT); | 655 | DEFAULT_TIMEOUT); |
639 | 656 | ||
640 | if (success) { | 657 | if (success) { |
641 | if (0 != firmware_id) | 658 | if (NULL != firmware_id) |
642 | *firmware_id = *fw_id_pntr; | 659 | *firmware_id = xds110_get_u32(fw_id_pntr); |
643 | if (0 != hardware_id) | 660 | if (NULL != hardware_id) |
644 | *hardware_id = *hw_id_pntr; | 661 | *hardware_id = xds110_get_u16(hw_id_pntr); |
645 | } | 662 | } |
646 | 663 | ||
647 | return success; | 664 | return success; |
@@ -649,17 +666,15 @@ static bool xds_version(uint32_t *firmware_id, uint16_t *hardware_id) | |||
649 | 666 | ||
650 | static bool xds_set_tck_delay(uint32_t delay) | 667 | static bool xds_set_tck_delay(uint32_t delay) |
651 | { | 668 | { |
652 | uint32_t *delay_pntr; | 669 | uint8_t *delay_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 32-bits */ |
653 | |||
654 | delay_pntr = (uint32_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
655 | 670 | ||
656 | bool success; | 671 | bool success; |
657 | 672 | ||
658 | xds110.write_payload[0] = XDS_SET_TCK; | 673 | xds110.write_payload[0] = XDS_SET_TCK; |
659 | 674 | ||
660 | *delay_pntr = delay; | 675 | xds110_set_u32(delay_pntr, delay); |
661 | 676 | ||
662 | success = xds_execute(XDS_OUT_LEN+4, XDS_IN_LEN, DEFAULT_ATTEMPTS, | 677 | success = xds_execute(XDS_OUT_LEN + 4, XDS_IN_LEN, DEFAULT_ATTEMPTS, |
663 | DEFAULT_TIMEOUT); | 678 | DEFAULT_TIMEOUT); |
664 | 679 | ||
665 | return success; | 680 | return success; |
@@ -667,9 +682,7 @@ static bool xds_set_tck_delay(uint32_t delay) | |||
667 | 682 | ||
668 | static bool xds_set_trst(uint8_t trst) | 683 | static bool xds_set_trst(uint8_t trst) |
669 | { | 684 | { |
670 | uint8_t *trst_pntr; | 685 | uint8_t *trst_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 8-bits */ |
671 | |||
672 | trst_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
673 | 686 | ||
674 | bool success; | 687 | bool success; |
675 | 688 | ||
@@ -677,7 +690,7 @@ static bool xds_set_trst(uint8_t trst) | |||
677 | 690 | ||
678 | *trst_pntr = trst; | 691 | *trst_pntr = trst; |
679 | 692 | ||
680 | success = xds_execute(XDS_OUT_LEN+1, XDS_IN_LEN, DEFAULT_ATTEMPTS, | 693 | success = xds_execute(XDS_OUT_LEN + 1, XDS_IN_LEN, DEFAULT_ATTEMPTS, |
681 | DEFAULT_TIMEOUT); | 694 | DEFAULT_TIMEOUT); |
682 | 695 | ||
683 | return success; | 696 | return success; |
@@ -685,36 +698,31 @@ static bool xds_set_trst(uint8_t trst) | |||
685 | 698 | ||
686 | static bool xds_cycle_tck(uint32_t count) | 699 | static bool xds_cycle_tck(uint32_t count) |
687 | { | 700 | { |
688 | uint32_t *count_pntr; | 701 | uint8_t *count_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 32-bits */ |
689 | |||
690 | count_pntr = (uint32_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
691 | 702 | ||
692 | bool success; | 703 | bool success; |
693 | 704 | ||
694 | xds110.write_payload[0] = XDS_CYCLE_TCK; | 705 | xds110.write_payload[0] = XDS_CYCLE_TCK; |
695 | 706 | ||
696 | *count_pntr = count; | 707 | xds110_set_u32(count_pntr, count); |
697 | 708 | ||
698 | success = xds_execute(XDS_OUT_LEN+4, XDS_IN_LEN, DEFAULT_ATTEMPTS, | 709 | success = xds_execute(XDS_OUT_LEN + 4, XDS_IN_LEN, DEFAULT_ATTEMPTS, |
699 | DEFAULT_TIMEOUT); | 710 | DEFAULT_TIMEOUT); |
700 | 711 | ||
701 | return success; | 712 | return success; |
702 | } | 713 | } |
703 | 714 | ||
704 | static bool xds_goto_state(uint32_t state, uint32_t transit) | 715 | static bool xds_goto_state(uint32_t state) |
705 | { | 716 | { |
706 | uint32_t *state_pntr; | 717 | uint8_t *state_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 32-bits */ |
707 | uint32_t *transit_pntr; | 718 | uint8_t *transit_pntr = &xds110.write_payload[XDS_OUT_LEN+4]; /* 32-bits */ |
708 | |||
709 | state_pntr = (uint32_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
710 | transit_pntr = (uint32_t *)&xds110.write_payload[XDS_OUT_LEN+4]; | ||
711 | 719 | ||
712 | bool success; | 720 | bool success; |
713 | 721 | ||
714 | xds110.write_payload[0] = XDS_GOTO_STATE; | 722 | xds110.write_payload[0] = XDS_GOTO_STATE; |
715 | 723 | ||
716 | *state_pntr = state; | 724 | xds110_set_u32(state_pntr, state); |
717 | *transit_pntr = transit; | 725 | xds110_set_u32(transit_pntr, XDS_JTAG_TRANSIT_QUICKEST); |
718 | 726 | ||
719 | success = xds_execute(XDS_OUT_LEN+8, XDS_IN_LEN, DEFAULT_ATTEMPTS, | 727 | success = xds_execute(XDS_OUT_LEN+8, XDS_IN_LEN, DEFAULT_ATTEMPTS, |
720 | DEFAULT_TIMEOUT); | 728 | DEFAULT_TIMEOUT); |
@@ -722,73 +730,55 @@ static bool xds_goto_state(uint32_t state, uint32_t transit) | |||
722 | return success; | 730 | return success; |
723 | } | 731 | } |
724 | 732 | ||
725 | static bool xds_jtag_scan(uint32_t shift_bits, uint32_t shift_state, | 733 | static bool xds_jtag_scan(uint32_t shift_state, uint16_t shift_bits, |
726 | uint32_t begin_transit, uint32_t end_state, uint32_t end_transit, | 734 | uint32_t end_state, uint8_t *data_out, uint8_t *data_in) |
727 | uint32_t preamble, uint32_t posamble, uint32_t delay_tcks, | ||
728 | uint32_t repeat_count, uint32_t repeat_out_offset, | ||
729 | uint32_t repeat_in_offset, uint8_t *data_out, uint8_t *data_in, | ||
730 | uint32_t bytes_to_send, uint32_t bytes_to_receive) | ||
731 | { | 735 | { |
732 | uint16_t *shift_bits_pntr; | 736 | uint8_t *bits_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 16-bits */ |
733 | uint8_t *shift_state_pntr; | 737 | uint8_t *path_pntr = &xds110.write_payload[XDS_OUT_LEN + 2]; /* 8-bits */ |
734 | uint8_t *begin_transit_pntr; | 738 | uint8_t *trans1_pntr = &xds110.write_payload[XDS_OUT_LEN + 3]; /* 8-bits */ |
735 | uint8_t *end_state_pntr; | 739 | uint8_t *end_pntr = &xds110.write_payload[XDS_OUT_LEN + 4]; /* 8-bits */ |
736 | uint8_t *end_transit_pntr; | 740 | uint8_t *trans2_pntr = &xds110.write_payload[XDS_OUT_LEN + 5]; /* 8-bits */ |
737 | uint16_t *preamble_pntr; | 741 | uint8_t *pre_pntr = &xds110.write_payload[XDS_OUT_LEN + 6]; /* 16-bits */ |
738 | uint16_t *posamble_pntr; | 742 | uint8_t *pos_pntr = &xds110.write_payload[XDS_OUT_LEN + 8]; /* 16-bits */ |
739 | uint16_t *delay_tcks_pntr; | 743 | uint8_t *delay_pntr = &xds110.write_payload[XDS_OUT_LEN + 10]; /* 16-bits */ |
740 | uint16_t *repeat_count_pntr; | 744 | uint8_t *rep_pntr = &xds110.write_payload[XDS_OUT_LEN + 12]; /* 16-bits */ |
741 | uint16_t *repeat_out_offset_pntr; | 745 | uint8_t *out_pntr = &xds110.write_payload[XDS_OUT_LEN + 14]; /* 16-bits */ |
742 | uint16_t *repeat_in_offset_pntr; | 746 | uint8_t *in_pntr = &xds110.write_payload[XDS_OUT_LEN + 16]; /* 16-bits */ |
743 | uint8_t *data_out_pntr; | 747 | uint8_t *data_out_pntr = &xds110.write_payload[XDS_OUT_LEN + 18]; |
744 | uint8_t *data_in_pntr; | 748 | uint8_t *data_in_pntr = &xds110.read_payload[XDS_IN_LEN+0]; |
745 | 749 | ||
746 | shift_bits_pntr = (uint16_t*)&xds110.write_payload[XDS_OUT_LEN+0]; | 750 | uint16_t total_bytes = DIV_ROUND_UP(shift_bits, 8); |
747 | shift_state_pntr = (uint8_t*)&xds110.write_payload[XDS_OUT_LEN+2]; | ||
748 | begin_transit_pntr = (uint8_t*)&xds110.write_payload[XDS_OUT_LEN+3]; | ||
749 | end_state_pntr = (uint8_t*)&xds110.write_payload[XDS_OUT_LEN+4]; | ||
750 | end_transit_pntr = (uint8_t*)&xds110.write_payload[XDS_OUT_LEN+5]; | ||
751 | preamble_pntr = (uint16_t*)&xds110.write_payload[XDS_OUT_LEN+6]; | ||
752 | posamble_pntr = (uint16_t*)&xds110.write_payload[XDS_OUT_LEN+8]; | ||
753 | delay_tcks_pntr = (uint16_t*)&xds110.write_payload[XDS_OUT_LEN+10]; | ||
754 | repeat_count_pntr = (uint16_t*)&xds110.write_payload[XDS_OUT_LEN+12]; | ||
755 | repeat_out_offset_pntr = (uint16_t*)&xds110.write_payload[XDS_OUT_LEN+14]; | ||
756 | repeat_in_offset_pntr = (uint16_t*)&xds110.write_payload[XDS_OUT_LEN+16]; | ||
757 | data_out_pntr = (uint8_t*)&xds110.write_payload[XDS_OUT_LEN+18]; | ||
758 | data_in_pntr = (uint8_t*)&xds110.read_payload[XDS_IN_LEN+0]; | ||
759 | 751 | ||
760 | bool success; | 752 | bool success; |
761 | 753 | ||
762 | xds110.write_payload[0] = XDS_JTAG_SCAN; | 754 | xds110.write_payload[0] = XDS_JTAG_SCAN; |
763 | 755 | ||
764 | *shift_bits_pntr = (uint16_t)shift_bits; | 756 | xds110_set_u16(bits_pntr, shift_bits); /* bits to scan */ |
765 | *shift_state_pntr = (uint8_t)shift_state; | 757 | *path_pntr = (uint8_t)(shift_state & 0xff); /* IR vs DR path */ |
766 | *begin_transit_pntr = (uint8_t)begin_transit; | 758 | *trans1_pntr = (uint8_t)XDS_JTAG_TRANSIT_QUICKEST; /* start state route */ |
767 | *end_state_pntr = (uint8_t)end_state; | 759 | *end_pntr = (uint8_t)(end_state & 0xff); /* JTAG state after scan */ |
768 | *end_transit_pntr = (uint8_t)end_transit; | 760 | *trans2_pntr = (uint8_t)XDS_JTAG_TRANSIT_QUICKEST; /* end state route */ |
769 | *preamble_pntr = (uint16_t)preamble; | 761 | xds110_set_u16(pre_pntr, 0); /* number of preamble bits */ |
770 | *posamble_pntr = (uint16_t)posamble; | 762 | xds110_set_u16(pos_pntr, 0); /* number of postamble bits */ |
771 | *delay_tcks_pntr = (uint16_t)delay_tcks; | 763 | xds110_set_u16(delay_pntr, 0); /* number of extra TCKs after scan */ |
772 | *repeat_count_pntr = (uint16_t)repeat_count; | 764 | xds110_set_u16(rep_pntr, 1); /* number of repetitions */ |
773 | *repeat_out_offset_pntr = (uint16_t)repeat_out_offset; | 765 | xds110_set_u16(out_pntr, total_bytes); /* out buffer offset (if repeats) */ |
774 | *repeat_in_offset_pntr = (uint16_t)repeat_in_offset; | 766 | xds110_set_u16(in_pntr, total_bytes); /* in buffer offset (if repeats) */ |
775 | 767 | ||
776 | memcpy((void *)data_out_pntr, (void *)data_out, bytes_to_send); | 768 | memcpy((void *)data_out_pntr, (void *)data_out, total_bytes); |
777 | 769 | ||
778 | success = xds_execute(XDS_OUT_LEN+18+bytes_to_send, | 770 | success = xds_execute(XDS_OUT_LEN + 18 + total_bytes, |
779 | XDS_IN_LEN+bytes_to_receive, DEFAULT_ATTEMPTS, DEFAULT_TIMEOUT); | 771 | XDS_IN_LEN + total_bytes, DEFAULT_ATTEMPTS, DEFAULT_TIMEOUT); |
780 | 772 | ||
781 | if (success) | 773 | if (success) |
782 | memcpy((void *)data_in, (void *)data_in_pntr, bytes_to_receive); | 774 | memcpy((void *)data_in, (void *)data_in_pntr, total_bytes); |
783 | 775 | ||
784 | return success; | 776 | return success; |
785 | } | 777 | } |
786 | 778 | ||
787 | static bool xds_set_srst(uint8_t srst) | 779 | static bool xds_set_srst(uint8_t srst) |
788 | { | 780 | { |
789 | uint8_t *srst_pntr; | 781 | uint8_t *srst_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 8-bits */ |
790 | |||
791 | srst_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
792 | 782 | ||
793 | bool success; | 783 | bool success; |
794 | 784 | ||
@@ -796,7 +786,7 @@ static bool xds_set_srst(uint8_t srst) | |||
796 | 786 | ||
797 | *srst_pntr = srst; | 787 | *srst_pntr = srst; |
798 | 788 | ||
799 | success = xds_execute(XDS_OUT_LEN+1, XDS_IN_LEN, DEFAULT_ATTEMPTS, | 789 | success = xds_execute(XDS_OUT_LEN + 1, XDS_IN_LEN, DEFAULT_ATTEMPTS, |
800 | DEFAULT_TIMEOUT); | 790 | DEFAULT_TIMEOUT); |
801 | 791 | ||
802 | return success; | 792 | return success; |
@@ -804,9 +794,7 @@ static bool xds_set_srst(uint8_t srst) | |||
804 | 794 | ||
805 | static bool cmapi_connect(uint32_t *idcode) | 795 | static bool cmapi_connect(uint32_t *idcode) |
806 | { | 796 | { |
807 | uint32_t *idcode_pntr; | 797 | uint8_t *idcode_pntr = &xds110.read_payload[XDS_IN_LEN + 0]; /* 32-bits */ |
808 | |||
809 | idcode_pntr = (uint32_t *)&xds110.read_payload[XDS_IN_LEN+0]; | ||
810 | 798 | ||
811 | bool success; | 799 | bool success; |
812 | 800 | ||
@@ -816,8 +804,8 @@ static bool cmapi_connect(uint32_t *idcode) | |||
816 | DEFAULT_TIMEOUT); | 804 | DEFAULT_TIMEOUT); |
817 | 805 | ||
818 | if (success) { | 806 | if (success) { |
819 | if (0 != idcode) | 807 | if (NULL != idcode) |
820 | *idcode = *idcode_pntr; | 808 | *idcode = xds110_get_u32(idcode_pntr); |
821 | } | 809 | } |
822 | 810 | ||
823 | return success; | 811 | return success; |
@@ -862,30 +850,25 @@ static bool cmapi_release(void) | |||
862 | static bool cmapi_read_dap_reg(uint32_t type, uint32_t ap_num, | 850 | static bool cmapi_read_dap_reg(uint32_t type, uint32_t ap_num, |
863 | uint32_t address, uint32_t *value) | 851 | uint32_t address, uint32_t *value) |
864 | { | 852 | { |
865 | uint8_t *type_pntr; | 853 | uint8_t *type_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 8-bits */ |
866 | uint8_t *ap_num_pntr; | 854 | uint8_t *ap_num_pntr = &xds110.write_payload[XDS_OUT_LEN + 1]; /* 8-bits */ |
867 | uint8_t *address_pntr; | 855 | uint8_t *address_pntr = &xds110.write_payload[XDS_OUT_LEN + 2]; /* 8-bits */ |
868 | uint8_t *value_pntr; | 856 | uint8_t *value_pntr = &xds110.read_payload[XDS_IN_LEN + 0]; /* 32-bits */ |
869 | |||
870 | type_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
871 | ap_num_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+1]; | ||
872 | address_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+2]; | ||
873 | value_pntr = (uint8_t *)&xds110.read_payload[XDS_IN_LEN+0]; | ||
874 | 857 | ||
875 | bool success; | 858 | bool success; |
876 | 859 | ||
877 | xds110.write_payload[0] = CMAPI_REG_READ; | 860 | xds110.write_payload[0] = CMAPI_REG_READ; |
878 | 861 | ||
879 | *type_pntr = (uint8_t)type; | 862 | *type_pntr = (uint8_t)(type & 0xff); |
880 | *ap_num_pntr = (uint8_t)ap_num; | 863 | *ap_num_pntr = (uint8_t)(ap_num & 0xff); |
881 | *address_pntr = (uint8_t)address; | 864 | *address_pntr = (uint8_t)(address & 0xff); |
882 | 865 | ||
883 | success = xds_execute(XDS_OUT_LEN+3, XDS_IN_LEN+4, DEFAULT_ATTEMPTS, | 866 | success = xds_execute(XDS_OUT_LEN + 3, XDS_IN_LEN + 4, DEFAULT_ATTEMPTS, |
884 | DEFAULT_TIMEOUT); | 867 | DEFAULT_TIMEOUT); |
885 | 868 | ||
886 | if (success) { | 869 | if (success) { |
887 | if (0 != value) | 870 | if (NULL != value) |
888 | memcpy((void *)value, (void *)value_pntr, 4); | 871 | *value = xds110_get_u32(value_pntr); |
889 | } | 872 | } |
890 | 873 | ||
891 | return success; | 874 | return success; |
@@ -894,30 +877,24 @@ static bool cmapi_read_dap_reg(uint32_t type, uint32_t ap_num, | |||
894 | static bool cmapi_write_dap_reg(uint32_t type, uint32_t ap_num, | 877 | static bool cmapi_write_dap_reg(uint32_t type, uint32_t ap_num, |
895 | uint32_t address, uint32_t *value) | 878 | uint32_t address, uint32_t *value) |
896 | { | 879 | { |
897 | uint8_t *type_pntr; | 880 | uint8_t *type_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 8-bits */ |
898 | uint8_t *ap_num_pntr; | 881 | uint8_t *ap_num_pntr = &xds110.write_payload[XDS_OUT_LEN + 1]; /* 8-bits */ |
899 | uint8_t *address_pntr; | 882 | uint8_t *address_pntr = &xds110.write_payload[XDS_OUT_LEN + 2]; /* 8-bits */ |
900 | uint8_t *value_pntr; | 883 | uint8_t *value_pntr = &xds110.write_payload[XDS_OUT_LEN + 3]; /* 32-bits */ |
901 | |||
902 | type_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
903 | ap_num_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+1]; | ||
904 | address_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+2]; | ||
905 | value_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+3]; | ||
906 | 884 | ||
907 | bool success; | 885 | bool success; |
908 | 886 | ||
909 | if (0 == value) | 887 | if (NULL == value) |
910 | return false; | 888 | return false; |
911 | 889 | ||
912 | xds110.write_payload[0] = CMAPI_REG_WRITE; | 890 | xds110.write_payload[0] = CMAPI_REG_WRITE; |
913 | 891 | ||
914 | *type_pntr = (uint8_t)type; | 892 | *type_pntr = (uint8_t)(type & 0xff); |
915 | *ap_num_pntr = (uint8_t)ap_num; | 893 | *ap_num_pntr = (uint8_t)(ap_num & 0xff); |
916 | *address_pntr = (uint8_t)address; | 894 | *address_pntr = (uint8_t)(address & 0xff); |
917 | 895 | xds110_set_u32(value_pntr, *value); | |
918 | memcpy((void *)value_pntr, (void *)value, sizeof(uint32_t)); | ||
919 | 896 | ||
920 | success = xds_execute(XDS_OUT_LEN+7, XDS_IN_LEN, DEFAULT_ATTEMPTS, | 897 | success = xds_execute(XDS_OUT_LEN + 7, XDS_IN_LEN, DEFAULT_ATTEMPTS, |
921 | DEFAULT_TIMEOUT); | 898 | DEFAULT_TIMEOUT); |
922 | 899 | ||
923 | return success; | 900 | return success; |
@@ -949,17 +926,15 @@ static bool swd_disconnect(void) | |||
949 | 926 | ||
950 | static bool cjtag_connect(uint32_t format) | 927 | static bool cjtag_connect(uint32_t format) |
951 | { | 928 | { |
952 | uint32_t *format_pntr; | 929 | uint8_t *format_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 32-bits */ |
953 | |||
954 | format_pntr = (uint32_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
955 | 930 | ||
956 | bool success; | 931 | bool success; |
957 | 932 | ||
958 | xds110.write_payload[0] = CJTAG_CONNECT; | 933 | xds110.write_payload[0] = CJTAG_CONNECT; |
959 | 934 | ||
960 | *format_pntr = format; | 935 | xds110_set_u32(format_pntr, format); |
961 | 936 | ||
962 | success = xds_execute(XDS_OUT_LEN+4, XDS_IN_LEN, DEFAULT_ATTEMPTS, | 937 | success = xds_execute(XDS_OUT_LEN + 4, XDS_IN_LEN, DEFAULT_ATTEMPTS, |
963 | DEFAULT_TIMEOUT); | 938 | DEFAULT_TIMEOUT); |
964 | 939 | ||
965 | return success; | 940 | return success; |
@@ -980,15 +955,12 @@ static bool cjtag_disconnect(void) | |||
980 | static bool ocd_dap_request(uint8_t *dap_requests, uint32_t request_size, | 955 | static bool ocd_dap_request(uint8_t *dap_requests, uint32_t request_size, |
981 | uint32_t *dap_results, uint32_t result_count) | 956 | uint32_t *dap_results, uint32_t result_count) |
982 | { | 957 | { |
983 | uint8_t *request_pntr; | 958 | uint8_t *request_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; |
984 | uint8_t *result_pntr; | 959 | uint8_t *result_pntr = &xds110.read_payload[XDS_IN_LEN + 0]; |
985 | |||
986 | request_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
987 | result_pntr = (uint8_t *)&xds110.read_payload[XDS_IN_LEN+0]; | ||
988 | 960 | ||
989 | bool success; | 961 | bool success; |
990 | 962 | ||
991 | if (0 == dap_requests || 0 == dap_results) | 963 | if (NULL == dap_requests || NULL == dap_results) |
992 | return false; | 964 | return false; |
993 | 965 | ||
994 | xds110.write_payload[0] = OCD_DAP_REQUEST; | 966 | xds110.write_payload[0] = OCD_DAP_REQUEST; |
@@ -1008,15 +980,12 @@ static bool ocd_dap_request(uint8_t *dap_requests, uint32_t request_size, | |||
1008 | static bool ocd_scan_request(uint8_t *scan_requests, uint32_t request_size, | 980 | static bool ocd_scan_request(uint8_t *scan_requests, uint32_t request_size, |
1009 | uint8_t *scan_results, uint32_t result_size) | 981 | uint8_t *scan_results, uint32_t result_size) |
1010 | { | 982 | { |
1011 | uint8_t *request_pntr; | 983 | uint8_t *request_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; |
1012 | uint8_t *result_pntr; | 984 | uint8_t *result_pntr = &xds110.read_payload[XDS_IN_LEN + 0]; |
1013 | |||
1014 | request_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
1015 | result_pntr = (uint8_t *)&xds110.read_payload[XDS_IN_LEN+0]; | ||
1016 | 985 | ||
1017 | bool success; | 986 | bool success; |
1018 | 987 | ||
1019 | if (0 == scan_requests || 0 == scan_results) | 988 | if (NULL == scan_requests || NULL == scan_results) |
1020 | return false; | 989 | return false; |
1021 | 990 | ||
1022 | xds110.write_payload[0] = OCD_SCAN_REQUEST; | 991 | xds110.write_payload[0] = OCD_SCAN_REQUEST; |
@@ -1035,26 +1004,23 @@ static bool ocd_scan_request(uint8_t *scan_requests, uint32_t request_size, | |||
1035 | 1004 | ||
1036 | static bool ocd_pathmove(uint32_t num_states, uint8_t *path) | 1005 | static bool ocd_pathmove(uint32_t num_states, uint8_t *path) |
1037 | { | 1006 | { |
1038 | uint32_t *num_states_pntr; | 1007 | uint8_t *num_pntr = &xds110.write_payload[XDS_OUT_LEN + 0]; /* 32-bits */ |
1039 | uint8_t *path_pntr; | 1008 | uint8_t *path_pntr = &xds110.write_payload[XDS_OUT_LEN + 4]; |
1040 | |||
1041 | num_states_pntr = (uint32_t *)&xds110.write_payload[XDS_OUT_LEN+0]; | ||
1042 | path_pntr = (uint8_t *)&xds110.write_payload[XDS_OUT_LEN+4]; | ||
1043 | 1009 | ||
1044 | bool success; | 1010 | bool success; |
1045 | 1011 | ||
1046 | if (0 == path) | 1012 | if (NULL == path) |
1047 | return false; | 1013 | return false; |
1048 | 1014 | ||
1049 | xds110.write_payload[0] = OCD_PATHMOVE; | 1015 | xds110.write_payload[0] = OCD_PATHMOVE; |
1050 | 1016 | ||
1051 | *num_states_pntr = num_states; | 1017 | xds110_set_u32(num_pntr, num_states); |
1052 | 1018 | ||
1053 | memcpy((void *)path_pntr, (void *)path, num_states); | 1019 | memcpy((void *)path_pntr, (void *)path, num_states); |
1054 | 1020 | ||
1055 | success = xds_execute(XDS_OUT_LEN + 4 + num_states, XDS_IN_LEN, | 1021 | success = xds_execute(XDS_OUT_LEN + 4 + num_states, XDS_IN_LEN, |
1056 | DEFAULT_ATTEMPTS, DEFAULT_TIMEOUT); | 1022 | DEFAULT_ATTEMPTS, DEFAULT_TIMEOUT); |
1057 | 1023 | ||
1058 | return success; | 1024 | return success; |
1059 | } | 1025 | } |
1060 | 1026 | ||
@@ -1072,8 +1038,51 @@ static int xds110_swd_init(void) | |||
1072 | 1038 | ||
1073 | static int xds110_swd_switch_seq(enum swd_special_seq seq) | 1039 | static int xds110_swd_switch_seq(enum swd_special_seq seq) |
1074 | { | 1040 | { |
1075 | /* Not used for XDS110. The switch is handled during xds110_init() */ | 1041 | uint32_t idcode; |
1076 | return ERROR_OK; | 1042 | bool success; |
1043 | |||
1044 | switch (seq) { | ||
1045 | case LINE_RESET: | ||
1046 | LOG_ERROR("Sequence SWD line reset (%d) not supported", seq); | ||
1047 | return ERROR_FAIL; | ||
1048 | case JTAG_TO_SWD: | ||
1049 | LOG_DEBUG("JTAG-to-SWD"); | ||
1050 | xds110.is_swd_mode = false; | ||
1051 | xds110.is_cmapi_connected = false; | ||
1052 | xds110.is_cmapi_acquired = false; | ||
1053 | /* Run sequence to put target in SWD mode */ | ||
1054 | success = swd_connect(); | ||
1055 | /* Re-iniitialize CMAPI API for DAP access */ | ||
1056 | if (success) { | ||
1057 | xds110.is_swd_mode = true; | ||
1058 | success = cmapi_connect(&idcode); | ||
1059 | if (success) { | ||
1060 | xds110.is_cmapi_connected = true; | ||
1061 | success = cmapi_acquire(); | ||
1062 | } | ||
1063 | } | ||
1064 | break; | ||
1065 | case SWD_TO_JTAG: | ||
1066 | LOG_DEBUG("SWD-to-JTAG"); | ||
1067 | xds110.is_swd_mode = false; | ||
1068 | xds110.is_cmapi_connected = false; | ||
1069 | xds110.is_cmapi_acquired = false; | ||
1070 | /* Run sequence to put target in JTAG mode */ | ||
1071 | success = swd_disconnect(); | ||
1072 | if (success) { | ||
1073 | /* Re-initialize JTAG interface */ | ||
1074 | success = cjtag_connect(MODE_JTAG); | ||
1075 | } | ||
1076 | break; | ||
1077 | default: | ||
1078 | LOG_ERROR("Sequence %d not supported", seq); | ||
1079 | return ERROR_FAIL; | ||
1080 | } | ||
1081 | |||
1082 | if (success) | ||
1083 | return ERROR_OK; | ||
1084 | else | ||
1085 | return ERROR_FAIL; | ||
1077 | } | 1086 | } |
1078 | 1087 | ||
1079 | static bool xds110_legacy_read_reg(uint8_t cmd, uint32_t *value) | 1088 | static bool xds110_legacy_read_reg(uint8_t cmd, uint32_t *value) |
@@ -1123,7 +1132,7 @@ static bool xds110_legacy_read_reg(uint8_t cmd, uint32_t *value) | |||
1123 | /* Handle result of read attempt */ | 1132 | /* Handle result of read attempt */ |
1124 | if (!success) | 1133 | if (!success) |
1125 | LOG_ERROR("XDS110: failed to read DAP register"); | 1134 | LOG_ERROR("XDS110: failed to read DAP register"); |
1126 | else if (0 != value) | 1135 | else if (NULL != value) |
1127 | *value = reg_value; | 1136 | *value = reg_value; |
1128 | 1137 | ||
1129 | if (success && DAP_AP == type) { | 1138 | if (success && DAP_AP == type) { |
@@ -1178,9 +1187,8 @@ static bool xds110_legacy_write_reg(uint8_t cmd, uint32_t value) | |||
1178 | * If the debugger wrote to SELECT, cache the value | 1187 | * If the debugger wrote to SELECT, cache the value |
1179 | * to use to build the apNum and address values above | 1188 | * to use to build the apNum and address values above |
1180 | */ | 1189 | */ |
1181 | if ((DAP_DP == type) && (DAP_DP_SELECT == address)) { | 1190 | if ((DAP_DP == type) && (DAP_DP_SELECT == address)) |
1182 | xds110.select = value; | 1191 | xds110.select = value; |
1183 | } | ||
1184 | } | 1192 | } |
1185 | 1193 | ||
1186 | return success; | 1194 | return success; |
@@ -1287,7 +1295,7 @@ static void xds110_swd_read_reg(uint8_t cmd, uint32_t *value, | |||
1287 | { | 1295 | { |
1288 | xds110_swd_queue_cmd(cmd, value); | 1296 | xds110_swd_queue_cmd(cmd, value); |
1289 | } | 1297 | } |
1290 | static void xds110_swd_write_reg(uint8_t cmd, uint32_t value, | 1298 | static void xds110_swd_write_reg(uint8_t cmd, uint32_t value, |
1291 | uint32_t ap_delay_clk) | 1299 | uint32_t ap_delay_clk) |
1292 | { | 1300 | { |
1293 | xds110_swd_queue_cmd(cmd, &value); | 1301 | xds110_swd_queue_cmd(cmd, &value); |
@@ -1364,7 +1372,8 @@ static int xds110_init(void) | |||
1364 | if (success) { | 1372 | if (success) { |
1365 | /* Send connect message to XDS110 firmware */ | 1373 | /* Send connect message to XDS110 firmware */ |
1366 | success = xds_connect(); | 1374 | success = xds_connect(); |
1367 | if (success) xds110.is_connected = true; | 1375 | if (success) |
1376 | xds110.is_connected = true; | ||
1368 | } | 1377 | } |
1369 | 1378 | ||
1370 | if (success) { | 1379 | if (success) { |
@@ -1408,6 +1417,7 @@ static int xds110_init(void) | |||
1408 | 1417 | ||
1409 | /* Acquire exclusive access to CMAPI interface */ | 1418 | /* Acquire exclusive access to CMAPI interface */ |
1410 | if (success) { | 1419 | if (success) { |
1420 | xds110.is_cmapi_connected = true; | ||
1411 | success = cmapi_acquire(); | 1421 | success = cmapi_acquire(); |
1412 | if (success) | 1422 | if (success) |
1413 | xds110.is_cmapi_acquired = true; | 1423 | xds110.is_cmapi_acquired = true; |
@@ -1426,32 +1436,19 @@ static int xds110_init(void) | |||
1426 | static void xds110_legacy_scan(uint32_t shift_state, uint32_t total_bits, | 1436 | static void xds110_legacy_scan(uint32_t shift_state, uint32_t total_bits, |
1427 | uint32_t end_state, uint8_t *data_out, uint8_t *data_in) | 1437 | uint32_t end_state, uint8_t *data_out, uint8_t *data_in) |
1428 | { | 1438 | { |
1429 | uint32_t total_bytes; | 1439 | (void)xds_jtag_scan(shift_state, total_bits, end_state, data_out, data_in); |
1430 | |||
1431 | if (total_bits == 0) | ||
1432 | return; | ||
1433 | |||
1434 | total_bytes = DIV_ROUND_UP(total_bits, 8); | ||
1435 | |||
1436 | (void)xds_jtag_scan(total_bits, shift_state, XDS_JTAG_TRANSIT_QUICKEST, | ||
1437 | end_state, XDS_JTAG_TRANSIT_QUICKEST, 0, 0, 0, 1, total_bytes, | ||
1438 | total_bytes, data_out, data_in, total_bytes, total_bytes); | ||
1439 | |||
1440 | return; | ||
1441 | } | 1440 | } |
1442 | 1441 | ||
1443 | static void xds110_legacy_runtest(uint32_t clocks, uint32_t end_state) | 1442 | static void xds110_legacy_runtest(uint32_t clocks, uint32_t end_state) |
1444 | { | 1443 | { |
1445 | xds_goto_state(XDS_JTAG_STATE_IDLE, XDS_JTAG_TRANSIT_QUICKEST); | 1444 | xds_goto_state(XDS_JTAG_STATE_IDLE); |
1446 | xds_cycle_tck(clocks); | 1445 | xds_cycle_tck(clocks); |
1447 | xds_goto_state(end_state, XDS_JTAG_TRANSIT_QUICKEST); | 1446 | xds_goto_state(end_state); |
1448 | return; | ||
1449 | } | 1447 | } |
1450 | 1448 | ||
1451 | static void xds110_legacy_stableclocks(uint32_t clocks) | 1449 | static void xds110_legacy_stableclocks(uint32_t clocks) |
1452 | { | 1450 | { |
1453 | xds_cycle_tck(clocks); | 1451 | xds_cycle_tck(clocks); |
1454 | return; | ||
1455 | } | 1452 | } |
1456 | 1453 | ||
1457 | static void xds110_flush(void) | 1454 | static void xds110_flush(void) |
@@ -1475,7 +1472,7 @@ static void xds110_flush(void) | |||
1475 | xds110.txn_requests[xds110.txn_request_size++] = 0; | 1472 | xds110.txn_requests[xds110.txn_request_size++] = 0; |
1476 | 1473 | ||
1477 | if (xds110.firmware >= OCD_FIRMWARE_VERSION) { | 1474 | if (xds110.firmware >= OCD_FIRMWARE_VERSION) { |
1478 | /* XDS110 firmware has the API to directly handle the queue */ | 1475 | /* Updated firmware has the API to directly handle the queue */ |
1479 | (void)ocd_scan_request(xds110.txn_requests, xds110.txn_request_size, | 1476 | (void)ocd_scan_request(xds110.txn_requests, xds110.txn_request_size, |
1480 | data_in, xds110.txn_result_size); | 1477 | data_in, xds110.txn_result_size); |
1481 | } else { | 1478 | } else { |
@@ -1583,7 +1580,7 @@ static void xds110_execute_sleep(struct jtag_command *cmd) | |||
1583 | 1580 | ||
1584 | static void xds110_execute_tlr_reset(struct jtag_command *cmd) | 1581 | static void xds110_execute_tlr_reset(struct jtag_command *cmd) |
1585 | { | 1582 | { |
1586 | (void)xds_goto_state(XDS_JTAG_STATE_RESET, XDS_JTAG_TRANSIT_QUICKEST); | 1583 | (void)xds_goto_state(XDS_JTAG_STATE_RESET); |
1587 | 1584 | ||
1588 | return; | 1585 | return; |
1589 | } | 1586 | } |
@@ -1708,9 +1705,6 @@ static void xds110_queue_runtest(struct jtag_command *cmd) | |||
1708 | > MAX_DATA_BLOCK) | 1705 | > MAX_DATA_BLOCK) |
1709 | xds110_flush(); | 1706 | xds110_flush(); |
1710 | 1707 | ||
1711 | clocks = (uint32_t)cmd->cmd.stableclocks->num_cycles; | ||
1712 | end_state = (uint8_t)xds_jtag_state[cmd->cmd.runtest->end_state]; | ||
1713 | |||
1714 | /* Queue request and cycle count directly to queue buffer */ | 1708 | /* Queue request and cycle count directly to queue buffer */ |
1715 | xds110.txn_requests[xds110.txn_request_size++] = CMD_RUNTEST; | 1709 | xds110.txn_requests[xds110.txn_request_size++] = CMD_RUNTEST; |
1716 | xds110.txn_requests[xds110.txn_request_size++] = (clocks >> 0) & 0xff; | 1710 | xds110.txn_requests[xds110.txn_request_size++] = (clocks >> 0) & 0xff; |
@@ -1780,7 +1774,7 @@ static int xds110_execute_queue(void) | |||
1780 | { | 1774 | { |
1781 | struct jtag_command *cmd = jtag_command_queue; | 1775 | struct jtag_command *cmd = jtag_command_queue; |
1782 | 1776 | ||
1783 | while (cmd != 0) { | 1777 | while (cmd != NULL) { |
1784 | xds110_execute_command(cmd); | 1778 | xds110_execute_command(cmd); |
1785 | cmd = cmd->next; | 1779 | cmd = cmd->next; |
1786 | } | 1780 | } |
@@ -1911,9 +1905,9 @@ COMMAND_HANDLER(xds110_handle_serial_command) | |||
1911 | return ERROR_FAIL; | 1905 | return ERROR_FAIL; |
1912 | } | 1906 | } |
1913 | 1907 | ||
1914 | for (uint32_t i = 0; i < len; i++) { | 1908 | for (uint32_t i = 0; i < len; i++) |
1915 | xds110.serial[i] = (char)serial[i]; | 1909 | xds110.serial[i] = (char)serial[i]; |
1916 | } | 1910 | |
1917 | xds110.serial[len] = 0; | 1911 | xds110.serial[len] = 0; |
1918 | } else { | 1912 | } else { |
1919 | LOG_ERROR("XDS110: expected exactly one argument to xds110_serial " | 1913 | LOG_ERROR("XDS110: expected exactly one argument to xds110_serial " |
diff --git a/openocd/tcl/interface/xds110.cfg b/openocd/tcl/interface/xds110.cfg index cabff55..927713d 100644 --- a/openocd/tcl/interface/xds110.cfg +++ b/openocd/tcl/interface/xds110.cfg | |||
@@ -2,6 +2,7 @@ | |||
2 | # Texas Instruments XDS110 | 2 | # Texas Instruments XDS110 |
3 | # | 3 | # |
4 | # http://processors.wiki.ti.com/index.php/XDS110 | 4 | # http://processors.wiki.ti.com/index.php/XDS110 |
5 | # http://processors.wiki.ti.com/index.php/Emulation_Software_Package#XDS110_Support_Utilities | ||
5 | # | 6 | # |
6 | 7 | ||
7 | interface xds110 | 8 | interface xds110 |