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

From Voipac Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
=== OpenOCD 0.6.0 ===
 
=== OpenOCD 0.6.0 ===
 
==== Using Windows OS based computer ====
 
==== Using Windows OS based computer ====
 
+
JTAG Debugger and Programmer Installation requires these initial steps to be followed:
===== JTAG Debugger and Programmer Installation =====
 
 
* Connect JTAG Cable to USB port on a 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.MX25_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.MX25_SODIMM_PC-Development_Kit/tools/jtag/binaries/openocd-0.6.0-vmx0.zip OpenOCD v0.6.0 software]
Line 15: Line 14:
 
[[image:JTAG_cable_with_serial_line.jpg|400px]]
 
[[image:JTAG_cable_with_serial_line.jpg|400px]]
  
 
=== 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):
 
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">
Line 26: Line 23:
 
[[image:i.MX25_SODIMM_PC-Development_Kit-OpenOCD_running.png|580px]]<br />
 
[[image:i.MX25_SODIMM_PC-Development_Kit-OpenOCD_running.png|580px]]<br />
  
=== Using Linux OS based computer ===
+
==== Using Linux OS based computer ====
Download [http://downloads.voipac.com/files/i.MX53_SODIMM_PC-Development_Kit/tools/jtag/vmx53-oocd-0.6.0.cfg the configuration files] and unpack them.<br><br>
+
Download the [https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/tools/jtag/vmx25-oocd-0.6.0.cfg configuration files] and [https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/module/software/barebox/binaries/barebox-vmx25-1.0.img barebox binary]:
 +
<syntaxhighlight lang="bash">
 +
wget https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/tools/jtag/vmx25-oocd-0.6.0.cfg
 +
wget https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/module/software/barebox/binaries/barebox-vmx25-1.0.img
 +
</syntaxhighlight>
  
 +
Instal OpenOCD utility:
 +
<syntaxhighlight lang="bash">
 +
sudo apt-get install openocd
 +
</syntaxhighlight>
 +
 +
Run the On-Chip Debugger routine with the i.MX25 SODDIMM Module configuration file:
 +
<syntaxhighlight lang="bash">
 +
/opt/openocd/bin/openocd -f vmx25-oocd-0.6.0.cfg
 +
</syntaxhighlight>
 +
 +
=== OpenOCD 0.9.0 ===
 +
==== Using Linux OS based computer ====
 +
Download the [https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/tools/jtag/vmx25-oocd-0.9.0.cfg configuration files] and [https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/module/software/barebox/binaries/barebox-vmx25-1.0.img barebox binary]:
 +
<syntaxhighlight lang="bash">
 +
wget https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/tools/jtag/vmx25-oocd-0.9.0.cfg
 +
wget https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/module/software/barebox/binaries/barebox-vmx25-1.0.img
 +
</syntaxhighlight>
 +
 +
Instal OpenOCD utility:
 +
<syntaxhighlight lang="bash">
 +
sudo apt-get install openocd
 +
</syntaxhighlight>
 +
 +
Run the On-Chip Debugger routine with the i.MX25 SODDIMM Module configuration file:
 +
<syntaxhighlight lang="bash">
 +
/opt/openocd/bin/openocd -f vmx25-oocd-0.9.0.cfg
 +
</syntaxhighlight>
  
 
== Connecting to Open On-Chip Debugger session ==
 
== Connecting to Open On-Chip Debugger session ==
Line 37: Line 65:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[image:i.MX25_SODIMM_Base_Board-Telnet.png|400px]]<br /><br />
 
[[image:i.MX25_SODIMM_Base_Board-Telnet.png|400px]]<br /><br />
 +
Note: In [[#Telnet log|this section]] a detailed Telnet log is located in case troubleshooting is needed.<br /><br />
  
 
Telnet session is active and ready for use:<br />
 
Telnet session is active and ready for use:<br />
Line 91: Line 120:
  
 
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.MX25_SODIMM_PC_Flashing_images|this section]] to do so.
 
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.MX25_SODIMM_PC_Flashing_images|this section]] to do so.
 +
 +
== Telnet log ==
 +
<syntaxhighlight lang="bash">
 +
user@workstation:~$ telnet localhost 4444
 +
Trying 127.0.0.1...
 +
Connected to localhost.
 +
Escape character is '^]'.
 +
Open On-Chip Debugger
 +
> reset halt
 +
JTAG tap: imx25.etb tap/device found: 0x1b900f0f (mfg: 0x787, part: 0xb900, ver: 0x1)
 +
JTAG tap: imx25.cpu tap/device found: 0x07926041 (mfg: 0x020, part: 0x7926, ver: 0x0)
 +
TAP imx25.whatchacallit does not have IDCODE
 +
JTAG tap: imx25.sdma tap/device found: 0x0882301d (mfg: 0x00e, part: 0x8823, ver: 0x0)
 +
target state: halted
 +
