Close
0%
0%

SAMD Fusee Loader

A mini SAMD21 board with CR2032 backpack. Can be used for fusee gelee or other DIY projects

Similar projects worth following
Like many others, I spliced a trinket onto a CR2032 battery holder in order to boot hekate and back up the NAND on my switch. It worked, but was a big ugly and hacky so I decided to integrate it all into a single PCB. Now with larger D+/D- pads for hand soldering the USB connections if you so desire.

NOTE: I do not endorse or condone piracy or unauthorized backups. My usage is limited to NAND backups, and I suggest the same to you. Backup loading and other hacking can be detected, resulting in a ban from online gaming. Don't do anything you don't understand, and don't engage in hardware hacking unless you accept the risk that you alone are responsible for any damage you may cause to your equipment.

This project is a small dongle carrying a SAMD21 from Atmel along with a CR2032 battery holder and USB b port for use as a portable fusee launcher. 

I built it to get a little more familiar with the Cortex M0 offerings from Atmel, as well as to make myself a nice, compact device that I could use for Switch experimentation as well as other projects.

This project is using the UF2 bootloader, which is the most amazing idea that anyone has ever come up with - thanks, Microsoft!  The UF2 bootloader impersonates a virtual flash drive when plugged into USB and reset is double clicked, allowing reading and writing firmware with a simple drag/drop operation.  Very slick!

The project is also compatible with the Arduino platform using the bossac loader.  Personally, I use an STM32 blue pill flashed to CMSIS-DAP to do my low-level programming, but for a simple setup Arduino can't be beat!

The discussion thread of me chatting during the build is on gbatemp

https://gbatemp.net/threads/my-dongle-project-internal-external-samd-loader-with-cr2032-holder.513755/

And if you would like to purchase a completed board, the Paypal Buy now button over here is best for me (lowest fees)

http://openschemes.com/2018/08/07/openschemes-samd-fusee-gelee-loader/

And the board is certainly available on Tindie

https://www.tindie.com/products/13711/

Firmware files for the three most popular loaders (hekate, ReiNX, and SXOS) are found below in the files section.  To switch, plug the board into USB, double click reset, and drag the 3 files from inside the zip onto the flash drive that pops up (Drive name is FIRMWARE)

SAMD21_Loader_SX-Launcher.zip

SXOS Launcher payload for the SAMD Loader - UF2 (drag & drop) format

x-zip-compressed - 34.31 kB - 08/10/2018 at 01:54

Download

SAMD21_Loader_ReiNX.zip

ReiNX Launcher payload for the SAMD Loader - UF2 (drag & drop) format

x-zip-compressed - 70.79 kB - 08/10/2018 at 01:54

Download

SAMD21_Loader_hekate_v3p2.zip

hekate payload for the SAMD Loader - UF2 (drag & drop) format

x-zip-compressed - 107.31 kB - 08/10/2018 at 01:53

