<aside> 💡 Unless you've soldered on a new SAMD51 microcontroller, it's likely the bootloader is already programmed for you.

</aside>

Flashing a new bootloader


Table of Contents

Requirements:

Instructions:

  1. With the requirements above satisfied, plug the JTAG programmer into your computer and open Atmel Studio 7.

  2. Navigate to Tools → Device Programming, as shown:

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5f58ae29-a7c0-48bf-ae63-31f10322dc30/Untitled.png

  3. Select the appropriate Tool and Device from the drop-down menus and click apply.

    ❗ make sure to choose the correct microcontroller part number. Visually check the part markings on the SAMD51 to confirm if it's theSAMD51x20.

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2f600d3a-038b-45cc-a410-8b97e48ff60e/Untitled.png

  4. Navigate to "Memories" on the left-hand side.

  5. Uncheck the "Erase Flash before programming" box, and then click the "..." button, as shown:

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/4e2015d1-ccfa-40da-98a2-7af4740c1bc2/Untitled.png

  6. Navigate to the directory you saved the GitHub firmware files, and change the file parameters from "Programming Files" to "Binary" and shown:

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/90704a97-db02-4fb6-87f4-7d8a820fa8a5/Untitled.png

  7. Select the .bin file downloaded previously and click the "Open" button:

  8. Now make the following connections to the SAM32 board.

    ⭐ if you have a SAM32 v26 or greater, you can connect to the JTAG lines as shown here.

    Required Connections:

  9. With the connections made, return to Atmel Studio 7 and click the "Read" button. A device signature should populate. If an error appears, check connections and troubleshoot the specific error message.

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/c50bc355-fae2-4bfc-99c0-64e2f5cdf830/Untitled.png

  10. After receiving a device signature, click the "Program" button. Programming should only take a few moments.

  11. Successful bootloader programming will trigger the SAM32 board to reboot. After a few moments, the board should mount to the computer as a SAM32BOOT drive.

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ecda831f-7cc9-4837-bd14-a930eac1fa4e/Untitled.png

    Flashing the Firmware:


  12. Drag the CircuitPython firmware .uf2 file downloaded previously to the SAM32BOOT drive:

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7cb7a65b-eedb-4925-a453-e688f49c163d/Untitled.png

  13. As soon as the file is done transferring, the board will reboot again and mount as CIRCUITPY or and is now a functioning CircuitPython board. Congratulations! 🎉

    Note: now is a good time to load the default libraries to the lib folder as described in: Adding/Updating Libraries

Checking the bootloader: