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

From Voipac Wiki
Jump to navigation Jump to search
Line 18: Line 18:
 
[[image:i.MX51_SODIMM_PC-Development_Kit-JTAG_debugging.jpg|600px]]<br /><br />
 
[[image:i.MX51_SODIMM_PC-Development_Kit-JTAG_debugging.jpg|600px]]<br /><br />
  
Debugging session was opened and running:<br />
+
Debugging session is opened and running:<br />
 
[[image:i.MX51_SODIMM_PC-Development_Kit-OpenOCD_running.jpg|600px]]<br />
 
[[image:i.MX51_SODIMM_PC-Development_Kit-OpenOCD_running.jpg|600px]]<br />
  
Line 33: Line 33:
  
 
=== Using terminal emulator ===
 
=== 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 />
+
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.jpg|400px]]<br /><br />
 
[[image:i.MX25_SODIMM_Base_Board-Telnet_session.jpg|400px]]<br /><br />
  
Line 40: Line 40:
  
 
== Establishing serial connection ==
 
== Establishing serial connection ==
Open TeraTerm program, click on File/New Connection, choose Serial and select the port which was assigned to the JTAG device:<br />
+
Open TeraTerm program, click on File/New Connection, choose Serial and select the port which was assigned to the serial console device:<br />
 
[[image:i.MX25_SODIMM_Base_Board-Serial_connection.jpg|400px]]<br /><br />
 
[[image:i.MX25_SODIMM_Base_Board-Serial_connection.jpg|400px]]<br /><br />
  
Line 50: Line 50:
 
* '''Serial boot''' (Internal boot) is enabled when a link is placed between pins 1 and 2
 
* '''Serial boot''' (Internal boot) is enabled when a link is placed between pins 1 and 2
 
* '''Direct Boot''' is selected when pins 2 and 3 are shortened.
 
* '''Direct Boot''' is selected when pins 2 and 3 are shortened.
<br /><br />
 
'''''Important:''''' In a standard module configuration serial (internal) boot mode is active by default. This setting has a higher priority than boot mode jumper selection. No boot mode changes are needed during firmware loading.
 
  
 
{|style="text-align:center;"
 
{|style="text-align:center;"
Line 60: Line 58:
 
|Serial Boot
 
|Serial Boot
 
|}
 
|}
 +
<br /><br />
 +
'''''Important:''''' In a standard module configuration serial (internal) boot mode is active by default. This setting has a higher priority than boot mode jumper selection. No boot mode changes are needed during firmware loading.
  
 
== Loading bootloader ==
 
== Loading bootloader ==
Line 91: Line 91:
 
[[image:i.MX51_SODIMM_PC-Development_Kit-Bootloader_loaded.jpg|600px]]<br /><br />
 
[[image:i.MX51_SODIMM_PC-Development_Kit-Bootloader_loaded.jpg|600px]]<br /><br />
  
Module's MAC address is entered and setup (it can be found on the sticker placed on the module):<br />
+
Module's MAC address is required to enter (it can be found on the sticker placed on the module):<br />
 
[[image:i.MX51_SODIMM_PC-Development_Kit-MAC_address.jpg|600px]]<br /><br />
 
[[image:i.MX51_SODIMM_PC-Development_Kit-MAC_address.jpg|600px]]<br /><br />
  
As the fresh Barebox is stored in SRAM only at this point, switching the module off causes bootloader to erase. To store the new Barebox and use it automatically after power on, flashing the image is required. Follow [[i.MX51_SODIMM_PC_Flashing_images|this section]] to do so.
+
As the 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.MX51_SODIMM_PC_Flashing_images|this section]] to do so.

Revision as of 22:50, 12 April 2021

This page shows the steps how to initiate On-Chip Debugging and load bootloader into i.MX51 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

400px

Running Open On-Chip Debugger

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

600px

Debugging session is opened and running:
600px

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

250px

Telnet session is active and ready for use:
600px

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):
400px

TeraTerm session is running and ready for use:
600px

Establishing serial connection

Open TeraTerm program, click on File/New Connection, choose Serial and select the port which was assigned to the serial console device:
400px

A successful connection is created only if the following serial port settings are applied (115200, 8n1):
600px

Boot mode options

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

  • Serial boot (Internal boot) is enabled when a link is placed between pins 1 and 2
  • Direct Boot is selected when pins 2 and 3 are shortened.
i.MX25 SODIMM Base Board-Serial boot.jpg i.MX25 SODIMM Base Board-Direct boot.jpg
Direct Boot Serial Boot



Important: In a standard module configuration serial (internal) boot mode is active by default. This setting has a higher priority than boot mode jumper selection. No boot mode changes are needed 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

600px

step

600px

resume

600px

vmx51_init

600px

boot

600px

Barebox was loaded into the i.MX51 SODIMM PC Module SRAM and executed:
600px

Module's MAC address is required to enter (it can be found on the sticker placed on the module):
600px

As the 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.