The tables below depict the memory layout for the image and for the flash.
Item | Address |
---|---|
OS image loaded at: | 0x88010000 |
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.
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.
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:
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.
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.
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
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).
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 .
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... #
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.
The following table summarizes the commands to launch the various drivers.
Component | Buildfile Command | Required Binaries | Required Libraries | Source Location |
---|---|---|---|---|
Startup | startup-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 |
SPI | spi-master -dsh7723 channel=0
spi-master -u1 -dsh7723 channel=1 | spi-master | spi-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: