<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dh-electronics.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sdaxenberger</id>
	<title>Wiki-DB - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dh-electronics.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sdaxenberger"/>
	<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=Special:Contributions/Sdaxenberger"/>
	<updated>2026-04-28T00:49:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2540</id>
		<title>U-Boot recovery for i.MX6 Q/D/DL/S/ULL via JTAG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2540"/>
		<updated>2019-10-08T17:20:53Z</updated>

		<summary type="html">&lt;p&gt;Sdaxenberger: /* Automated Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Technically all JTAG adapter listed by OpenOCD should work, but DH electronics recommends the [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
All tests and documents were made in use of this one.&lt;br /&gt;
&lt;br /&gt;
== Required Hardware ==&lt;br /&gt;
* JTAG Debugger: [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
* DHCOM JTAG adapter for FFC connection: Article number FD00037&lt;br /&gt;
:[[File:JTAG-Adapter.jpeg|300px]]&lt;br /&gt;
* Wuerth FFC cable: [http://katalog.we-online.de/de/em/FFC_0_50_TYPE_1_6876XXXXX002 687610050002]&lt;br /&gt;
:Note: One cable is included with the DHCOM JTAG adapter.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
This installation was made on the [[Virtual Machine for Application Development]].&lt;br /&gt;
All console expressions refer to this Debian system, but any other debian based system should also work.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from Debian repositories (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# Install OpenOCD from Debian repositories &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install openocd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from master branch (i.MX6 ULL) ===&lt;br /&gt;
# Install needed libraries and tools &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install git build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev libftdi-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
# Clone git repository to local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;git clone https://repo.or.cz/openocd.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# Prepare source directory and submodules (when building from the git repository) &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
# Generate the Makefiles to build OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt;&lt;br /&gt;
# Build OpenOCD from source &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install OpenOCD to /usr/local &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot Programming ==&lt;br /&gt;
There are two ways for doing this.&lt;br /&gt;
The easy way is an automatic bash script, which handles all the commands needed for the programming process.&lt;br /&gt;
In this case you need a specified folder-structure so that the automatic script can find all its needed files.&lt;br /&gt;
The other one is to type in the required commands. In a few cases the bash script fails then you need to go the other way and program the U-Boot manually.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
==== Get the needed recovery files ====&lt;br /&gt;
# Download the needed files [[media:2019-10-08_imx6_U-Boot_recovery.tar.gz|2019-10-08_imx6_U-Boot_recovery.tar.gz]] &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;wget https://www.dropbox.com/s/l6139yluoqrj76x/2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Extract the files in a local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;tar xf 2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change working directory to the extracted one &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd 2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Connect JTAG adapter ====&lt;br /&gt;
# Connect the JTAG adapter with your PC and the Debian VM (Player - Removeable Devices) through USB&lt;br /&gt;
# Connect the JTAG interface via the DHCOM JTAG adapter to the i.MX6 module (If you don&#039;t have a JTAG adapter, please ask DH electronics)&lt;br /&gt;
#:[[File:JTAG-connection.jpeg|1000px]]&lt;br /&gt;
# Connect the board with a serial port: [https://wiki.dh-electronics.com/index.php?title=COM_iMX6_Bootloader_U-Boot#Enter_Bootloader_Console Enter Bootloader Console]&lt;br /&gt;
&lt;br /&gt;
=== Start up OpenOCD ===&lt;br /&gt;
# Ensure you have everything properly connected like in [[#Connect JTAG adapter|Connect JTAG adapter]]&lt;br /&gt;
# Power up the i.MX6 board and have a look at the serial output (serial port). There must be no output (no U-Boot starting) else go to [[#Trouble shooting|Trouble shooting]]&lt;br /&gt;
# Open a new terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start OpenOCD depending on your hardware&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/imx6.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f imx6ull.cfg -f target/imx6ul.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Open On-Chip Debugger 0.10.0+dev-00935-g31100927 (2019-10-01-12:14)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
0x088c101d&lt;br /&gt;
Info : auto-selecting first available session transport &amp;quot;jtag&amp;quot;. To override use &#039;transport select &amp;lt;transport&amp;gt;&#039;.&lt;br /&gt;
Warn : imx6ull.sdma: nonstandard IR value&lt;br /&gt;
2182283264&lt;br /&gt;
imx6_dummy_init&lt;br /&gt;
Info : Listening on port 6666 for tcl connections&lt;br /&gt;
Info : Listening on port 4444 for telnet connections&lt;br /&gt;
Info : clock speed 1000 kHz&lt;br /&gt;
Info : JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
Info : TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
Info : JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
Info : imx6ull.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;
Info : Listening on port 3333 for gdb connections&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Execute the automated bash script with arguments depending on your hardware (the second argument is optional)&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6qdl /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6ull /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of the script should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Programming: u-boot-with-spl-imx6ull.imx to imx6ull&lt;br /&gt;
Trying ::1...&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
Escape character is &#039;^]&#039;.&lt;br /&gt;
Open On-Chip Debugger&lt;br /&gt;
&amp;gt; reset&lt;br /&gt;
JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
imx6ull.cpu: MPIDR level2 0, cluster 0, core 0, multi core, no SMT&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f76&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f74&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-spl-prog-imx6ull.bin 0x908000&lt;br /&gt;
45056 bytes written at address 0x00908000&lt;br /&gt;
downloaded 45056 bytes in 1.610037s (27.329 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume 0x00908000&lt;br /&gt;
&amp;gt; halt&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x800001f3 pc: 0x00908934&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-with-spl-imx6ull.imx 0x82000000&lt;br /&gt;
451456 bytes written at address 0x82000000&lt;br /&gt;
downloaded 451456 bytes in 15.305990s (28.804 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
&amp;gt; Connection closed by foreign host.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of serial console should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
U-Boot SPL 2018.05-DH_v0.19_emmc-00102-gc8e3c3df13 (Oct 01 2019 - 16:12:44 +0200)&lt;br /&gt;
DRAM: Auto calibration...successful&lt;br /&gt;
SPL: Unsupported Boot Device!&lt;br /&gt;
SPL: failed to boot from all boot devices&lt;br /&gt;
### ERROR ### Please RESET the board ###&lt;br /&gt;
Searching for IVT header at DDR address 0x82000000&lt;br /&gt;
.....&lt;br /&gt;
Found IVT header&lt;br /&gt;
Probing SPI flash... ok&lt;br /&gt;
Erasing... ok&lt;br /&gt;
Programming... ok&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If some error occures you can try the Manual Programming method below&lt;br /&gt;
&lt;br /&gt;
=== Manual Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open a telnet session to OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;telnet localhost 4444&amp;lt;/code&amp;gt;&lt;br /&gt;
## Reset and halt the device &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;reset&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load modified U-Boot SPL as flash programmer in SRAM (device dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6qdl.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6ull.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution at entry point of loaded U-Boot SPL &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume 0x00908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Halt code execution if you see &#039;&#039;&#039;Searching for IVT header at DDR address 0xX2000000&#039;&#039;&#039; in serial console &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;halt&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load desired U-Boot image into RAM (device and customer dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6qdl.imx 0x12000000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6ull.imx 0x82000000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution after U-Boot image is in RAM&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume&amp;lt;/code&amp;gt;&lt;br /&gt;
## Wait until the serial output looks like in [[#Automated Programming|Automated Programming]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If there is a U-Boot starting, the OpenOCD procedure may not work properly.&lt;br /&gt;
There are two solutions to prevent the start of U-Boot from the SPI-NOR-Flash.&lt;br /&gt;
&lt;br /&gt;
=== SDP Boot (i.MX6 ULL) ===&lt;br /&gt;
# Boot in Serial Download Mode to prevent booting the broken U-Boot from SPI-NOR-Flash&lt;br /&gt;
## Hold the button for sdp boot mode on the SODIMM-200-Module (DHCOM) next to the BGA-Module (DHCOR)&lt;br /&gt;
##:[[File:DHCOR_i.MX6ULL_SDP-Boot.jpg|400px]]&lt;br /&gt;
## Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&lt;br /&gt;
## Release the button for sdp boot mode&lt;br /&gt;
# Go on with your procedure&lt;br /&gt;
&lt;br /&gt;
=== Delete U-Boot (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;sf erase 0x0 0xf0000&amp;lt;/code&amp;gt;&lt;br /&gt;
# Restart the board&lt;br /&gt;
# Go on with your procedure&lt;/div&gt;</summary>
		<author><name>Sdaxenberger</name></author>
	</entry>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2539</id>
		<title>U-Boot recovery for i.MX6 Q/D/DL/S/ULL via JTAG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2539"/>
		<updated>2019-10-08T17:20:05Z</updated>

		<summary type="html">&lt;p&gt;Sdaxenberger: /* Automated Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Technically all JTAG adapter listed by OpenOCD should work, but DH electronics recommends the [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
All tests and documents were made in use of this one.&lt;br /&gt;
&lt;br /&gt;
== Required Hardware ==&lt;br /&gt;
* JTAG Debugger: [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
* DHCOM JTAG adapter for FFC connection: Article number FD00037&lt;br /&gt;
:[[File:JTAG-Adapter.jpeg|300px]]&lt;br /&gt;
* Wuerth FFC cable: [http://katalog.we-online.de/de/em/FFC_0_50_TYPE_1_6876XXXXX002 687610050002]&lt;br /&gt;
:Note: One cable is included with the DHCOM JTAG adapter.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
This installation was made on the [[Virtual Machine for Application Development]].&lt;br /&gt;
All console expressions refer to this Debian system, but any other debian based system should also work.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from Debian repositories (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# Install OpenOCD from Debian repositories &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install openocd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from master branch (i.MX6 ULL) ===&lt;br /&gt;
# Install needed libraries and tools &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install git build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev libftdi-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
# Clone git repository to local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;git clone https://repo.or.cz/openocd.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# Prepare source directory and submodules (when building from the git repository) &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
# Generate the Makefiles to build OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt;&lt;br /&gt;
# Build OpenOCD from source &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install OpenOCD to /usr/local &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot Programming ==&lt;br /&gt;
There are two ways for doing this.&lt;br /&gt;
The easy way is an automatic bash script, which handles all the commands needed for the programming process.&lt;br /&gt;
In this case you need a specified folder-structure so that the automatic script can find all its needed files.&lt;br /&gt;
The other one is to type in the required commands. In a few cases the bash script fails then you need to go the other way and program the U-Boot manually.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
==== Get the needed recovery files ====&lt;br /&gt;
# Download the needed files [[media:2019-10-08_imx6_U-Boot_recovery.tar.gz|2019-10-08_imx6_U-Boot_recovery.tar.gz]] &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;wget https://www.dropbox.com/s/l6139yluoqrj76x/2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Extract the files in a local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;tar xf 2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change working directory to the extracted one &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd 2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Connect JTAG adapter ====&lt;br /&gt;
# Connect the JTAG adapter with your PC and the Debian VM (Player - Removeable Devices) through USB&lt;br /&gt;
# Connect the JTAG interface via the DHCOM JTAG adapter to the i.MX6 module (If you don&#039;t have a JTAG adapter, please ask DH electronics)&lt;br /&gt;
#:[[File:JTAG-connection.jpeg|1000px]]&lt;br /&gt;
# Connect the board with a serial port: [https://wiki.dh-electronics.com/index.php?title=COM_iMX6_Bootloader_U-Boot#Enter_Bootloader_Console Enter Bootloader Console]&lt;br /&gt;
&lt;br /&gt;
=== Start up OpenOCD ===&lt;br /&gt;
# Ensure you have everything properly connected like in [[#Connect JTAG adapter|Connect JTAG adapter]]&lt;br /&gt;
# Power up the i.MX6 board and have a look at the serial output (serial port). There must be no output (no U-Boot starting) else go to [[#Trouble shooting|Trouble shooting]]&lt;br /&gt;
# Open a new terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start OpenOCD depending on your hardware&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/imx6.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f imx6ull.cfg -f target/imx6ul.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Open On-Chip Debugger 0.10.0+dev-00935-g31100927 (2019-10-01-12:14)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
0x088c101d&lt;br /&gt;
Info : auto-selecting first available session transport &amp;quot;jtag&amp;quot;. To override use &#039;transport select &amp;lt;transport&amp;gt;&#039;.&lt;br /&gt;
Warn : imx6ull.sdma: nonstandard IR value&lt;br /&gt;
2182283264&lt;br /&gt;
imx6_dummy_init&lt;br /&gt;
Info : Listening on port 6666 for tcl connections&lt;br /&gt;
Info : Listening on port 4444 for telnet connections&lt;br /&gt;
Info : clock speed 1000 kHz&lt;br /&gt;
Info : JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
Info : TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
Info : JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
Info : imx6ull.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;
Info : Listening on port 3333 for gdb connections&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Execute the automated bash script with arguments depending on your hardware (the second argument is optional)&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6qdl /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6ull /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of the script should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Programming: u-boot-with-spl-imx6ull.imx to imx6ull&lt;br /&gt;
Trying ::1...&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
Escape character is &#039;^]&#039;.&lt;br /&gt;
Open On-Chip Debugger&lt;br /&gt;
&amp;gt; reset&lt;br /&gt;
JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
imx6ull.cpu: MPIDR level2 0, cluster 0, core 0, multi core, no SMT&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f76&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f74&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-spl-prog-imx6ull.bin 0x908000&lt;br /&gt;
45056 bytes written at address 0x00908000&lt;br /&gt;
downloaded 45056 bytes in 1.610037s (27.329 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume 0x00908000&lt;br /&gt;
&amp;gt; halt&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x800001f3 pc: 0x00908934&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-with-spl-imx6ull.imx 0x82000000&lt;br /&gt;
451456 bytes written at address 0x82000000&lt;br /&gt;
downloaded 451456 bytes in 15.305990s (28.804 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
&amp;gt; Connection closed by foreign host.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of serial console should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
U-Boot SPL 2018.05-DH_v0.19_emmc-00102-gc8e3c3df13 (Oct 01 2019 - 16:12:44 +0200)&lt;br /&gt;
DRAM: Auto calibration...successful&lt;br /&gt;
SPL: Unsupported Boot Device!&lt;br /&gt;
SPL: failed to boot from all boot devices&lt;br /&gt;
### ERROR ### Please RESET the board ###&lt;br /&gt;
Searching for IVT header at DDR address 0x82000000&lt;br /&gt;
.....&lt;br /&gt;
Found IVT header&lt;br /&gt;
Probing SPI flash... ok&lt;br /&gt;
Erasing... ok&lt;br /&gt;
Programming... ok&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If some error occures you can try the manual programing method below&lt;br /&gt;
&lt;br /&gt;
=== Manual Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open a telnet session to OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;telnet localhost 4444&amp;lt;/code&amp;gt;&lt;br /&gt;
## Reset and halt the device &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;reset&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load modified U-Boot SPL as flash programmer in SRAM (device dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6qdl.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6ull.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution at entry point of loaded U-Boot SPL &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume 0x00908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Halt code execution if you see &#039;&#039;&#039;Searching for IVT header at DDR address 0xX2000000&#039;&#039;&#039; in serial console &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;halt&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load desired U-Boot image into RAM (device and customer dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6qdl.imx 0x12000000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6ull.imx 0x82000000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution after U-Boot image is in RAM&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume&amp;lt;/code&amp;gt;&lt;br /&gt;
## Wait until the serial output looks like in [[#Automated Programming|Automated Programming]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If there is a U-Boot starting, the OpenOCD procedure may not work properly.&lt;br /&gt;
There are two solutions to prevent the start of U-Boot from the SPI-NOR-Flash.&lt;br /&gt;
&lt;br /&gt;
=== SDP Boot (i.MX6 ULL) ===&lt;br /&gt;
# Boot in Serial Download Mode to prevent booting the broken U-Boot from SPI-NOR-Flash&lt;br /&gt;
## Hold the button for sdp boot mode on the SODIMM-200-Module (DHCOM) next to the BGA-Module (DHCOR)&lt;br /&gt;
##:[[File:DHCOR_i.MX6ULL_SDP-Boot.jpg|400px]]&lt;br /&gt;
## Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&lt;br /&gt;
## Release the button for sdp boot mode&lt;br /&gt;
# Go on with your procedure&lt;br /&gt;
&lt;br /&gt;
=== Delete U-Boot (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;sf erase 0x0 0xf0000&amp;lt;/code&amp;gt;&lt;br /&gt;
# Restart the board&lt;br /&gt;
# Go on with your procedure&lt;/div&gt;</summary>
		<author><name>Sdaxenberger</name></author>
	</entry>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2538</id>
		<title>U-Boot recovery for i.MX6 Q/D/DL/S/ULL via JTAG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2538"/>
		<updated>2019-10-08T17:18:36Z</updated>

		<summary type="html">&lt;p&gt;Sdaxenberger: /* Start up OpenOCD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Technically all JTAG adapter listed by OpenOCD should work, but DH electronics recommends the [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
All tests and documents were made in use of this one.&lt;br /&gt;
&lt;br /&gt;
== Required Hardware ==&lt;br /&gt;
* JTAG Debugger: [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
* DHCOM JTAG adapter for FFC connection: Article number FD00037&lt;br /&gt;
:[[File:JTAG-Adapter.jpeg|300px]]&lt;br /&gt;
* Wuerth FFC cable: [http://katalog.we-online.de/de/em/FFC_0_50_TYPE_1_6876XXXXX002 687610050002]&lt;br /&gt;
:Note: One cable is included with the DHCOM JTAG adapter.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
This installation was made on the [[Virtual Machine for Application Development]].&lt;br /&gt;
All console expressions refer to this Debian system, but any other debian based system should also work.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from Debian repositories (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# Install OpenOCD from Debian repositories &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install openocd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from master branch (i.MX6 ULL) ===&lt;br /&gt;
# Install needed libraries and tools &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install git build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev libftdi-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
# Clone git repository to local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;git clone https://repo.or.cz/openocd.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# Prepare source directory and submodules (when building from the git repository) &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
# Generate the Makefiles to build OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt;&lt;br /&gt;
# Build OpenOCD from source &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install OpenOCD to /usr/local &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot Programming ==&lt;br /&gt;
There are two ways for doing this.&lt;br /&gt;
The easy way is an automatic bash script, which handles all the commands needed for the programming process.&lt;br /&gt;
In this case you need a specified folder-structure so that the automatic script can find all its needed files.&lt;br /&gt;
The other one is to type in the required commands. In a few cases the bash script fails then you need to go the other way and program the U-Boot manually.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
==== Get the needed recovery files ====&lt;br /&gt;
# Download the needed files [[media:2019-10-08_imx6_U-Boot_recovery.tar.gz|2019-10-08_imx6_U-Boot_recovery.tar.gz]] &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;wget https://www.dropbox.com/s/l6139yluoqrj76x/2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Extract the files in a local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;tar xf 2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change working directory to the extracted one &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd 2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Connect JTAG adapter ====&lt;br /&gt;
# Connect the JTAG adapter with your PC and the Debian VM (Player - Removeable Devices) through USB&lt;br /&gt;
# Connect the JTAG interface via the DHCOM JTAG adapter to the i.MX6 module (If you don&#039;t have a JTAG adapter, please ask DH electronics)&lt;br /&gt;
#:[[File:JTAG-connection.jpeg|1000px]]&lt;br /&gt;
# Connect the board with a serial port: [https://wiki.dh-electronics.com/index.php?title=COM_iMX6_Bootloader_U-Boot#Enter_Bootloader_Console Enter Bootloader Console]&lt;br /&gt;
&lt;br /&gt;
=== Start up OpenOCD ===&lt;br /&gt;
# Ensure you have everything properly connected like in [[#Connect JTAG adapter|Connect JTAG adapter]]&lt;br /&gt;
# Power up the i.MX6 board and have a look at the serial output (serial port). There must be no output (no U-Boot starting) else go to [[#Trouble shooting|Trouble shooting]]&lt;br /&gt;
# Open a new terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start OpenOCD depending on your hardware&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/imx6.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f imx6ull.cfg -f target/imx6ul.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Open On-Chip Debugger 0.10.0+dev-00935-g31100927 (2019-10-01-12:14)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
0x088c101d&lt;br /&gt;
Info : auto-selecting first available session transport &amp;quot;jtag&amp;quot;. To override use &#039;transport select &amp;lt;transport&amp;gt;&#039;.&lt;br /&gt;
Warn : imx6ull.sdma: nonstandard IR value&lt;br /&gt;
2182283264&lt;br /&gt;
imx6_dummy_init&lt;br /&gt;
Info : Listening on port 6666 for tcl connections&lt;br /&gt;
Info : Listening on port 4444 for telnet connections&lt;br /&gt;
Info : clock speed 1000 kHz&lt;br /&gt;
Info : JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
Info : TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
Info : JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
Info : imx6ull.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;
Info : Listening on port 3333 for gdb connections&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Execute the automated bash script with arguments depending on your hardware (the second argument is optional)&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6qdl /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6ull /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of the script should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Programming: u-boot-with-spl-imx6ull.imx to imx6ull&lt;br /&gt;
Trying ::1...&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
Escape character is &#039;^]&#039;.&lt;br /&gt;
Open On-Chip Debugger&lt;br /&gt;
&amp;gt; reset&lt;br /&gt;
JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
imx6ull.cpu: MPIDR level2 0, cluster 0, core 0, multi core, no SMT&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f76&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f74&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-spl-prog-imx6ull.bin 0x908000&lt;br /&gt;
45056 bytes written at address 0x00908000&lt;br /&gt;
downloaded 45056 bytes in 1.610037s (27.329 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume 0x00908000&lt;br /&gt;
&amp;gt; halt&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x800001f3 pc: 0x00908934&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-with-spl-imx6ull.imx 0x82000000&lt;br /&gt;
451456 bytes written at address 0x82000000&lt;br /&gt;
downloaded 451456 bytes in 15.305990s (28.804 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
&amp;gt; Connection closed by foreign host.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of serial console should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
U-Boot SPL 2018.05-DH_v0.19_emmc-00102-gc8e3c3df13 (Oct 01 2019 - 16:12:44 +0200)&lt;br /&gt;
DRAM: Auto calibration...successful&lt;br /&gt;
SPL: Unsupported Boot Device!&lt;br /&gt;
SPL: failed to boot from all boot devices&lt;br /&gt;
### ERROR ### Please RESET the board ###&lt;br /&gt;
Searching for IVT header at DDR address 0x82000000&lt;br /&gt;
.....&lt;br /&gt;
Found IVT header&lt;br /&gt;
Probing SPI flash... ok&lt;br /&gt;
Erasing... ok&lt;br /&gt;
Programming... ok&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If some error occures you can try the Manual Programing method below&lt;br /&gt;
&lt;br /&gt;
=== Manual Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open a telnet session to OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;telnet localhost 4444&amp;lt;/code&amp;gt;&lt;br /&gt;
## Reset and halt the device &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;reset&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load modified U-Boot SPL as flash programmer in SRAM (device dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6qdl.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6ull.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution at entry point of loaded U-Boot SPL &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume 0x00908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Halt code execution if you see &#039;&#039;&#039;Searching for IVT header at DDR address 0xX2000000&#039;&#039;&#039; in serial console &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;halt&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load desired U-Boot image into RAM (device and customer dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6qdl.imx 0x12000000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6ull.imx 0x82000000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution after U-Boot image is in RAM&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume&amp;lt;/code&amp;gt;&lt;br /&gt;
## Wait until the serial output looks like in [[#Automated Programming|Automated Programming]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If there is a U-Boot starting, the OpenOCD procedure may not work properly.&lt;br /&gt;
There are two solutions to prevent the start of U-Boot from the SPI-NOR-Flash.&lt;br /&gt;
&lt;br /&gt;
=== SDP Boot (i.MX6 ULL) ===&lt;br /&gt;
# Boot in Serial Download Mode to prevent booting the broken U-Boot from SPI-NOR-Flash&lt;br /&gt;
## Hold the button for sdp boot mode on the SODIMM-200-Module (DHCOM) next to the BGA-Module (DHCOR)&lt;br /&gt;
##:[[File:DHCOR_i.MX6ULL_SDP-Boot.jpg|400px]]&lt;br /&gt;
## Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&lt;br /&gt;
## Release the button for sdp boot mode&lt;br /&gt;
# Go on with your procedure&lt;br /&gt;
&lt;br /&gt;
=== Delete U-Boot (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;sf erase 0x0 0xf0000&amp;lt;/code&amp;gt;&lt;br /&gt;
# Restart the board&lt;br /&gt;
# Go on with your procedure&lt;/div&gt;</summary>
		<author><name>Sdaxenberger</name></author>
	</entry>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2537</id>
		<title>U-Boot recovery for i.MX6 Q/D/DL/S/ULL via JTAG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2537"/>
		<updated>2019-10-08T17:18:11Z</updated>

		<summary type="html">&lt;p&gt;Sdaxenberger: /* Start up OpenOCD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Technically all JTAG adapter listed by OpenOCD should work, but DH electronics recommends the [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
All tests and documents were made in use of this one.&lt;br /&gt;
&lt;br /&gt;
== Required Hardware ==&lt;br /&gt;
* JTAG Debugger: [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
* DHCOM JTAG adapter for FFC connection: Article number FD00037&lt;br /&gt;
:[[File:JTAG-Adapter.jpeg|300px]]&lt;br /&gt;
* Wuerth FFC cable: [http://katalog.we-online.de/de/em/FFC_0_50_TYPE_1_6876XXXXX002 687610050002]&lt;br /&gt;
:Note: One cable is included with the DHCOM JTAG adapter.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
This installation was made on the [[Virtual Machine for Application Development]].&lt;br /&gt;
All console expressions refer to this Debian system, but any other debian based system should also work.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from Debian repositories (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# Install OpenOCD from Debian repositories &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install openocd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from master branch (i.MX6 ULL) ===&lt;br /&gt;
# Install needed libraries and tools &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install git build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev libftdi-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
# Clone git repository to local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;git clone https://repo.or.cz/openocd.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# Prepare source directory and submodules (when building from the git repository) &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
# Generate the Makefiles to build OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt;&lt;br /&gt;
# Build OpenOCD from source &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install OpenOCD to /usr/local &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot Programming ==&lt;br /&gt;
There are two ways for doing this.&lt;br /&gt;
The easy way is an automatic bash script, which handles all the commands needed for the programming process.&lt;br /&gt;
In this case you need a specified folder-structure so that the automatic script can find all its needed files.&lt;br /&gt;
The other one is to type in the required commands. In a few cases the bash script fails then you need to go the other way and program the U-Boot manually.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
==== Get the needed recovery files ====&lt;br /&gt;
# Download the needed files [[media:2019-10-08_imx6_U-Boot_recovery.tar.gz|2019-10-08_imx6_U-Boot_recovery.tar.gz]] &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;wget https://www.dropbox.com/s/l6139yluoqrj76x/2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Extract the files in a local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;tar xf 2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change working directory to the extracted one &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd 2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Connect JTAG adapter ====&lt;br /&gt;
# Connect the JTAG adapter with your PC and the Debian VM (Player - Removeable Devices) through USB&lt;br /&gt;
# Connect the JTAG interface via the DHCOM JTAG adapter to the i.MX6 module (If you don&#039;t have a JTAG adapter, please ask DH electronics)&lt;br /&gt;
#:[[File:JTAG-connection.jpeg|1000px]]&lt;br /&gt;
# Connect the board with a serial port: [https://wiki.dh-electronics.com/index.php?title=COM_iMX6_Bootloader_U-Boot#Enter_Bootloader_Console Enter Bootloader Console]&lt;br /&gt;
&lt;br /&gt;
=== Start up OpenOCD ===&lt;br /&gt;
# Ensure you have everything properly connected like in [[#Connect JTAG adapter|Connect JTAG-Adapter]]&lt;br /&gt;
# Power up the i.MX6 board and have a look at the serial output (serial port). There must be no output (no U-Boot starting) else go to [[#Trouble shooting|Trouble shooting]]&lt;br /&gt;
# Open a new terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start OpenOCD depending on your hardware&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/imx6.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f imx6ull.cfg -f target/imx6ul.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Open On-Chip Debugger 0.10.0+dev-00935-g31100927 (2019-10-01-12:14)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
0x088c101d&lt;br /&gt;
Info : auto-selecting first available session transport &amp;quot;jtag&amp;quot;. To override use &#039;transport select &amp;lt;transport&amp;gt;&#039;.&lt;br /&gt;
Warn : imx6ull.sdma: nonstandard IR value&lt;br /&gt;
2182283264&lt;br /&gt;
imx6_dummy_init&lt;br /&gt;
Info : Listening on port 6666 for tcl connections&lt;br /&gt;
Info : Listening on port 4444 for telnet connections&lt;br /&gt;
Info : clock speed 1000 kHz&lt;br /&gt;
Info : JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
Info : TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
Info : JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
Info : imx6ull.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;
Info : Listening on port 3333 for gdb connections&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Execute the automated bash script with arguments depending on your hardware (the second argument is optional)&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6qdl /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6ull /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of the script should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Programming: u-boot-with-spl-imx6ull.imx to imx6ull&lt;br /&gt;
Trying ::1...&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
Escape character is &#039;^]&#039;.&lt;br /&gt;
Open On-Chip Debugger&lt;br /&gt;
&amp;gt; reset&lt;br /&gt;
JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
imx6ull.cpu: MPIDR level2 0, cluster 0, core 0, multi core, no SMT&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f76&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f74&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-spl-prog-imx6ull.bin 0x908000&lt;br /&gt;
45056 bytes written at address 0x00908000&lt;br /&gt;
downloaded 45056 bytes in 1.610037s (27.329 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume 0x00908000&lt;br /&gt;
&amp;gt; halt&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x800001f3 pc: 0x00908934&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-with-spl-imx6ull.imx 0x82000000&lt;br /&gt;
451456 bytes written at address 0x82000000&lt;br /&gt;
downloaded 451456 bytes in 15.305990s (28.804 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
&amp;gt; Connection closed by foreign host.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of serial console should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
U-Boot SPL 2018.05-DH_v0.19_emmc-00102-gc8e3c3df13 (Oct 01 2019 - 16:12:44 +0200)&lt;br /&gt;
DRAM: Auto calibration...successful&lt;br /&gt;
SPL: Unsupported Boot Device!&lt;br /&gt;
SPL: failed to boot from all boot devices&lt;br /&gt;
### ERROR ### Please RESET the board ###&lt;br /&gt;
Searching for IVT header at DDR address 0x82000000&lt;br /&gt;
.....&lt;br /&gt;
Found IVT header&lt;br /&gt;
Probing SPI flash... ok&lt;br /&gt;
Erasing... ok&lt;br /&gt;
Programming... ok&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If some error occures you can try the Manual Programing method below&lt;br /&gt;
&lt;br /&gt;
=== Manual Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open a telnet session to OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;telnet localhost 4444&amp;lt;/code&amp;gt;&lt;br /&gt;
## Reset and halt the device &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;reset&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load modified U-Boot SPL as flash programmer in SRAM (device dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6qdl.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6ull.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution at entry point of loaded U-Boot SPL &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume 0x00908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Halt code execution if you see &#039;&#039;&#039;Searching for IVT header at DDR address 0xX2000000&#039;&#039;&#039; in serial console &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;halt&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load desired U-Boot image into RAM (device and customer dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6qdl.imx 0x12000000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6ull.imx 0x82000000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution after U-Boot image is in RAM&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume&amp;lt;/code&amp;gt;&lt;br /&gt;
## Wait until the serial output looks like in [[#Automated Programming|Automated Programming]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If there is a U-Boot starting, the OpenOCD procedure may not work properly.&lt;br /&gt;
There are two solutions to prevent the start of U-Boot from the SPI-NOR-Flash.&lt;br /&gt;
&lt;br /&gt;
=== SDP Boot (i.MX6 ULL) ===&lt;br /&gt;
# Boot in Serial Download Mode to prevent booting the broken U-Boot from SPI-NOR-Flash&lt;br /&gt;
## Hold the button for sdp boot mode on the SODIMM-200-Module (DHCOM) next to the BGA-Module (DHCOR)&lt;br /&gt;
##:[[File:DHCOR_i.MX6ULL_SDP-Boot.jpg|400px]]&lt;br /&gt;
## Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&lt;br /&gt;
## Release the button for sdp boot mode&lt;br /&gt;
# Go on with your procedure&lt;br /&gt;
&lt;br /&gt;
=== Delete U-Boot (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;sf erase 0x0 0xf0000&amp;lt;/code&amp;gt;&lt;br /&gt;
# Restart the board&lt;br /&gt;
# Go on with your procedure&lt;/div&gt;</summary>
		<author><name>Sdaxenberger</name></author>
	</entry>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2536</id>
		<title>U-Boot recovery for i.MX6 Q/D/DL/S/ULL via JTAG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2536"/>
		<updated>2019-10-08T17:17:17Z</updated>

		<summary type="html">&lt;p&gt;Sdaxenberger: /* Connect JTAG adapter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Technically all JTAG adapter listed by OpenOCD should work, but DH electronics recommends the [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
All tests and documents were made in use of this one.&lt;br /&gt;
&lt;br /&gt;
== Required Hardware ==&lt;br /&gt;
* JTAG Debugger: [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
* DHCOM JTAG adapter for FFC connection: Article number FD00037&lt;br /&gt;
:[[File:JTAG-Adapter.jpeg|300px]]&lt;br /&gt;
* Wuerth FFC cable: [http://katalog.we-online.de/de/em/FFC_0_50_TYPE_1_6876XXXXX002 687610050002]&lt;br /&gt;
:Note: One cable is included with the DHCOM JTAG adapter.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
This installation was made on the [[Virtual Machine for Application Development]].&lt;br /&gt;
All console expressions refer to this Debian system, but any other debian based system should also work.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from Debian repositories (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# Install OpenOCD from Debian repositories &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install openocd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from master branch (i.MX6 ULL) ===&lt;br /&gt;
# Install needed libraries and tools &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install git build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev libftdi-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
# Clone git repository to local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;git clone https://repo.or.cz/openocd.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# Prepare source directory and submodules (when building from the git repository) &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
# Generate the Makefiles to build OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt;&lt;br /&gt;
# Build OpenOCD from source &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install OpenOCD to /usr/local &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot Programming ==&lt;br /&gt;
There are two ways for doing this.&lt;br /&gt;
The easy way is an automatic bash script, which handles all the commands needed for the programming process.&lt;br /&gt;
In this case you need a specified folder-structure so that the automatic script can find all its needed files.&lt;br /&gt;
The other one is to type in the required commands. In a few cases the bash script fails then you need to go the other way and program the U-Boot manually.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
==== Get the needed recovery files ====&lt;br /&gt;
# Download the needed files [[media:2019-10-08_imx6_U-Boot_recovery.tar.gz|2019-10-08_imx6_U-Boot_recovery.tar.gz]] &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;wget https://www.dropbox.com/s/l6139yluoqrj76x/2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Extract the files in a local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;tar xf 2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change working directory to the extracted one &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd 2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Connect JTAG adapter ====&lt;br /&gt;
# Connect the JTAG adapter with your PC and the Debian VM (Player - Removeable Devices) through USB&lt;br /&gt;
# Connect the JTAG interface via the DHCOM JTAG adapter to the i.MX6 module (If you don&#039;t have a JTAG adapter, please ask DH electronics)&lt;br /&gt;
#:[[File:JTAG-connection.jpeg|1000px]]&lt;br /&gt;
# Connect the board with a serial port: [https://wiki.dh-electronics.com/index.php?title=COM_iMX6_Bootloader_U-Boot#Enter_Bootloader_Console Enter Bootloader Console]&lt;br /&gt;
&lt;br /&gt;
=== Start up OpenOCD ===&lt;br /&gt;
# Ensure you have everything properly connected like in [[#Connect JTAG-Adapter|Connect JTAG-Adapter]]&lt;br /&gt;
# Power up the i.MX6 board and have a look at the serial output (serial port). There must be no output (no U-Boot starting) else go to [[#Trouble shooting|Trouble shooting]]&lt;br /&gt;
# Open a new terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start OpenOCD depending on your hardware&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/imx6.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f imx6ull.cfg -f target/imx6ul.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Open On-Chip Debugger 0.10.0+dev-00935-g31100927 (2019-10-01-12:14)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
0x088c101d&lt;br /&gt;
Info : auto-selecting first available session transport &amp;quot;jtag&amp;quot;. To override use &#039;transport select &amp;lt;transport&amp;gt;&#039;.&lt;br /&gt;
Warn : imx6ull.sdma: nonstandard IR value&lt;br /&gt;
2182283264&lt;br /&gt;
imx6_dummy_init&lt;br /&gt;
Info : Listening on port 6666 for tcl connections&lt;br /&gt;
Info : Listening on port 4444 for telnet connections&lt;br /&gt;
Info : clock speed 1000 kHz&lt;br /&gt;
Info : JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
Info : TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
Info : JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
Info : imx6ull.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;
Info : Listening on port 3333 for gdb connections&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Execute the automated bash script with arguments depending on your hardware (the second argument is optional)&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6qdl /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6ull /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of the script should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Programming: u-boot-with-spl-imx6ull.imx to imx6ull&lt;br /&gt;
Trying ::1...&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
Escape character is &#039;^]&#039;.&lt;br /&gt;
Open On-Chip Debugger&lt;br /&gt;
&amp;gt; reset&lt;br /&gt;
JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
imx6ull.cpu: MPIDR level2 0, cluster 0, core 0, multi core, no SMT&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f76&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f74&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-spl-prog-imx6ull.bin 0x908000&lt;br /&gt;
45056 bytes written at address 0x00908000&lt;br /&gt;
downloaded 45056 bytes in 1.610037s (27.329 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume 0x00908000&lt;br /&gt;
&amp;gt; halt&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x800001f3 pc: 0x00908934&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-with-spl-imx6ull.imx 0x82000000&lt;br /&gt;
451456 bytes written at address 0x82000000&lt;br /&gt;
downloaded 451456 bytes in 15.305990s (28.804 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
&amp;gt; Connection closed by foreign host.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of serial console should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
U-Boot SPL 2018.05-DH_v0.19_emmc-00102-gc8e3c3df13 (Oct 01 2019 - 16:12:44 +0200)&lt;br /&gt;
DRAM: Auto calibration...successful&lt;br /&gt;
SPL: Unsupported Boot Device!&lt;br /&gt;
SPL: failed to boot from all boot devices&lt;br /&gt;
### ERROR ### Please RESET the board ###&lt;br /&gt;
Searching for IVT header at DDR address 0x82000000&lt;br /&gt;
.....&lt;br /&gt;
Found IVT header&lt;br /&gt;
Probing SPI flash... ok&lt;br /&gt;
Erasing... ok&lt;br /&gt;
Programming... ok&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If some error occures you can try the Manual Programing method below&lt;br /&gt;
&lt;br /&gt;
=== Manual Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open a telnet session to OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;telnet localhost 4444&amp;lt;/code&amp;gt;&lt;br /&gt;
## Reset and halt the device &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;reset&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load modified U-Boot SPL as flash programmer in SRAM (device dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6qdl.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6ull.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution at entry point of loaded U-Boot SPL &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume 0x00908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Halt code execution if you see &#039;&#039;&#039;Searching for IVT header at DDR address 0xX2000000&#039;&#039;&#039; in serial console &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;halt&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load desired U-Boot image into RAM (device and customer dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6qdl.imx 0x12000000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6ull.imx 0x82000000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution after U-Boot image is in RAM&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume&amp;lt;/code&amp;gt;&lt;br /&gt;
## Wait until the serial output looks like in [[#Automated Programming|Automated Programming]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If there is a U-Boot starting, the OpenOCD procedure may not work properly.&lt;br /&gt;
There are two solutions to prevent the start of U-Boot from the SPI-NOR-Flash.&lt;br /&gt;
&lt;br /&gt;
=== SDP Boot (i.MX6 ULL) ===&lt;br /&gt;
# Boot in Serial Download Mode to prevent booting the broken U-Boot from SPI-NOR-Flash&lt;br /&gt;
## Hold the button for sdp boot mode on the SODIMM-200-Module (DHCOM) next to the BGA-Module (DHCOR)&lt;br /&gt;
##:[[File:DHCOR_i.MX6ULL_SDP-Boot.jpg|400px]]&lt;br /&gt;
## Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&lt;br /&gt;
## Release the button for sdp boot mode&lt;br /&gt;
# Go on with your procedure&lt;br /&gt;
&lt;br /&gt;
=== Delete U-Boot (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;sf erase 0x0 0xf0000&amp;lt;/code&amp;gt;&lt;br /&gt;
# Restart the board&lt;br /&gt;
# Go on with your procedure&lt;/div&gt;</summary>
		<author><name>Sdaxenberger</name></author>
	</entry>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2535</id>
		<title>U-Boot recovery for i.MX6 Q/D/DL/S/ULL via JTAG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2535"/>
		<updated>2019-10-08T17:16:59Z</updated>

		<summary type="html">&lt;p&gt;Sdaxenberger: /* Connect JTAG-Adapter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Technically all JTAG adapter listed by OpenOCD should work, but DH electronics recommends the [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
All tests and documents were made in use of this one.&lt;br /&gt;
&lt;br /&gt;
== Required Hardware ==&lt;br /&gt;
* JTAG Debugger: [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
* DHCOM JTAG adapter for FFC connection: Article number FD00037&lt;br /&gt;
:[[File:JTAG-Adapter.jpeg|300px]]&lt;br /&gt;
* Wuerth FFC cable: [http://katalog.we-online.de/de/em/FFC_0_50_TYPE_1_6876XXXXX002 687610050002]&lt;br /&gt;
:Note: One cable is included with the DHCOM JTAG adapter.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
This installation was made on the [[Virtual Machine for Application Development]].&lt;br /&gt;
All console expressions refer to this Debian system, but any other debian based system should also work.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from Debian repositories (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# Install OpenOCD from Debian repositories &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install openocd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from master branch (i.MX6 ULL) ===&lt;br /&gt;
# Install needed libraries and tools &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install git build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev libftdi-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
# Clone git repository to local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;git clone https://repo.or.cz/openocd.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# Prepare source directory and submodules (when building from the git repository) &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
# Generate the Makefiles to build OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt;&lt;br /&gt;
# Build OpenOCD from source &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install OpenOCD to /usr/local &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot Programming ==&lt;br /&gt;
There are two ways for doing this.&lt;br /&gt;
The easy way is an automatic bash script, which handles all the commands needed for the programming process.&lt;br /&gt;
In this case you need a specified folder-structure so that the automatic script can find all its needed files.&lt;br /&gt;
The other one is to type in the required commands. In a few cases the bash script fails then you need to go the other way and program the U-Boot manually.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
==== Get the needed recovery files ====&lt;br /&gt;
# Download the needed files [[media:2019-10-08_imx6_U-Boot_recovery.tar.gz|2019-10-08_imx6_U-Boot_recovery.tar.gz]] &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;wget https://www.dropbox.com/s/l6139yluoqrj76x/2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Extract the files in a local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;tar xf 2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change working directory to the extracted one &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd 2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Connect JTAG adapter ====&lt;br /&gt;
# Connect the JTAG-Adapter with your PC and the Debian VM (Player - Removeable Devices) through USB&lt;br /&gt;
# Connect the JTAG-Interface via the DHCOM JTAG adapter to the i.MX6 module (If you don&#039;t have a JTAG adapter, please ask DH electronics)&lt;br /&gt;
#:[[File:JTAG-connection.jpeg|1000px]]&lt;br /&gt;
# Connect the board with a serial port: [https://wiki.dh-electronics.com/index.php?title=COM_iMX6_Bootloader_U-Boot#Enter_Bootloader_Console Enter Bootloader Console]&lt;br /&gt;
&lt;br /&gt;
=== Start up OpenOCD ===&lt;br /&gt;
# Ensure you have everything properly connected like in [[#Connect JTAG-Adapter|Connect JTAG-Adapter]]&lt;br /&gt;
# Power up the i.MX6 board and have a look at the serial output (serial port). There must be no output (no U-Boot starting) else go to [[#Trouble shooting|Trouble shooting]]&lt;br /&gt;
# Open a new terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start OpenOCD depending on your hardware&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/imx6.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f imx6ull.cfg -f target/imx6ul.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Open On-Chip Debugger 0.10.0+dev-00935-g31100927 (2019-10-01-12:14)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
0x088c101d&lt;br /&gt;
Info : auto-selecting first available session transport &amp;quot;jtag&amp;quot;. To override use &#039;transport select &amp;lt;transport&amp;gt;&#039;.&lt;br /&gt;
Warn : imx6ull.sdma: nonstandard IR value&lt;br /&gt;
2182283264&lt;br /&gt;
imx6_dummy_init&lt;br /&gt;
Info : Listening on port 6666 for tcl connections&lt;br /&gt;
Info : Listening on port 4444 for telnet connections&lt;br /&gt;
Info : clock speed 1000 kHz&lt;br /&gt;
Info : JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
Info : TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
Info : JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
Info : imx6ull.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;
Info : Listening on port 3333 for gdb connections&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Execute the automated bash script with arguments depending on your hardware (the second argument is optional)&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6qdl /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6ull /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of the script should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Programming: u-boot-with-spl-imx6ull.imx to imx6ull&lt;br /&gt;
Trying ::1...&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
Escape character is &#039;^]&#039;.&lt;br /&gt;
Open On-Chip Debugger&lt;br /&gt;
&amp;gt; reset&lt;br /&gt;
JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
imx6ull.cpu: MPIDR level2 0, cluster 0, core 0, multi core, no SMT&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f76&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f74&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-spl-prog-imx6ull.bin 0x908000&lt;br /&gt;
45056 bytes written at address 0x00908000&lt;br /&gt;
downloaded 45056 bytes in 1.610037s (27.329 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume 0x00908000&lt;br /&gt;
&amp;gt; halt&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x800001f3 pc: 0x00908934&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-with-spl-imx6ull.imx 0x82000000&lt;br /&gt;
451456 bytes written at address 0x82000000&lt;br /&gt;
downloaded 451456 bytes in 15.305990s (28.804 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
&amp;gt; Connection closed by foreign host.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of serial console should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
U-Boot SPL 2018.05-DH_v0.19_emmc-00102-gc8e3c3df13 (Oct 01 2019 - 16:12:44 +0200)&lt;br /&gt;
DRAM: Auto calibration...successful&lt;br /&gt;
SPL: Unsupported Boot Device!&lt;br /&gt;
SPL: failed to boot from all boot devices&lt;br /&gt;
### ERROR ### Please RESET the board ###&lt;br /&gt;
Searching for IVT header at DDR address 0x82000000&lt;br /&gt;
.....&lt;br /&gt;
Found IVT header&lt;br /&gt;
Probing SPI flash... ok&lt;br /&gt;
Erasing... ok&lt;br /&gt;
Programming... ok&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If some error occures you can try the Manual Programing method below&lt;br /&gt;
&lt;br /&gt;
=== Manual Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open a telnet session to OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;telnet localhost 4444&amp;lt;/code&amp;gt;&lt;br /&gt;
## Reset and halt the device &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;reset&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load modified U-Boot SPL as flash programmer in SRAM (device dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6qdl.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6ull.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution at entry point of loaded U-Boot SPL &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume 0x00908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Halt code execution if you see &#039;&#039;&#039;Searching for IVT header at DDR address 0xX2000000&#039;&#039;&#039; in serial console &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;halt&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load desired U-Boot image into RAM (device and customer dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6qdl.imx 0x12000000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6ull.imx 0x82000000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution after U-Boot image is in RAM&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume&amp;lt;/code&amp;gt;&lt;br /&gt;
## Wait until the serial output looks like in [[#Automated Programming|Automated Programming]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If there is a U-Boot starting, the OpenOCD procedure may not work properly.&lt;br /&gt;
There are two solutions to prevent the start of U-Boot from the SPI-NOR-Flash.&lt;br /&gt;
&lt;br /&gt;
=== SDP Boot (i.MX6 ULL) ===&lt;br /&gt;
# Boot in Serial Download Mode to prevent booting the broken U-Boot from SPI-NOR-Flash&lt;br /&gt;
## Hold the button for sdp boot mode on the SODIMM-200-Module (DHCOM) next to the BGA-Module (DHCOR)&lt;br /&gt;
##:[[File:DHCOR_i.MX6ULL_SDP-Boot.jpg|400px]]&lt;br /&gt;
## Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&lt;br /&gt;
## Release the button for sdp boot mode&lt;br /&gt;
# Go on with your procedure&lt;br /&gt;
&lt;br /&gt;
=== Delete U-Boot (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;sf erase 0x0 0xf0000&amp;lt;/code&amp;gt;&lt;br /&gt;
# Restart the board&lt;br /&gt;
# Go on with your procedure&lt;/div&gt;</summary>
		<author><name>Sdaxenberger</name></author>
	</entry>
	<entry>
		<id>https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2534</id>
		<title>U-Boot recovery for i.MX6 Q/D/DL/S/ULL via JTAG</title>
		<link rel="alternate" type="text/html" href="https://wiki.dh-electronics.com/index.php?title=U-Boot_recovery_for_i.MX6_Q/D/DL/S/ULL_via_JTAG&amp;diff=2534"/>
		<updated>2019-10-08T17:15:43Z</updated>

		<summary type="html">&lt;p&gt;Sdaxenberger: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Technically all JTAG adapter listed by OpenOCD should work, but DH electronics recommends the [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
All tests and documents were made in use of this one.&lt;br /&gt;
&lt;br /&gt;
== Required Hardware ==&lt;br /&gt;
* JTAG Debugger: [https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/ Olimex Arm-USB-OCD-Tiny-H.]&lt;br /&gt;
* DHCOM JTAG adapter for FFC connection: Article number FD00037&lt;br /&gt;
:[[File:JTAG-Adapter.jpeg|300px]]&lt;br /&gt;
* Wuerth FFC cable: [http://katalog.we-online.de/de/em/FFC_0_50_TYPE_1_6876XXXXX002 687610050002]&lt;br /&gt;
:Note: One cable is included with the DHCOM JTAG adapter.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
This installation was made on the [[Virtual Machine for Application Development]].&lt;br /&gt;
All console expressions refer to this Debian system, but any other debian based system should also work.&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from Debian repositories (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# Install OpenOCD from Debian repositories &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install openocd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenOCD from master branch (i.MX6 ULL) ===&lt;br /&gt;
# Install needed libraries and tools &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo apt-get install git build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev libftdi-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
# Clone git repository to local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;git clone https://repo.or.cz/openocd.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# Prepare source directory and submodules (when building from the git repository) &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./bootstrap&amp;lt;/code&amp;gt;&lt;br /&gt;
# Generate the Makefiles to build OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt;&lt;br /&gt;
# Build OpenOCD from source &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;make -j4&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install OpenOCD to /usr/local &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== U-Boot Programming ==&lt;br /&gt;
There are two ways for doing this.&lt;br /&gt;
The easy way is an automatic bash script, which handles all the commands needed for the programming process.&lt;br /&gt;
In this case you need a specified folder-structure so that the automatic script can find all its needed files.&lt;br /&gt;
The other one is to type in the required commands. In a few cases the bash script fails then you need to go the other way and program the U-Boot manually.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
==== Get the needed recovery files ====&lt;br /&gt;
# Download the needed files [[media:2019-10-08_imx6_U-Boot_recovery.tar.gz|2019-10-08_imx6_U-Boot_recovery.tar.gz]] &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;wget https://www.dropbox.com/s/l6139yluoqrj76x/2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Extract the files in a local directory &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;tar xf 2019-10-08_imx6_U-Boot_recovery.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change working directory to the extracted one &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd 2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Connect JTAG-Adapter ====&lt;br /&gt;
# Connect the JTAG-Adapter with your PC and the Debian VM (Player - Removeable Devices) through USB&lt;br /&gt;
# Connect the JTAG-Interface via the DHCOM JTAG adapter to the i.MX6 module (If you don&#039;t have a JTAG adapter, please ask DH electronics)&lt;br /&gt;
#:[[File:JTAG-connection.jpeg|1000px]]&lt;br /&gt;
# Connect the board with a serial port: [https://wiki.dh-electronics.com/index.php?title=COM_iMX6_Bootloader_U-Boot#Enter_Bootloader_Console Enter Bootloader Console]&lt;br /&gt;
&lt;br /&gt;
=== Start up OpenOCD ===&lt;br /&gt;
# Ensure you have everything properly connected like in [[#Connect JTAG-Adapter|Connect JTAG-Adapter]]&lt;br /&gt;
# Power up the i.MX6 board and have a look at the serial output (serial port). There must be no output (no U-Boot starting) else go to [[#Trouble shooting|Trouble shooting]]&lt;br /&gt;
# Open a new terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start OpenOCD depending on your hardware&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/imx6.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f imx6ull.cfg -f target/imx6ul.cfg -f dhcom-manual-loaded-code.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Open On-Chip Debugger 0.10.0+dev-00935-g31100927 (2019-10-01-12:14)&lt;br /&gt;
Licensed under GNU GPL v2&lt;br /&gt;
For bug reports, read&lt;br /&gt;
	http://openocd.org/doc/doxygen/bugs.html&lt;br /&gt;
0x088c101d&lt;br /&gt;
Info : auto-selecting first available session transport &amp;quot;jtag&amp;quot;. To override use &#039;transport select &amp;lt;transport&amp;gt;&#039;.&lt;br /&gt;
Warn : imx6ull.sdma: nonstandard IR value&lt;br /&gt;
2182283264&lt;br /&gt;
imx6_dummy_init&lt;br /&gt;
Info : Listening on port 6666 for tcl connections&lt;br /&gt;
Info : Listening on port 4444 for telnet connections&lt;br /&gt;
Info : clock speed 1000 kHz&lt;br /&gt;
Info : JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
Info : TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
Info : JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
Info : imx6ull.cpu: hardware has 6 breakpoints, 4 watchpoints&lt;br /&gt;
Info : Listening on port 3333 for gdb connections&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Execute the automated bash script with arguments depending on your hardware (the second argument is optional)&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6qdl /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;./prog_bl.sh imx6ull /path/to/u-boot-with-spl.imx&amp;lt;/code&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of the script should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Programming: u-boot-with-spl-imx6ull.imx to imx6ull&lt;br /&gt;
Trying ::1...&lt;br /&gt;
Trying 127.0.0.1...&lt;br /&gt;
Connected to localhost.&lt;br /&gt;
Escape character is &#039;^]&#039;.&lt;br /&gt;
Open On-Chip Debugger&lt;br /&gt;
&amp;gt; reset&lt;br /&gt;
JTAG tap: imx6ull.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x5)&lt;br /&gt;
TAP imx6ull.sdma does not have IDCODE&lt;br /&gt;
JTAG tap: imx6ull.sjc tap/device found: 0x088c101d (mfg: 0x00e (Freescale (Motorola)), part: 0x88c1, ver: 0x0)&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
imx6ull.cpu: MPIDR level2 0, cluster 0, core 0, multi core, no SMT&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f76&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x400001f3 pc: 0x00002f74&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-spl-prog-imx6ull.bin 0x908000&lt;br /&gt;
45056 bytes written at address 0x00908000&lt;br /&gt;
downloaded 45056 bytes in 1.610037s (27.329 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume 0x00908000&lt;br /&gt;
&amp;gt; halt&lt;br /&gt;
imx6ull.cpu rev 5, partnum c07, arch f, variant 0, implementor 41&lt;br /&gt;
target halted in Thumb state due to debug-request, current mode: Supervisor&lt;br /&gt;
cpsr: 0x800001f3 pc: 0x00908934&lt;br /&gt;
MMU: disabled, D-Cache: disabled, I-Cache: enabled&lt;br /&gt;
&amp;gt; load_image u-boot-with-spl-imx6ull.imx 0x82000000&lt;br /&gt;
451456 bytes written at address 0x82000000&lt;br /&gt;
downloaded 451456 bytes in 15.305990s (28.804 KiB/s)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; resume&lt;br /&gt;
&amp;gt; Connection closed by foreign host.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The output of serial console should look like:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
U-Boot SPL 2018.05-DH_v0.19_emmc-00102-gc8e3c3df13 (Oct 01 2019 - 16:12:44 +0200)&lt;br /&gt;
DRAM: Auto calibration...successful&lt;br /&gt;
SPL: Unsupported Boot Device!&lt;br /&gt;
SPL: failed to boot from all boot devices&lt;br /&gt;
### ERROR ### Please RESET the board ###&lt;br /&gt;
Searching for IVT header at DDR address 0x82000000&lt;br /&gt;
.....&lt;br /&gt;
Found IVT header&lt;br /&gt;
Probing SPI flash... ok&lt;br /&gt;
Erasing... ok&lt;br /&gt;
Programming... ok&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If some error occures you can try the Manual Programing method below&lt;br /&gt;
&lt;br /&gt;
=== Manual Programming ===&lt;br /&gt;
# Ensure OpenOCD is running like in [[#Start up OpenOCD|Start up OpenOCD]]&lt;br /&gt;
# Open a second terminal window&lt;br /&gt;
# Ensure you are in the directory with the recovery files &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;cd /path/to/2019-10-08_imx6_U-Boot_recovery&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open a telnet session to OpenOCD &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;telnet localhost 4444&amp;lt;/code&amp;gt;&lt;br /&gt;
## Reset and halt the device &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;reset&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load modified U-Boot SPL as flash programmer in SRAM (device dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6qdl.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-spl-prog-imx6ull.bin 0x908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution at entry point of loaded U-Boot SPL &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume 0x00908000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Halt code execution if you see &#039;&#039;&#039;Searching for IVT header at DDR address 0xX2000000&#039;&#039;&#039; in serial console &amp;lt;br&amp;gt;&amp;lt;code&amp;gt;halt&amp;lt;/code&amp;gt;&lt;br /&gt;
## Load desired U-Boot image into RAM (device and customer dependent)&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 Q/D/DL/S&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6qdl.imx 0x12000000&amp;lt;/code&amp;gt;&lt;br /&gt;
##:* &#039;&#039;&#039;i.MX6 ULL&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;load_image u-boot-with-spl-imx6ull.imx 0x82000000&amp;lt;/code&amp;gt;&lt;br /&gt;
## Resume code execution after U-Boot image is in RAM&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;resume&amp;lt;/code&amp;gt;&lt;br /&gt;
## Wait until the serial output looks like in [[#Automated Programming|Automated Programming]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If there is a U-Boot starting, the OpenOCD procedure may not work properly.&lt;br /&gt;
There are two solutions to prevent the start of U-Boot from the SPI-NOR-Flash.&lt;br /&gt;
&lt;br /&gt;
=== SDP Boot (i.MX6 ULL) ===&lt;br /&gt;
# Boot in Serial Download Mode to prevent booting the broken U-Boot from SPI-NOR-Flash&lt;br /&gt;
## Hold the button for sdp boot mode on the SODIMM-200-Module (DHCOM) next to the BGA-Module (DHCOR)&lt;br /&gt;
##:[[File:DHCOR_i.MX6ULL_SDP-Boot.jpg|400px]]&lt;br /&gt;
## Reset the device. To reset the device, press the reset button on the baseboard or unplug and plug in the power plug.&lt;br /&gt;
## Release the button for sdp boot mode&lt;br /&gt;
# Go on with your procedure&lt;br /&gt;
&lt;br /&gt;
=== Delete U-Boot (i.MX6 Q/D/DL/S) ===&lt;br /&gt;
# &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;sf erase 0x0 0xf0000&amp;lt;/code&amp;gt;&lt;br /&gt;
# Restart the board&lt;br /&gt;
# Go on with your procedure&lt;/div&gt;</summary>
		<author><name>Sdaxenberger</name></author>
	</entry>
</feed>