target halted in ARM state due to breakpoint, current mode: Supervisor
 +
cpsr: 0x000000d3 pc: 0x00000000
 +
MMU: disabled, D-Cache: disabled, I-Cache: disabled
 +
> vmx25_init
 +
Configuring VMX25...
 +
JTAG tap: imx25.etb tap/device found: 0x1b900f0f (mfg: 0x787, part: 0xb900, ver: 0x1)
 +
JTAG tap: imx25.cpu tap/device found: 0x07926041 (mfg: 0x020, part: 0x7926, ver: 0x0)
 +
TAP imx25.whatchacallit does not have IDCODE
 +
JTAG tap: imx25.sdma tap/device found: 0x0882301d (mfg: 0x00e, part: 0x8823, ver: 0x0)
 +
target state: halted
 +
target halted in ARM state due to breakpoint, current mode: Supervisor
 +
cpsr: 0x000000d3 pc: 0x00000000
 +
MMU: disabled, D-Cache: disabled, I-Cache: disabled
 +
Initialisation completed...
 +
> boot barebox-vmx25-1.0.img
 +
core state: ARM
 +
400396 bytes written at address 0x80000000
 +
downloaded 400396 bytes in 3.547603s (110.219 KiB/s)
 +
target state: halted
 +
target halted in ARM state due to breakpoint, current mode: Supervisor
 +
cpsr: 0x400000d3 pc: 0x80000050
 +
MMU: disabled, D-Cache: disabled, I-Cache: disabled
 +
>
 +
</syntaxhighlight>

Latest revision as of 07:06, 24 April 2022

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

Running Open On-Chip Debugger

OpenOCD 0.6.0

Using Windows OS based computer

JTAG Debugger and Programmer Installation requires these initial steps to be followed:

  • 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

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 vmx25w.cfg

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

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

Using Linux OS based computer

Download the configuration files and barebox binary:

wget https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/tools/jtag/vmx25-oocd-0.6.0.cfg
wget https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/module/software/barebox/binaries/barebox-vmx25-1.0.img

Instal OpenOCD utility:

sudo apt-get install openocd

Run the On-Chip Debugger routine with the i.MX25 SODDIMM Module configuration file:

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

OpenOCD 0.9.0

Using Linux OS based computer

Download the configuration files and barebox binary:

wget https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/tools/jtag/vmx25-oocd-0.9.0.cfg
wget https://downloads.voipac.com/files/i.MX25_SODIMM_PC-Development_Kit/module/software/barebox/binaries/barebox-vmx25-1.0.img

Instal OpenOCD utility:

sudo apt-get install openocd

Run the On-Chip Debugger routine with the i.MX25 SODDIMM Module configuration file:

/opt/openocd/bin/openocd -f vmx25-oocd-0.9.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

Note: In this section a detailed Telnet log is located in case troubleshooting is needed.

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

Boot mode options

H902 jumper (BOOTMODE) allows to choose different bootloader sources:

  • Direct boot is enabled when a link is placed between pins 1 and 2. This mode is chosen by default.
  • Serial Boot (Internal boot) is selected when pins 2 and 3 are shortened.
i.MX25 SODIMM PC-Development Kit-Direct boot mode.jpg i.MX25 SODIMM PC-Development Kit-Serial boot mode.jpg
Direct Boot Serial Boot


Important: No boot mode changes are required during firmware loading.

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.MX25 SODIMM PC-Development Kit-OpenOCD reset halt.png

vmx25_init

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

boot

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

Barebox was loaded into the i.MX25 SODIMM PC Module SRAM and executed:
i.MX25 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.

Telnet log

user@workstation:~$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> reset halt
JTAG tap: imx25.etb tap/device found: 0x1b900f0f (mfg: 0x787, part: 0xb900, ver: 0x1)
JTAG tap: imx25.cpu tap/device found: 0x07926041 (mfg: 0x020, part: 0x7926, ver: 0x0)
TAP imx25.whatchacallit does not have IDCODE
JTAG tap: imx25.sdma tap/device found: 0x0882301d (mfg: 0x00e, part: 0x8823, ver: 0x0)
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> vmx25_init
Configuring VMX25...
JTAG tap: imx25.etb tap/device found: 0x1b900f0f (mfg: 0x787, part: 0xb900, ver: 0x1)
JTAG tap: imx25.cpu tap/device found: 0x07926041 (mfg: 0x020, part: 0x7926, ver: 0x0)
TAP imx25.whatchacallit does not have IDCODE
JTAG tap: imx25.sdma tap/device found: 0x0882301d (mfg: 0x00e, part: 0x8823, ver: 0x0)
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
Initialisation completed...
> boot barebox-vmx25-1.0.img
core state: ARM
400396 bytes written at address 0x80000000
downloaded 400396 bytes in 3.547603s (110.219 KiB/s)
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x400000d3 pc: 0x80000050
MMU: disabled, D-Cache: disabled, I-Cache: disabled
>