Is your project stuck?

Try Zylin's Roadside Assistance services

End-user nios bootloader

There are numerous bootloaders out there, but the niosecos bootloader solves a number of problem specific to deploying Altera FPGA applications. The bootloader has a crisp feature set that addresses issues that the end user is faced with.

Main 1

Any application or operating system type

The bootloader makes no assumptions about what type of operating system, if any, the application uses.

Support for multiple FPGA images

The FPGA image for the bootloader and application may start out as the same, but should be able to diverge as the firmware is updated. This feature is implemented using the remote update feature in Cyclone III devices. Similar functionality exists for other Altera FPGAs.

Configuration settings

The bootloader and firmware can share a jffs2 flash drive(supported by e.g. Linux and eCos and others), where configuration settings can be stored. These configuration settings can be simple text parameters or larger binary files.

MAC number and TCP/IP configuration

The menu offers a capability to configure the ethernet MAC number and TCP/IP settings via a serial port. The MAC number is stored in a fixed location in flash.

Ymodem upload capability

The bootloader supports upgrading itself or the firmware via Ymodem. The Ymodem update of bootloader provides a last chance at repearing some basic problem in the field.

Normally the firmware would be upgraded while the firmware is running, e.g. via TCP/IP. The bootloader uses a shared module in eCos that allows the firmware as well as the bootloader to perform the upgrade. Typically an application might have a built in web server that allows uploading a new firmware file.

Compressed images

The images are gzip compressed. This achieves a much smaller image size and if the file is corrupt, then gzip has builtin checks that will detect most corruptions and thus the corrupt firmware file can be rejected instead of being programmed into flash.

Baud rate changes

The baud rate is a conservative 38400 by default, but it can be set to 115200 as well.

Upload applications to RAM

In addition to uploading applications to flash, it is also possible to upload applications to RAM. These applications uses the bootloader factory FPGA bit file.

Creating an application image

An application image is easily created. The file format is simply a header and a gzip flash .bin file.
  1. echo >myfile.img ZylinNiosFirmware
  2. gzip myfile.bin
  3. cat >>myfile.img myfile.bin.gz

The flash .bin file consists of the raw FPGA image followed by the application. If the Nios reset address for the application and bootloader image is the same, then the bootloader will jump to the application reset address in flash. Alternatively a different FPGA image can be used for the application that hardcodes how to launch the application.

License

The eCos license is a flexible license that allows commercial closed source applications as well as open source usage.

ZY1000 JTAG Debugger
ARM7/9/11, XScale, Cortex-M3
Fast. No drivers!