Download

  • openocd flash script

    electronrancher5 days ago 0 comments

    Turns out, openocd is hard for people to use!   It's true that it has a billion obscure options, but once you've gone through the pain of using it on a few chips, it just makes sense!

    I wanted to add my flashing script (openocd.cfg) here to show an example of a working setup using openocd 0.10 and an STM32 Blue Pill flashed to the CMSIS-DAP firmware.  This is what I use to do the initial flash on my boards. 

    My bin file contains both the UF2 bootloader as well as a fimware, but it's really only necessary to use openocd to flash the bootloader on a fresh chip.  After UF2 is on there, you can use USB to drag and drop firmware on very easily.  However, it saves a step for me if I flash both of them at once so that's the way I do it. 

    As for how you merge the bootloader and firmware into a single bin file?  Don't ask, it's a bit messy.  If you want this bin file just PM me.  Cheers!

    interface cmsis-dap
    transport select swd
    #Target
    set CHIPNAME at91samd21e18
    source [find target/at91samdXX2.cfg]
    #source [find target/stm32f1x.cfg]
    
    init
    targets
    reset halt
    at91samd chip-erase
    reset halt
    at91samd bootloader 0
    program D:/projects/SAMD_Loader/Firmware/all.bin verify
    at91samd bootloader 8192
    reset
    shutdown

  • Github links for Firmware and Bootloader

    electronrancher6 days ago 0 comments

    Here are the Github links for the source code used in this project.  If you want to go a-hacking, you will most likely want the Launcher firmware.  The bootloader code is included for those who are interested, but it's not needed unless you are starting out with a factory-fresh chip.  After the initial bootloader flashing, all further flashing of firmware, etc is done either through Arduino, or better yet - by dropping a UF2 file onto the USB device itself.  (Double click reset to open the USB firmware drive for drag & drop flashing)

    Launcher Firmware Source Code (Arduino Sketch)

    https://github.com/electronrancher/sam-fusee-launcher

    Bootloader Source Code

    https://github.com/electronrancher/uf2-samdx1


  • 8/4/18 - It's Alive!

    electronrancher08/05/2018 at 18:08 0 comments

    Here is a quick demo of the SAMD Loader in action.  It's a pretty straightforward operation:

    1) Paperclip or use a RCM clip on the right hand joystick slot

    2) Power up SAMD Loader, get a fast blue blink (Looking for USB)

    3) Hold Vol + and Power up, blinking will pause for a moment as USB enumerates.

    4) Short/Long blink (Ta Daa!) signifies sending and launching the payload

    5) Enjoy!

    Here I am sending SX Launcher, as I just use my own hekate build stored on SD.  But I have a firmware that sends hekate directly if preferred.  Really, the firmware can be recompiled with any payload you like. To convert a bin file payload to a header for inclusion in the firmware, just use the "bin2header" tool from github to convert.

  • 8/4/18 - Flashing the firmware

    electronrancher08/05/2018 at 17:58 0 comments

    I flash my firmware using openocd and an STM32 "Blue Pill" flashed to the CMSIS-DAP firmware.  I use openocd to flash a bin file that contains both the UF2 bootloader as well as the fusee firmware.  It's a bit more convenient to do it all in one shot than to flash the bootloader first and then switch to USB or arduino for the firmware.  After this initial programming, I use the USB virtual flash drive from the UF2 bootloader to modify or change firmware as openocd is no longer needed.

    For this project, I just use the blue pill to directly contact the four programming pads I placed on the SAMD board.  A little bend in the blue pill headers give a nice springy connection that I can pop on and use to hold the board steady while flashing.  This initial flash takes about 30 seconds, so it's pretty quick to do a batch of 10 or 20.

  • 8/4/18 - Placing the SAMD Loader

    electronrancher08/05/2018 at 17:31 0 comments

    Here you can see a video of the placer building the very first SAMD loader.  Fingers Crossed!

  • 8/3/18 (Late o'clock) Pick and Place Programmed

    electronrancher08/05/2018 at 17:18 0 comments

    It always takes a few hours to program the pick & place.  Here I am using a bunch of components on cut tape, so I just stick them to a board and use the vision system to set the location of the first and last part.  That's the first part of project setup for the placer, and takes an hour or so unless you bump a strip of 0603 LEDs and have half of them jump out into a scattered pile.  Then, it takes longer.  :)

    Here you see the PCB panel on the right, and components stuck to a wooden plank on the left.  From left, it's Battery Clip, Switch and Reset Button above it, USB socket, SAMD and LDO above that, then two rows of LEDs - blue and green.

    Some components like caps are already mounted in reels on the side of the machine, but there are always a handful of custom components (or ones that are too expensive to buy a full reel!!) that I use cut tape for.

    The next part of setup is verifying the placement and orientation by running a placing cycle (usually for one component only) with double face tape on the PCB.  The machine grabs the part, checks it, and sticks it where Eagle said it should go.  It's usually perfect, but a few oddball devices like the USB port had a center location different from what Eagle outputs and need editing.

    It's tedious, but if you're making a bunch of boards it is much easier to take the pain now in exchange for MUCH faster assembly than doing it by hand.

  • 8/3/18 - Boards Arrive

    electronrancher08/05/2018 at 17:04 0 comments

    After a bit of weather delay in transit, boards for the SAMD Loader have arrived!  Everything looks good, time to start programming the pick & place

View all 7 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates