HowToInstallTheFirmware - ManuFerHi/SiDi-FPGA GitHub Wiki

Firmware files

The SiDi board is fully compatible with the MiST firmware available here:

SiDi - https://github.com/ManuFerHi/SiDi-FPGA/tree/master/Firmware
SiDi128 - https://github.com/ManuFerHi/SiDi-FPGA/tree/master/Firmware_SiDi128

The firmware comes in two formats:

  • firmware.bin is the raw binary of the firmware. This can be uploaded to the SiDi board using special flashers
  • firmware.upg is the same firmware in a format suited for self-update via the on-screen-display (OSD)

These are required for the various ways to update the firmware. Three methods to do so exist:

  • Update via OSD: this is the easiest way and is recommended, but requires a working firmware already present on the board.
  • Update via SAM-BA: this requires a micro USB cable and it is a bit tricky, but it works even if there's no working firmware on the board. This can thus be used for emergency flashing, e.g. after an unsuccessful flash attempt.
  • Update via JTAG: this is the fastest approach but needs a special JTAG interface. This is mainly used during development, but can also be used for emergency flashing, e.g. due to a broke firmware.

Can I brick my SiDi with this?

No, with a flash update you cannot bring the SiDi into a state where it cannot be flashed with a working firmware again. If you broke the firmware (e.g. by unplugging the board while flashing it) you can always use the SAM-BA approach. No further hardware (besides a USB cable) is required for that.

Updating the firmware using the OSD

The easiest way to update the firmware of IO controller is via the OSD menu of the Menu core:

  1. Place the firmware.upg on the SD card (rename the file removing the timestamp if needed)
  2. Boot into the Menu core
  3. Open the OSD (F12) press the right key and select "Firmware & Core"
  4. Press Update and select Yes
  5. The update will take about 5 seconds
  6. The new firmware will reboot automatically

Updating the firmware via SAM-BA in Windows

Alternally the SAM-BA self programming capabilities of the AT91SAM7 based IO controller can be used. This does not require a working setup and can even be used to flash an IO controller with broken firmware after a failed update attempt.

The following steps are necessary to update the SiDi firmware under Windows:

  1. Install Atmel SAM-BA for Windows on your PC
  2. Switch the board off and remove the SD card
  3. Close the FLASH jumper
  4. Switch the board on, wait 10 seconds and switch it off again: the SAM-BA boot loader is now installed
  5. Remove the jumper and connect the board to the PC using a micro USB cable
  6. Power the board on. The PC should recognize the board and install a COM port for it (it will display the COM port number)
  7. Start SAM-BA on the PC. Select the COM device and set board type to at91sam7s256-ek as depicted below

https://raw.githubusercontent.com/wiki/mist-devel/mist-board/mist_samba1.jpg

  1. Select Connect
  2. In the SAM-BA main screen under Scripts select Erase all flash and hit the Execute button

https://raw.githubusercontent.com/wiki/mist-devel/mist-board/mist_samba2.jpg

  1. Select yes when being asked if you want to unlock the flash regions
  2. Select the firmware file firmware.bin under Send File Name and hit the Send File button
  3. The new firmware will now be flashed
  4. Say No when being asked whether you want lock the involved flash regions
  5. Power the board off, disconnect the USB cable, insert the SD card
  6. Power the board on. The new firmware should load.

Updating the firmware via SAM-BA in Linux

Some people have problems to get the Linux version of SAM-BA to work. Instead Sam_I_Am under Linux works fine. The firmware source archive comes with a matching Makefile entry. Install the SAM-BA boot loader as explained above in the Windows section. Then just type make flash_sam to flash the new firmware. The installation of Sam_I_Am on a recent Ubuntu machine required some moving around of files which i don't exactly remember. If in doubt use the windows installer as explained above. See this post for more information on using Sam_I_Am.

Updating firmware in Windows 10

SAM-BA does not yet work with Win10, but the Linux method works by setting up a VirtualBox virtual machine and configuring it to access the physical USB port connected to the SiDi. It should appear in the USB device list as "Atmel Corp. at91sam SAMBA bootloader". If successful the device should be visible in Linux; you can verify it by typing "dmesg | grep tty", and it shoud appear as something like "ttyACM0: USB ACM device". The rest of the process is identical to the Linux approach above.