Project Home
Project Home
Wiki
Wiki
Project Information
Project Info
wiki2978: Nto640FreescaleMgt5200b1.0.0Releasenotes (Version 32)


Release Notes for the QNX Neutrino 6.4.0 BSP for Freescale Lite5200B and Media5200 1.0.0#

System requirements#

Target system
  • QNX Neutrino RTOS 6.4.0
  • Board version: Lite5200B or Media5200
  • MPC5200B processor (based on MPC603e series)
  • 32 MB flash on the Lite5200B / 64 MB flash on Media5200

Host development system

  • QNX Momentics 6.4.0
  • Terminal emulation program (Qtalk, Momentics IDE Terminal, tip, HyperTerminal, etc.)
  • RS-232 serial port and serial cable, or a USB-to-serial cable
  • Ethernet link
  • For other system requirements (e.g. disk, RAM), see the installation notes for QNX Momentics.


System Layout#

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

Memory layout

ItemAddress
OS image loaded at: 0x00020000
Ethernet base address 0xf0003000 (IRQ: 69, 140)
USB base address 0xf0001000 (IRQ: 70)
PSC base address (Lite5200B) 0xf0002000 (IRQ: 65)
PSC base address (Media5200) 0xf0002c00 (IRQ: 68)

Flash layout for Lite5200B (U-Boot view)

Flash layout Flash start address Size
U-Boot 0xfff00000 1 MB
Empty 0xff500000 10 MB (variable)
OS Image 0xff080000 4.5 MB (variable)
IPL 0xff000000 512 KB
Empty 0xfe000000 16 MB

Flash layout for Lite5200B (IPL view)

Flash layoutFlash start addressSize
Empty 0xff000000 16 MB
U-Boot 0xfef00000 1 MB
Empty 0xfe500000 10 MB (variable)
OS Image 0xfe080000 4.5 MB (variable)
IPL 0xfe000000 512 KB

Flash layout for Media5200 (U-Boot or IPL view)

Flash layoutFlash start addressSize
U-Boot 0xfff00000 1 MB
Empty 0xfe500000 26 MB (variable)
OS Image 0xfe080000 4.5 MB (variable)
IPL 0xfe000000 512 KB
Empty 0xfc000000 32 MB

The interrupt vector table can be found in the buildfile located at src/hardware/startup/boards/mgt5200B/build


Getting Started#

Starting Neutrino#

Step 1: Build the BSP
You can build a BSP OS image from the source code or the binary components contained in a BSP package.

For instructions about building a BSP OS image, please refer to the chapter Working with a BSP in the Building Embedded Systems manual.

Note: This BSP will build a default OS image for the Freescale Media5200 board. If you need to build an OS image for the Freescale Lite5200B, you need to change the buildfile. The buildfile has commented-out sections for the Lite5200B. Simply uncomment them and comment out the Media5200 sections.

