Project Home
Project Home
Wiki
Wiki
Project Information
Project Info
wiki3944: Nto640RenesasSh7723Wheat1.0.0Releasenotes


Release Notes for QNX Neutrino 6.4.0 BSP for Renesas SH7723 WHEAT 1.0.0#

System requirements#

Target system#

  • QNX Neutrino RTOS 6.4.0
  • Board version: renesas sh7723 WHEAT board
  • 64M RAM

Host development system#

  • QNX Momentics 6.4.0, one of the following host systems:
    • QNX Neutrino 6.4.0
    • Microsoft Windows Vista, XP SP2 or SP3, 2000 SP4
    • Linux Red Hat Enterprise Workstation 4 or 5, Red Hat Fedora Core 6 or 7, Ubuntu 6.0.6 LTS or 7, or SUSE 10
  • IDE 4.6.0
  • Terminal emulation program (Qtalk, Momentics IDE Terminal, tip, HyperTerminal, etc.)
  • RS-232 serial port
  • NULL-modem serial cable
  • Ethernet link

System Layout#

The tables below depict the memory layout for the image and for the flash.

ItemAddress
OS image loaded at: 0x88010000

Getting Started#

Step 1: Connect your hardware#

Connect the serial cable to the Debug serial port of the Renesas SH7723 WHEAT and to a free serial port on the host machine (e.g. ser1 on a Neutrino host).

Note: If you have a Neutrino host with a serial mouse, you may have to move the mouse to the second serial port on your host, because some terminal programs require the first serial port.

Step 2: Build the BSP#

  • unzip the bsp package archive to the desired location on the host machine
  • cd to the root of the BSP and type 'make'. The resulting OS image will be located in the images directory. The following hree files will be created:
    • ifs-wheat.bin
    • ipl-ifs-wheat.bin
    • ipl-ifs-wheat.srec

Step 3: Transfer the OS image to the target#

Step 3A: Using Tera Term Pro to download the flash image to the SH7723 Wheat platform#

Use the mini-monitor program in EPROM, to download the SREC image into the Flash. This will allow the user to boot from the flash image and run QNX.

Tera Term Pro#

Tera Term Pro is a terminal emulator for Windows. It controls the serial port and allows transfer of files over the serial port. It is available from the web without charge. The URL is http://hp.vector.co.jp/authors/VA002416/teraterm.html. To install the program, click on the setup.exe program and simply follow the instructions.

When Tera Term Pro is running on Windows, the user should selects the Serial option and the appropriate COM port. After selecting the serial port, the user must change the terminal port options. This is accomplished by selecting the menu option Setup -> Serial port…

Please make sure the following settings:

  • Baud: 115200
  • Bits: 8
  • Stop bits: 1
  • Parity: none
  • Flow control: none

Boot SH7723 Wheat to Mini-monitor#

Before powering up the Wheat platform, the user has to connect the host system and the Wheat target system using the NULL modem cable. And the user must also verify the DIP switches on the Wheat Platform are setup to boot the EPROM mini-monitor.

There is one set of DIP switches that determine what memory device (EPROM, SRAM, NOR-Flash) is mapped to AREA0 (CS0) of the Wheat address space. Based on the DIP switches, the user can tell the CPU to fetch instructions from the EPROM or from the on-board flash. In the case of the mini-monitor setup, the user wants to select addresses from the EPROM. In order to do this, the user should change the DIP switches to the following values:

Boot from EPROM

Switch	 1	 2	 3	 4	 5	 6	 7	 8
SW10	ON	ON	OFF	OFF	ON	ON	ON	ON
SW18	OFF	OFF	OFF	OFF	OFF	OFF	OFF	OFF
SW9	OFF	OFF	OFF	OFF	 	 	 	 
SW11	ON	OFF	 					
SW26	OFF	ON	 					

If the serial cable is setup correctly, the Tera Term Pro serial configuration (Baud, parity bit, stop bit, etc) is correct and the DIP switches are correct then the user will see the following display after powering up the Wheat system:

SH_MobileR2 monitor .cache off.SCIF0/115.2 Kbps
--Little endian on EPROM
2007.12.19 Ver.0.13 on Wheat

> 

You should also see “MobileR2” on the Wheat LED Display.

Loading the QNX Image#

The mini-monitor program communicates with the WindowsXP host system through the serial port. This allows the user to enter commands into the mini-monitor program to update the flash image. There is one step in programming the flash to boot the QNX image.

The mini-monitor can only receive a SREC file. It actually interprets the addresses in the SREC file and programs memory according to those addresses. Using the Load Flash utility the mini-monitor will load the SREC into the on-board NOR-Flash.

To initiate the Load Flash utility, in Tera Term type: “lf”.

NOTE: To view other commands besides “lf”, type: “h”.

The following screenshot shows the mini-monitor after typing LF:

>lf
DRAM Clear....
please send! <'." & CR stop load>
 

You can see that the prompt now displays “Please send ! (‘.’ & CR stop load)”.

At this point, the user must send the SREC file to the mini-monitor software on the Wheat platform. To do this, select the File menu and the Send File… option. The user should search the file system until they find ipl-ifs-wheat.srec file. After selecting the SREC file, the Tera Term application will display a dialog with the progress of the transfer. The progress dialog is the number of bytes transferred to the Wheat system. When the SREC file is fully transferred to the target system, the mini-monitor will erase the on-board NOR-Flash and then program it with the small QNX image. The display in the Tera Term window should be as follows:

Erasing 
Spansion flash was detected in area 4.
....
Writing....
>

At this point, the user can power down the system and change the DIP switch settings to load the QNX image.

SH7723 Limitation#

Normally the next step would involve changing the DIP switches so that the NOR-Flash is in the CS0 address space rather then the EPROM. However, the SH7723 has a limitation that allows access to the CS0 space only in 16-bit. Therefore, the functionality shown below was added:
  • The EPROM mini-monitor program is allocated at CS0
  • The on-board flash memory is allocated on CS4
  • The EPROM mini-monitor is executed after reset or power on.
  • The mini-monitor checks the setting of SW18 – 1. If it on, a jump to the start address of CS4 is made.

Booting the Flash Image#

The last step in this process is to power down the platform and change the DIP switches so that the system boots from Flash memory. As stated above, there is a limitation in the SH7723 so only one DIP switch needs to be changed.

Workaround to Boot from Flash

Switch	 1	 2	 3	 4	 5	 6	 7	 8
SW10	ON	ON	OFF	OFF	ON	ON	ON	ON
SW18	ON	OFF	OFF	OFF	OFF	OFF	OFF	OFF
SW9	OFF	OFF	OFF	OFF	 	 	 	 
SW11	ON	OFF	 					
SW26	OFF	ON	 					
Once the DIP switch is changed, power up the board and you should see QNX Image booting. You should see the following output:
System page at phys:08009000 user:08009000 kern:88009000
Starting next program at v88045f34
Welcome to QNX Neutrino 6.4.0 on the Renesas Wheat (SH7723) Evaluation Board
Starting serial driver...
Starting on-board ethernet with TCP/IP stack...
Starting USB...
Starting i2c driver...
Starting io-display...
Starting audio driver...
Starting flash driver...
#

You can now test the OS simply by executing any shell builtin command or any command residing within the OS image (e.g. ls).

Step 3B: Transfer the OS image to the target using IPL#

You can write the IPL to the flash. This may be desirable once you've tweaked the OS image exactly the way you want it, and you want the board to boot the image automatically, immediately on power up.

1.Modify your buildfile to generate images.
2.Run the mkimage script, inside the /images directory of the BSP. The output file from this script is a combined IPL/OS image called ipl-ifs-wheat.bin. You'll download this file to the board's memory using the bootloader, and then burn the image into the board's flash.

Here is the mkimage script:

#!/bin/sh
#    Script to build a flashable image for the Wheat
#    Builds the ipl and demo image into one binary / srec
set -v

#    Convert IPL into an S-Record
${QNX_HOST}/usr/bin/ntosh-objcopy -Osrec ../install/shle/boot/sys/ipl-wheat ipl-tmp-wheat.srec

#    Convert S-Record IPL to binary
${QNX_HOST}/usr/bin/ntosh-objcopy -Isrec -Obinary ./ipl-tmp-wheat.srec ipl-tmp1-wheat.bin

#    Pad binary IPL to 4k
mkrec -r -ffull -s0x2000 ./ipl-tmp1-wheat.bin > ipl-tmp2-wheat.bin 

#    Combine the binary IPL with the binary boot image
cat ./ipl-tmp2-wheat.bin ./ifs-sh7723_wheat.bin > ipl-ifs-wheat.bin

#    Convert the combined image to a single S-record, which the
mkrec -o0x88000000 -fsrec -r ./ipl-ifs-wheat.bin > ipl-ifs-wheat.srec

#    Cleaning up temporary files
rm -f *tmp*

3.Boot the board as described above, using Rom Monitor to download the ifs-sh7723_wheat.bin boot image.

4.You should make the ipl-ifs-wheat.bin available to your target. In this example we copied it into /dev/shmem .

  • Enter the following command to start the flash filesystem driver: # devf-generic -s0x10000000,64M
  • Erase the beginning of flash: # flashctl -p/dev/fs0 -l4M -ev
  • Copy the combined IPL and OS image to flash: # cp -V /dev/shmem/ipl-ifs-wheat.bin /dev/fs0

When the copy is complete, you can reboot; it should now boot from the native QNX IPL. You should see output as follows:

QNX Neutrino IPL for the Wheat (SH7723) Evaluation Board
Press 'd' to download an OS image serially
Press any other key to boot from flash

5. If you wish to download the OS image serially, press the 'd' key and use {sendnto} to download the image:

sendnto -b115200 -d/dev/ser1 ifs-sh7723_wheat.bin

Then you should see output as follows:

Downloading new OS image to ram location 0x89000000
Download Complete

