Linux Renesas SuperH
 
 

Home
People
Documents
FAQ
Contact Us
Download
Developers
CVS
Links
E-mail

 
SuperH Cool Engine
Linux
Graphics by The Gimp
SourceForge.net Logo


STMicroelectronics st40load

Using the st40load program, it is possible to download programs to target hardware through the Hitachi User Debug Interface (HUDI) present on the 7750, 7751 and ST40. To do this additional interface hardware is required, either a JEI or ST MicroConnect, both of which have an Ethernet interface. This results in a download speed of around 150Kbytes per second.

Downloading the kernel

Normally st40load is used to download just the kernel. In this case the command line is usually:

st40load -t hekla -m overdrive.poke vmlinux \
  root=/dev/hda2 console=ttySC0,115200 sh_mv=overdrive mem=32m

where hekla is the name of the JEI. All options after the kernel filename are passed through on the Linux kernel command line.

Using a ramdisk image

Another way in which st40load can be used is to download an initial ramdisk image. In this case a couple of extra options are used:

st40load -t hekla -m overdrive.poke -i initrd.img -b 0x8d000000 vmlinux \
  root=/dev/ram console=ttySC0,115200 sh_mv=overdrive ramdisk=8192 mem=32m

Using st40load with GDB

Finally, it is also possible to use st40load in conjunction with GDB, for kernel debugging. To do this the -x option is used to download the kernel an extra ELF file, and the application which is booted and run is the IPL:

  st40run -t hekla -m overdrive.poke -x vmlinux sh-stub.elf \
    root=/dev/hda2 console=ttySC0,115200 sh_mv=overdrive mem=31m

Note that the memory size has been reduced to allow for the stub's code, which is loaded at the end of RAM.

In this case, it is no longer necessary to use GDB to download the kernel, so the load command is no longer needed, and the kernel file can be specified either on the GDB command line, or through the file command.

However there is one disadvantage to doing things this way. One side effect of the load command is that it also sets the target's PC register to the kernel's entry point. Instead we have to do this manually. First determine the kernel's entry point using sh-linux-gnu-readelf -h on the kernel, and then once GDB is connected to the target, type:

(gdb) jump *0x8c002000

to get the kernel running.


Unfortunately the source code for st40load cannot be made available, as it contains information obtained from Hitachi under NDA.


printer friendly Linux is a trademark of Linus Torvalds. 
SuperH and Cool Engine are registered trademarks of Hitachi, Ltd.

Last update: 28/08/2026

This page ©2003 Stuart Menefy. Permission granted to copy and display.
$Id: template.php3,v 1.9 2026/08/28 16:30:56 lethal Exp $