Step 2: Connect your hardware

  1. Setup the board. Refer to the manual for the correct default jumper settings to use.
  2. Connect one end of the serial NULL-modem cable to the J3 serial port.
  3. Connect the other end of the serial NULL-modem cable to the first available serial port of your host machine (e.g. ser1 on a Neutrino host).
  4. Connect an RJ-45 Ethernet cable to J6 (100/10 Mbit Ethernet RJ-45 connector).
  5. Connect the other end of the Ethernet cable to the Ethernet network where a TFTP server (which you'll use to transfer the boot image) exists.

On your host machine, start your favourite terminal program with these settings:

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

Then, apply power to the target board.

You should see output similar to the following if you are using the Lite5200B or Media5200:

U-Boot 1.1.3 (Jul 11 2005 - 16:46:38)

CPU:   MPC5200 v2.1 at 462 MHz
       Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
Board: Freescale MPC5200 (Lite5200B)
I2C:   85 kHz, ready
DRAM:  256 MB
FLASH: 32 MB
PCI:   Bus Dev VenId DevId Class Int
        00  1a  1057  5809  0680  00
In:    serial
Out:   serial
Err:   serial
Net:   FEC ETHERNET
IDE:   Bus 0: OK
  Device 0: not available
  Device 1: not available

Type "run flash_nfs" to mount root filesystem over NFS

Hit any key to stop autoboot:  0
=>

Step 3: Transfer the OS image to the target using the ROM monitor

  1. At the U-boot prompt, issue the following command to view the current environment:
    printenv
  2. Set the baud rate and follow the instructions:
    setenv baudrate 115200
  3. Set the local IP address (replace x.x.x.x with the desired IP address):
    setenv ipaddr x.x.x.x
  4. Set the IP address for your host TFTP server (replace x.x.x.x with the desired IP address):
    setenv serverip x.x.x.x
  5. Set the gateway address (replace x.x.x.x with the desired IP address):
    setenv gatewayip x.x.x.x
  6. Specify the image or fullpath to the OS image (on the host machine):
    setenv bootfile /full_path_to_image/image.raw
  7. Once the above setup is complete, save the environment to the onboard EEPROM:
    saveenv
  8. Copy the image from your host to the target:
    tftpboot loadaddr
    At this point you should see the ROM monitor download the boot image, indicated by a series of dots.
  9. Type:
    go loadaddr

You should now see the QNX Neutrino welcome message on your terminal screen:

Welcome to QNX Neutrino 6.4 on the Freescale Lite5200B / Media5200

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

Once the initial image is running, you can update the OS image using the network and flash drivers. For sample command lines, please see the "Summary of driver commands" section.

Starting the flash driver

  • To start the flash driver on the Lite5200B, enter the following command:
    devf-mgt5200 -s0xfe000000,32M
  • To start the flash driver on the Media5200, enter the following command:
    devf-mgt5200 -s0xfc000000,64M

Putting the IPL and OS image on the flash (Lite5200B)#

  1. Generate the IPL and OS image.
    • The IPL and the OS image do not need to be combined.
  2. Transfer the OS image to the target memory and burn it into flash:
    U-Boot should be located at the high boot address in flash (i.e. 0xfff00000). You can boot from high addresses or low addresses depending on the position of the switch HI/LO from the SW1 switch bank. Select HI for booting from U-Boot. Select LO for booting from IPL.
    From the U-Boot prompt, type the following commands:
    • Setup the file to transfer to RAM:
      setenv bootfile /full_path_to_image/image.raw
    • Transfer the OS image to RAM:
      tftpboot 0x20000
      Note: The OS image will be put in flash at the offset 16.5 MB (i.e. 0xff080000). We reserve the first 512 KB of the second 16 MB flash bank for the IPL.
    • Unprotect the flash banks:
      protect off all
    • Erase the flash from the offset 16.5 MB to the offset 21 MB:
      erase 0xff080000 0xff4fffff
      Note: In this example, we assume that the OS image size is smaller than 4.5 MB.
    • Copy the OS image from RAM (0x20000) to flash (0xff080000):
      cp.l 0x20000 0xff080000 0x00120000
      • 0x0120000 is a long (4 bytes). So 4 x 0x0120000 is 4.5 MBytes.
  3. Transfer the IPL to the target memory and burn it into flash:
    From the U-Boot prompt, type the following commands:
    • Setup the file to transfer to RAM:
      setenv bootfile /full_path_to_ipl/ipl.bin
    • Transfer the IPL to RAM:
      tftpboot 0x20000
      • The IPL will be put in flash at the offset 16 MB (0xff000000):
    • Erase the flash for 512 KB:
      erase 0xff000000 0xff07ffff
    • Copy the IPL from RAM (0x20000) to flash (0xff000000):
      cp.l 0x20000 0xff000000 0x00020000
      • In this example, we copy 512 KB of data from RAM to flash. This is fine as long as the IPL is smaller than 512 KB.
      • If anything bad happens during the copy of the IPL into the Lite5200B, you can always switch J10 to use the backup flash to boot. (Lite5200B only) When booting from the backup U-boot the main flash will be erased and U-boot will copied automatically to it. Once completed, switch J10 back to its original position and try again the steps 1 and 2.
  4. Move the switch HI/LO from the SW1 switch bank to LO in order to boot from IPL.
  5. Reset the board. You should now see output similar to the following:
Welcome to QNX Neutrino 6.4 on the Freescale Lite5200B / Media5200
Starting on-board ethernet with large stack and cache...
#

Putting the IPL and OS image on the flash (Media5200)#

  1. Generate the IPL and OS image (using the method in "Step 2: Generate an OS image").
    • The IPL and the OS image do not need to be combined.
  2. Transfer the OS image to the target memory and burn it into flash:
    • Note: U-Boot should be located at the high boot address in flash (i.e. 0xfff00000). You can boot from high addresses or low addresses depending on the position of the jumper J9. Select HIGH for booting from U-Boot. Select LOW for booting from IPL.
      From the U-Boot prompt, type the following commands:
    • Setup the file to transfer to RAM:
      setenv bootfile /full_path_to_image/image.raw
    • Transfer the OS image to RAM:
      tftpboot 0x20000
      Note: The OS image will be put in flash at the offset 32.5 MB (i.e. 0xfe080000): We reserve the first 512 KB of second flash bank for the IPL.
    • Unprotect the flash banks:
      protect off all
    • Erase the flash from the offset 32.5 MB to the offset 37 MB:
      erase 0xfe080000 0xfe4fffff
      • In this example, we assume that the OS image size is smaller than 4.5 MB.
    • Copy the OS image from RAM (0x20000) to flash (0xfe080000):
      cp.l 0x20000 0xfe080000 0x00120000
      • 0x0120000 is a long (4 bytes). So 4 x 0x0120000 is 4.5 MB.
  3. Transfer the IPL to the target memory and burn it into flash:
    From the U-Boot prompt, type the following commands:
    • Setup the file to transfer to RAM:
      setenv bootfile /full_path_to_ipl/ipl.bin
    • Transfer the IPL to RAM:
      tftpboot 0x20000
      • The IPL will be put in flash at the offset 32 MB (0xfe000000).
    • Erase the flash for 512 KB:
      erase 0xfe000000 0xfe07ffff
    • Copy the IPL from RAM (0x20000) to flash (0xfe000000):
      cp.l 0x20000 0xfe000000 0x00020000
      • In this example, we copy 512 KB of data from RAM to flash. This is fine as long as the IPL is smaller than 512 KB.
      • If anything bad happens during the copy of the IPL, you can always boot from U-Boot
  4. Move the jumper J9 to LOW in order to boot from IPL.
  5. Reset the board. You should now see output similar to the following:
Welcome to QNX Neutrino 6.3 on the Freescale Lite5200B / Media5200 
Starting on-board ethernet with large stack and cache...
#

Creating a flash partition (Lite5200B -- booting from u-boot)#

Note:
Partitions created while booting from u-boot may not function properly in an OS booted from IPL. It is also true that partitions created when booting with the IPL may not function properly when booting from u-boot. Partitions must be created and used from the same boot source.
  1. Enter the following command to start the flash filesystem driver:
    devf-mgt5200 -s0xfe000000,32M
  2. To prepare the area for the partition, enter the following command:
    • If you've burned the IPL and OS image on the flash, you may not want to erase them. Use the -l (length) and -o (offset) options to avoid these areas.
      Assuming that the OS image has a maximum size of 4.5 MB:
      flashctl -p/dev/fs0 -l16M -ve
  3. Format the partition:
    flashctl -p/dev/fs0p0 -l16M -vf
  4. Slay, then restart the driver:
    slay devf-mgt5200
    devf-mgt5200 -s0xfe000000,32M

In this example, you have a 16 MB flash partition You should now have a /fs0p0 directory which you can copy files to.
On the Lite5200B, the above steps will leave the upper flash chip untouched. You can use flashctl to erase and format it if required.


  1. Enter the following command to start the flash filesystem driver:
    devf-mgt5200 -s0xfe000000,32M
    • If you've burned the IPL and OS image on the upper bank of flash, you may not want to erase them. Also the U-Boot ROM monitor is located by default at the offset 16 MB in flash. Use the -l (length) and -o (offset) options to avoid these areas.
  2. You can format the upper 16 MB with the following command:
    flashctl -p/dev/fs0p1 -o5M -l10M -ve
  3. Format the partition:
    flashctl -p/dev/fs0p1 -o5M -l10M -vf
  4. Slay, then restart the driver:
    slay devf-mgt5200
    devf-mgt5200 -s0xfe000000,32M

In this example, you have a 10MB flash partition starting at the end of the OS image (22 MB offset). This includes 512 KB for the IPL. You should now have a /fs0p2 directory which you can copy files to. The last 1 MB of flash is reserved for U-Boot

Creating a flash partition (Lite5200B -- booting from the IPL)#

Note:
Partitions created while booting from u-boot may not function properly in an OS booted from IPL. It is also true that partitions created when booting from the IPL may not function properly when booting from u-boot. Partitions must be created and used from the same boot source.
  1. Enter the following command to start the flash filesystem driver:
    devf-mgt5200 -s0xfe000000,32M
  2. To prepare the area for the partition, enter the following command:
    • If you've burned the IPL and OS image on the flash, you may not want to erase them. Use the -l (length) and -o (offset) options to avoid these areas.
    • Caution: On the Lite5200B, from U-Boot, the Chip Select 0 (CS0) is asserted for the address range 0xff000000-0xffffffff and the Chip Select 1 (CS1) is asserted for the address range 0xfe000000-0xfeffffff However, from the IPL, the CS1 is asserted for the address range 0xff000000-0xffffffff and the CS0 is asserted for the address range 0xfe000000-0xfeffffff CS0 and CS1 are connected to the flash.
    • Assuming that the OS image has a maximum size of 4.5 MB:
      flashctl -p/dev/fs0 -o5M -l10M -ve
  3. Format the partition:
    flashctl -p/dev/fs0p0 -o5M -l10M -vf
  4. Slay, then restart the driver:
    slay devf-mgt5200
    devf-mgt5200 -s0xfe000000,32M

In this example, you have a 10 MB flash partition starting at the end of the OS image (5 MB offset). This includes 512 KB for the IPL. You should now have a /fs0p1 directory which you can copy files to. The last 1 MB of flash is reserved for U-Boot.
On the Lite5200B, the above steps will leave the upper flash chip untouched. You can use flashctl to erase and format it if required.


  1. Enter the following command to start the flash filesystem driver:
    devf-mgt5200 -s0xfe000000,32M
    • If you've burned the IPL and OS image on the lower bank of flash, you may not want to erase them. Also the U-Boot ROM monitor is located by default at the offset 16 MB in flash. Use the -l (length) and -o (offset) options to avoid these areas.
  2. You can format the upper 16 MB with the following command:
    flashctl -p/dev/fs0p2 -o1M -l16M -ve
  3. Format the partition:
    flashctl -p/dev/fs0p2 -o1M -l16M -vf
  4. Slay, then restart the driver:
    slay devf-mgt5200
    devf-mgt5200 -s0xfe000000,32M

In this example, you have a 16 MB flash partition starting at the offset 16 MB. This You should now have a /fs0p3 directory which you can copy files to.

Creating a flash partition (Media5200)#

  1. Enter the following command to start the flash filesystem driver:
    devf-mgt5200 -s0xfc000000,64M
  2. To prepare the area for the partition, enter the following command:
    flashctl -p/dev/fs0 -l32M -ve
  3. Format the first partition:
    flashctl -p/dev/fs0p0 -l32M -vf
  4. Slay, then restart the driver:
    slay devf-mgt5200
    devf-mgt5200 -s0xfc000000,64M

In this example, you have a 32 MB flash partition starting at offset 0 MB of the first flash bank. You should now have a /fs0p0 directory which you can copy files to.
On the Media5200, the above steps will leave the second flash chip untouched. You can use flashctl to erase and format it if required.


  1. Enter the following command to start the flash filesystem driver:
    devf-mgt5200 -s0xfc000000,64M
    • If you've burned the IPL and OS image on the second bank of flash, you may not want to erase them. Also the U-Boot ROM monitor is located by default on the last megabyte of flash. Use the -l (length) and -o (offset) options to avoid these areas.
  2. To prepare the area for the partition, enter the following command:
    • Assuming that the OS image has a maximum size of 4.5 MB:
      flashctl -p/dev/fs0p1 -o5M -l26M -ve
  3. Format the partition:
    flashctl -p/dev/fs0p1 -o5M -l26M -vf
  4. Slay, then restart the driver:
    slay devf-mgt5200
    devf-mgt5200 -s0xfc000000,64M

In this example, you have a 26 MB flash partition starting at the end of the OS image (5 MB offset). This example also leaves 512 KB for the IPL at the begining of the second flash bank and 1 MB for the U-Boot ROM monitor at the end of that flash bank. You should now have a /fs0p2 directory which you can copy files to.

Driver Command Summary#

Note:
The bestcomm5200 utility needs to run prior to launch Ethernet, audio, graphics and ATAPI drivers. However you'll only need to run it once.

ComponentBuildfile CommandRequired BinariesRequired LibrariesSource Location
Startupstartup-mgt5200B..src/hardware/startup/boards/mgt5200B
Serial (Lite5200B)devc-serpsc -c 132000000 -u 1 -e -F -S -b 115200 0xf0002000,65devc-serpsc.src/hardware/devc/serpsc
Serial (Media5200)devc-serpsc -c 132000000 -u 1 -e -F -S -b 115200 0xf0002c00,68 devc-serpsc.src/hardware/devc/serpsc
Flash (Lite5200B)devf-mgt5200 -s0xfe000000,32Mdevf-mgt5200.src/hardware/flash/boards/mgt5200
Flash (Media5200)devf-mgt5200 -s0xfc000000,64Mdevf-mgt5200.src/hardware/flash/boards/mgt5200
PCIpci-mgt5200pci-mgt5200.src/hardware/pci/mgt5200
Ethernet (Lite5200B)bestcomm5200
io-pkt-v4 -dmpc5200 mac=xxxxxxxxxxxx
ifconfig en0 x.x.x.x
io-pkt-v4
ifconfig
bestcomm5200
devnp-shim.so
libsocket.so
devn-mpc5200.so
libdma-bestcomm5200.so
src/hardware/devn/mpc5200
Ethernet (Media5200)bestcomm5200
io-pkt-v4 -dmpc5200
ifconfig en0 x.x.x.x
io-pkt-v4
ifconfig
bestcomm5200
devnp-shim.so
libsocket.so
devn-mpc5200.so
libdma-bestcomm5200.so
src/hardware/devn/mpc5200
USBio-usb -d ohci-mgt5200 ioport=0xf0001000,irq=70io-usbdevu-ohci-mgt5200.so
libusbdi.so
.
ATA/ATAPI (Lite5200B)bestcomm5200
devb-eide-mpc5200 eide bs=ata_cs=1
bestcomm5200
devb-eide-mpc5200
libcam.so
io-blk.so
cam-xxx.so
fs-xxx.so
libdma-bestcomm5200.so
.
ATA/ATAPI (Media5200)bestcomm5200
devb-eide-mpc5200 eide bs=ata_cs=4
bestcomm5200
devb-eide-mpc5200
libcam.so
io-blk.so
cam-xxx.so
fs-xxx.so
libdma-bestcomm5200.so
.
SPIspi-mpc5200spi-mpc5200.src/hardware/spi/mpc5200
I2C (Lite5200B)i2c-mpc5200i2c-mpc5200.src/hardware/i2c/mpc5200
I2C (Media5200)i2c-mpc5200 -m0 --u0
i2c-mpc5200 -m1 --u1
i2c-mpc5200.src/hardware/i2c/mpc5200
Attachments:
Text coral.conf [Nto640FreescaleMgt5200b1.0.0Releasenotes/coral.conf]