Difference between revisions of "i.MX53 SODIMM PC Loading bootloader"

From Voipac Wiki
Jump to navigation Jump to search
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:i.MX53 SODIMM PC - Development kit]]
+
[[Category:i.MX53 SODIMM PC - Development Kit]]
[[Category:i.MX53 SODIMM PC Peripherals]]
+
[[Category:i.MX53 SODIMM PC Recovery]]
 
<!-- -->
 
<!-- -->
 
<div style="float:right">__TOC__</div>
 
<div style="float:right">__TOC__</div>
This page shown the steps how to initiate On-Chip Debugging and load bootloader into i.MX53 SODIMM PC - Development kit.
+
This page shows the steps how to initiate On-Chip Debugging and load bootloader into i.MX53 SODIMM PC - Development Kit.
  
 
== JTAG Debugger and Programmer Installation ==
 
== JTAG Debugger and Programmer Installation ==
* Connect JTAG Cable to USB port on the computer. JTAG device should be automatically recognized and prepared for usage.
+
* Connect JTAG Cable to USB port on a computer. JTAG device should be automatically recognized and prepared for usage.
* Download [http://downloads.voipac.com/files/i.MX53_SODIMM_PC-Development_kit/tools/jtag/binaries/openocd-0.6.0-vmx0.zip OpenOCD v0.6.0 software]
+
* Download [http://downloads.voipac.com/files/i.MX53_SODIMM_PC-Development_Kit/tools/jtag/binaries/openocd-0.6.0-vmx0.zip OpenOCD v0.6.0 software]
 
* Unzip the files
 
* Unzip the files
[[image:iMX6_Rex_Development_kit-JTAG.jpg|400px]]
+
[[image:JTAG_cable_with_serial_line.jpg|400px]]
  
 
== Running Open On-Chip Debugger ==
 
== Running Open On-Chip Debugger ==
Locate the folder where the software has been unpacked. Run OpenOCD utility in command line (by using Total Commander or Windows Command Prompt):
+
=== Using Windows OS based computer ===
 +
Locate the folder where the software was unpacked. Run OpenOCD utility in command line (by using Total Commander or Windows Command Prompt):
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
openocd -f vmx53w.cfg
+
openocd.exe -f vmx53w.cfg
 
</syntaxhighlight>
 
</syntaxhighlight>
[[image:i.MX25_SODIMM_Base_Board-JTAG_debugging.jpg|600px]]<br />
+
[[image:i.MX53_SODIMM_PC-Development_Kit-JTAG_debugging.png|580px]]<br /><br />
  
Debugging session is opened and running:
+
Debugging session is opened and running:<br />
[[image:i.MX53_SODIMM_PC-Development_Kit-OpenOCD_running.jpg|600px]]<br />
+
[[image:i.MX53_SODIMM_PC-Development_Kit-OpenOCD_running.png|580px]]<br />
  
 +
=== Using Linux OS based computer ===
 +
Download the [http://downloads.voipac.com/files/i.MX53_SODIMM_PC-Development_Kit/tools/jtag/vmx53-oocd-0.6.0.cfg configuration files]:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
wget https://downloads.voipac.com/files/i.MX53_SODIMM_PC-Development_Kit/tools/jtag/vmx53-oocd-0.6.0.cfg
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
Instal OpenOCD utility:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
sudo apt-get install openocd
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
Run the On-Chip Debugger routine using the following command:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
/opt/openocd/bin/openocd -f vmx53-oocd-0.6.0.cfg
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
== Connecting to Open On-Chip Debugger session ==
 +
=== Using Windows Telnet Client ===
 +
Click on Start/Run (or press Windows key + R), and open the Telnet session using 4444 port:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
telnet localhost 4444
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
[[image:i.MX25_SODIMM_Base_Board-Telnet.png|400px]]<br /><br />
 +
 +
Telnet session is active and ready for use:<br />
 +
[[image:i.MX25_SODIMM_Base_Board-Telnet_ready.png|580px]]<br />
 +
 +
=== Using terminal emulator ===
 +
To open Telnet service using TeraTerm program, click on File/New Connection, select TCP/IP option and type '''4444''' into TCP port# field. The IP address to connect to is '''localhost''' (127.0.0.1):<br />
 +
[[image:i.MX25_SODIMM_Base_Board-Telnet_session.png|400px]]<br /><br />
 +
 +
TeraTerm session is running and ready for use:<br />
 +
[[image:i.MX25_SODIMM_Base_Board-Telnet_ready_TeraTerm.png|580px]]<br />
 +
 +
== Establishing serial connection ==
 +
Open TeraTerm program, click on File/New Connection, choose Serial and select the port which was assigned to the serial console:<br />
 +
[[image:i.MX25_SODIMM_Base_Board-Serial_connection.png|400px]]<br /><br />
 +
 +
A successful connection is created only if the following serial port settings are applied (115200, 8n1):<br />
 +
[[image:i.MX25_SODIMM_Base_Board-Serial_console_settings.png|580px]]<br /><br />
 +
 +
== Selecting boot mode ==
 +
In order to disable direct boot, H902 jumper (BOOTMODE) must be placed between pins 1 and 2. This enables '''serial boot''' and loading files over Telnet service. The main reason for using this mode is to rewrite bootloader image in case of update or recovery.<br /><br />
 +
 +
'''Direct Boot''' (Boot from E-Fuses) is selected when BOOTMODE jumper pins 2 and 3 are shortened. This is the default mode of module operation.<br /><br />
 +
 +
{|style="text-align:center;"
 +
|[[image:i.MX25_SODIMM_Base_Board-Direct_boot.jpg|296px]]
 +
|[[image:i.MX25_SODIMM_Base_Board-Serial_boot.jpg|296px]]
 +
|-
 +
|Serial Boot
 +
|Direct Boot (Boot from E-Fuses)
 +
|}
 +
 +
== Loading bootloader ==
 +
The following commands need to be placed inside Localhost Telnet session and executed one by one. Console logs are included for comparison:
 +
<syntaxhighlight lang="bash">
 +
reset_halt
 +
</syntaxhighlight>
 +
[[image:i.MX53_SODIMM_PC-Development_Kit-OpenOCD_reset_halt.png|580px]]<br /><br />
 +
 +
<syntaxhighlight lang="bash">
 +
step
 +
</syntaxhighlight>
 +
[[image:i.MX53_SODIMM_PC-Development_Kit-OpenOCD_step.png|580px]]<br /><br />
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
resume
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
[[image:i.MX53_SODIMM_PC-Development_Kit-OpenOCD_resume.png|580px]]<br /><br />
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
vmx53_init
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
[[image:i.MX53_SODIMM_PC-Development_Kit-OpenOCD_init.png|580px]]<br /><br />
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
boot
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
[[image:i.MX53_SODIMM_PC-Development_Kit-OpenOCD_boot.png|580px]]<br /><br />
 +
 +
Barebox was loaded into the i.MX53 SODIMM PC Module SRAM and executed:<br />
 +
[[image:i.MX53_SODIMM_PC-Development_Kit-Bootloader_loaded.png|580px]]<br /><br />
 +
 +
As this fresh Barebox is stored in SRAM only at this point, switching the module off causes the bootloader to be erased. To store the new Barebox and use it automatically after power on, image flashing is required. Follow [[i.MX53_SODIMM_PC_Flashing_images|this section]] to do so.

Latest revision as of 07:09, 24 April 2022

This page shows the steps how to initiate On-Chip Debugging and load bootloader into i.MX53 SODIMM PC - Development Kit.

JTAG Debugger and Programmer Installation

  • Connect JTAG Cable to USB port on a computer. JTAG device should be automatically recognized and prepared for usage.
  • Download OpenOCD v0.6.0 software
  • Unzip the files

JTAG cable with serial line.jpg

Running Open On-Chip Debugger

Using Windows OS based computer

Locate the folder where the software was unpacked. Run OpenOCD utility in command line (by using Total Commander or Windows Command Prompt):

openocd.exe -f vmx53w.cfg

i.MX53 SODIMM PC-Development Kit-JTAG debugging.png

Debugging session is opened and running:
i.MX53 SODIMM PC-Development Kit-OpenOCD running.png

Using Linux OS based computer

Download the configuration files:

wget https://downloads.voipac.com/files/i.MX53_SODIMM_PC-Development_Kit/tools/jtag/vmx53-oocd-0.6.0.cfg

Instal OpenOCD utility:

sudo apt-get install openocd

Run the On-Chip Debugger routine using the following command:

/opt/openocd/bin/openocd -f vmx53-oocd-0.6.0.cfg

Connecting to Open On-Chip Debugger session

Using Windows Telnet Client

Click on Start/Run (or press Windows key + R), and open the Telnet session using 4444 port:

telnet localhost 4444

i.MX25 SODIMM Base Board-Telnet.png

Telnet session is active and ready for use:
i.MX25 SODIMM Base Board-Telnet ready.png

Using terminal emulator

To open Telnet service using TeraTerm program, click on File/New Connection, select TCP/IP option and type 4444 into TCP port# field. The IP address to connect to is localhost (127.0.0.1):
i.MX25 SODIMM Base Board-Telnet session.png

TeraTerm session is running and ready for use:
i.MX25 SODIMM Base Board-Telnet ready TeraTerm.png

Establishing serial connection

Open TeraTerm program, click on File/New Connection, choose Serial and select the port which was assigned to the serial console:
i.MX25 SODIMM Base Board-Serial connection.png

A successful connection is created only if the following serial port settings are applied (115200, 8n1):
i.MX25 SODIMM Base Board-Serial console settings.png

Selecting boot mode

In order to disable direct boot, H902 jumper (BOOTMODE) must be placed between pins 1 and 2. This enables serial boot and loading files over Telnet service. The main reason for using this mode is to rewrite bootloader image in case of update or recovery.

Direct Boot (Boot from E-Fuses) is selected when BOOTMODE jumper pins 2 and 3 are shortened. This is the default mode of module operation.

i.MX25 SODIMM Base Board-Direct boot.jpg i.MX25 SODIMM Base Board-Serial boot.jpg
Serial Boot Direct Boot (Boot from E-Fuses)

Loading bootloader

The following commands need to be placed inside Localhost Telnet session and executed one by one. Console logs are included for comparison:

reset_halt

i.MX53 SODIMM PC-Development Kit-OpenOCD reset halt.png

step

i.MX53 SODIMM PC-Development Kit-OpenOCD step.png

resume

i.MX53 SODIMM PC-Development Kit-OpenOCD resume.png

vmx53_init

i.MX53 SODIMM PC-Development Kit-OpenOCD init.png

boot

i.MX53 SODIMM PC-Development Kit-OpenOCD boot.png

Barebox was loaded into the i.MX53 SODIMM PC Module SRAM and executed:
i.MX53 SODIMM PC-Development Kit-Bootloader loaded.png

As this fresh Barebox is stored in SRAM only at this point, switching the module off causes the bootloader to be erased. To store the new Barebox and use it automatically after power on, image flashing is required. Follow this section to do so.