wiki:Bootloader

Version 4 (modified by collinsz, 7 years ago) (diff)

--

Current Bootloader Status

Svn containing all bootloader work: http://gauss.bu.edu/redmine/projects/arduino-zero/repository/libs/show/zero_bootloader

  • Communication over a micro usb cable works as normal.
  • Communication over RS485 works, but not for bulk transfers (which use the base64 protocol)
    • Therefore it isn't yet possible to upload sketches over RS485

Procedure to upload a new bootloader

  • Plug the ATMEL programmer into your computer and the Sparkfun board (which should have an 8 pin programming connector next to the reset button).
    • The programming cable should be plugged in under SAM on the programmer.
    • The other end should be plugged into the board with the red wire closer to the tx led (with the 6 pin connector unconnected).
  • The Sparkfun board needs to be powered, either through a micro usb or an external power supply if it's plugged into the motherboard.
    • Now both a red and green light should be lit on the ATMEL programmer.
  • Download the arduino IDE if you haven't already (from arduino.cc)
  • Under the Tools menu and Board Manager, download the "Arduino SAMD Boards (32-bits ARM Cortex-M0+)" package if you haven't already
  • Under the Tools menu, select "Arduino/Genuino Zero (Native USB Port)" for Board, and whichever port has "Arduino/Genuino Zero (Native USB Port)" in parenthesis next to it.
  • Download the "zero" folder from the svn link above (it's located within the trunk folder).
  • Use the make command to make the bootloader (Something about a define to indicate Bootloader number?)
  • Move the zero folder into the arduino bootloader directory, replacing the folder currently named zero.
    • The bootloader directory can be found by pressing "Burn Bootloader" in the Tools menu of the Arduino IDE (Don't worry, doing this will only burn the default arduino bootloader to the board).
  • Once you've replaced the old zero folder with the svn folder, press "burn bootloader" again to upload our bootloader to the board.

Procedure to upload a new arduino sketch

  • Under the Sketch menu "Export Compiled Binary". This binary will be in the folder you can open with "Show Sketch Folder" also in the Sketch menu.
  • Download SamD_funcs_base64.py and program_with_bootloader.py to your rasberry pi.
  • Make sure the rasberry pi is connected to the motherboard with a DB9 cable.
  • Within program_with_bootloader.py change Bootloader_type (below the imports) to the number of the Sparkfun board you want to program.
  • Run program_with_bootloader.py followed by the binary file (eg. "python program_with_bootloader.py Blink.ino.bin" for linux)
    • If "ERROR: not insync" prints, try running the python script again