System page at phys:08009000 user:08009000 kern:88009000
Starting next program at v88045f34
Welcome to QNX Neutrino 6.4.0 on the Renesas Wheat (SH7723) Evaluation Board
Starting serial driver...
Starting on-board ethernet with TCP/IP stack...
Starting USB...
Starting i2c driver...
Starting io-display...
Starting audio driver...
Starting flash driver...
#


Creating a flash partition#

We'll create a filesystem partition at 4.0 MB offset from the beginning of flash to reserve room for a Neutrino image plus IPL:

1. Enter the following command to start the flash filesystem driver:

# devf-generic -s0x10000000,64M

2. Erase the flash at offset 4 MB for a length of 60 MB:

# flashctl -p/dev/fs0 -o4M -l60M -ve

3. Format the partition:

# flashctl -p/dev/fs0p0 -o4M -l60M -f

This command will format the 60 MB partition.

4. Slay the flash filesystem driver:

# slay devf-generic

5. Restart the driver:

# devf-generic -s0x10000000,64M

You should now have a read/write partition mounted as /fs0p1 off the root directory.


Driver Command Summary#

The following table summarizes the commands to launch the various drivers.

ComponentBuildfile CommandRequired BinariesRequired LibrariesSource Location
Startupstartup-wheat -f400000000 startup-wheat . src/hardware/startup/boards/wheat
Serial (debug serial port:scif0)devc-sersci -e -F -b115200 -c33400000/16 scif0 & devc-sersci . src/hardware/devc/sersci
Serial (SCIFA High Speed serial port) devc-sersci-scifa -E -F -u2 -b3000000 -c66700000/16 scif3 &devc-sersci-scifa . src/hardware/devc/sersci
Network io-pkt-v4 -dsmc9000 ioport=0x1a300000,irq=0x804 -ptcpip io-pkt-v4
ifconfig
devn-smc9000.so
devnp-shim.so
libsocket.so
src/hardware/devn/smc9000
NOR Flash devf-generic -s0x10000000,64M devf-generic
flashctl
. src/hardware/flash/boards/generic
NAND Flash fs-etfs-sh7723 -m /fs/etfs
fs-etfs-sh7723 -e
fs-etfs-sh7723
etfsctl
. src/hardware/etfs/nand2048/sh7723  
SPIspi-master -dsh7723 channel=0
spi-master -u1 -dsh7723 channel=1
spi-masterspi-sh7723.so src/hardware/spi/sh7723
I2C i2c-sh7723 i2c-sh7723 . src/hardware/i2c/sh7723
USB io-usb -d sh7723 ioport=0xA4D80000,irq=0x2031 io-usb
usb*
devu-sh7723.so
libusbdi.so
class drivers
prebuilt only
Audio io-audio -dsh7723-wheat io-audio
resource_seed
deva-ctrl-sh7723-wheat.so
libasound.so
src/hardware/deva/ctrl/sh7723
Graphics io-display -dvid=0,did=0 io-display
sh7723.conf
img.conf
devg-sh7723.so
devg-soft3d.so
libGLES_CL.so.1
libffb.so.2
libm.so.2
libdisputil.so
src/hardware/devg/sh7723

Some of the drivers are commented out in the default buildfile. To use the drivers in the target hardware, you'll need to uncomment them in your buildfile, rebuild the image, and load the image into the board.

SCIFA Serial, SPI, and NAND flash drivers have addtional details:

SCIFA high speed Serial driver:#

  • To use this serial driver, it is necessary to pass the -u to startup, ex: startup-wheat -f400000000 -u -v
  • There is a pin sharing conflict between this device and the NAND controller,so ETFS cannot be used at the same time as devc-sersci-scifa.
  • The SCIFA serial lines are not brought out to a connector on the Wheat board by default. To use this interface on the wheat board, it may be necessary to implement hardware modifications.

SPI driver:#

  • SPI port 0 (MSIOF0) shares pins with Debug Serial port (scif0). Only one of them can be used at a time.
  • SPI port 1 (MSIOF1) shares pins with Audio interface . Only one of them can be used at a time.

Nand flash driver: #

  • ETFS interface shares pins with SCIFA high speed serial driver. Only one of them can be used at a time.


Known issues for this BSP#

  1. primtest of 3D conformance test, hangs (Ref# 72246)
    • This issue has only occurred with the Khronos GLES 1.0 conformance tests. We do not believe this issue should affect other standard QNX or customer applications.
  2. When using fs-nfs2 with the smc9000 ethernet port on this board, use -B4096 to try to throttle server output to avoid losing packets due to hardware limitations of the non-DMA smc9000 nic. (Ref# 66678)
  3. Pings with packet sizes larger than 7000 bytes will not work. (Ref# 66678)
  4. Several board designs exist that have left/right audio channels swapped at the “in”, and/or “out” connection ports. Input and output corrections can be individually controlled when starting the audio driver using the in and out parameters. Setting the in/out=0 (default setting) will cause the input or output ports to swap, otherwise set in/out=1 setting with no channel swap. For example:
    • io-audio –d sh7723-wheat in=1, out=1