Hacking RELEASE Internal payload device based on Nerdonic Exen Mini (tiny SAMD21 device)

mooglazer

Well-Known Member
OP
Member
Joined
Jun 24, 2007
Messages
213
Trophies
1
XP
690
Country
United States
I've forked Quantum-cross's sam-fusee-launcher-internal and made the code suitable for running on this tiny chip. It's one of the smallest SAMD21 boards out there, and costs a little more than the Trinket M0. I simplified a lot of the code and it should work properly on most any SAMD21 device (internal or external).

This is a "payload injector" / "dongle", suitable for internal or external use.

Product URL: https://nerdonic.com/products/exen/mini
My Repository: https://github.com/blockfeed/sam-fusee-launcher-internal


3.jpg coin.jpg

I did this for fun and hope someone finds it (or the code) useful.

It's a 4-wire install - 3.3v, D+, D- and GND. I recommend removing the power LED (can't be controlled by software) and the microUSB port on the Exen Mini (for size). It blinks once when it powers on, and twice if it fails to find a Switch. I'm personally using it for an AutoRCM install, but it works with a jig setup as well. It can only be updated via the Arduino IDE (initially).

That said - this includes Hekate 4, which supports loading a newer payload from the SD card. So once the Exen is programmed, you should never have to update it again. Just copy your new payload to /bootloader/update.bin and you're all set.

Internal:

blockfeed-install.jpg

External:

IMG_8486.JPG

Install instructions/images are in the repository README.

(With any AutoRCM install, be sure to power off using the Hekate menu.)

** IF YOU DO NOT HAVE THE TOOLS OR SKILL TO INSTALL THIS, DO NOT ATTEMPT **

I'm not responsible if you kill your Switch.
 
Last edited by mooglazer,

mooglazer

Well-Known Member
OP
Member
Joined
Jun 24, 2007
Messages
213
Trophies
1
XP
690
Country
United States
Updates:

12/6/2018:

Added payloads for Atmosphere 0.8.1 and Hekate 4.5. Check the commits. I recommend you flash Hekate 4.5 and then load the Atmosphere primary as your primary payload ( payload={SD path} from the Hekate readme ).
This offers a custom bootscreen and all the features of Hekate, which then drops you into Atmosphere proper.


Alternative bootloader

This device can be flashed with the adafruit uf2-samdx1 bootloader (so it works like a trinket m0, effectively).

Attached is the UF2 for CTCaer Hekate 4, built for the Exen Mini.

You will need to program the bootloader with OpenOCD (or your program of choice), and that's outside the scope of this post.

Converting payloads - binconvert.py no longer functions (9/28/2018)

// Open hekate bin with HxD, go to "export" and export it as "c" then rename to .h
// Note the header, it will be something along the lines of:
//
// unsigned char rawData[123087] = {
//
// The header of the new .h file will need to be replaced with the following:
//
// #include <Arduino.h>
// #define FUSEE_BIN_SIZE 123087
// const PROGMEM byte fuseeBin[FUSEE_BIN_SIZE] = {
//
// Update FUSEE_BIN_SIZE to whatever the reported size is for the C file.
//
// For 4.2, this size is 123087.
 

Attachments

  • bootloader-zero-v2.0.0-adafruit.5-4-g0a2294c.rar
    6.1 KB · Views: 206
Last edited by mooglazer,

mattytrog

You don`t want to listen to anything I say.
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
If I can help, let me know! First thing I`d do is build / flash the trinket bootloader on it.

Why don`t they break out USB D+/D-?

I`ve got an ItsyBitsy in one of ours at the moment.
 
Last edited by mattytrog,
  • Like
Reactions: Adr990

mooglazer

Well-Known Member
OP
Member
Joined
Jun 24, 2007
Messages
213
Trophies
1
XP
690
Country
United States
If I can help, let me know! First thing I`d do is build / flash the trinket bootloader on it.

Why don`t they break out USB D+/D-?

Thanks! I've managed to get the MS uf2-samdx1 bootloader working properly (where it works like the trinket does with UF2), but I'm still ironing out a few things. Curse this lack of free time!

I'm not sure why USB+/- aren't broken out. I can think of several cases where this would be really useful (not just specific to this application).
 

mooglazer

Well-Known Member
OP
Member
Joined
Jun 24, 2007
Messages
213
Trophies
1
XP
690
Country
United States
just a quick question, is it possible to use uf2 files?

You can if you upload the bootloader to the adafruit version (you need a Raspberry Pi, at minimum). If you want to keep your life simple, I would recommend flashing the included Hekate 4 payload, using the Arduino IDE.

If in the future there's another payload you want to use, you can copy your payload to /bootloader/update.bin (on the SD card). I've not used this feature, personally, but it should work.

This is documented in the README:
https://github.com/CTCaer/hekate/blob/master/README.md

Hope this helps!
 
Last edited by mooglazer,

mattytrog

You don`t want to listen to anything I say.
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
It looks like it's using a 48 pin G18. In that case, I'd use itsybitsy or feather bootloader
 

kristiansja

Well-Known Member
Member
Joined
Apr 30, 2016
Messages
111
Trophies
0
Age
24
XP
483
Country
Norway
It looks like it's using a 48 pin G18. In that case, I'd use itsybitsy or feather bootloader
didnt know i needed a j-link. Think this might be a bit too much


Edit:
didnt know you could flash the bootloader with arduion, think "update-bootloader-itsybitsy_m0-v2.0.0-adafruit.5.ino" might do it. Havent gotten the board yet tough
 
Last edited by kristiansja,

mattytrog

You don`t want to listen to anything I say.
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
didnt know i needed a j-link. Think this might be a bit too much


Edit:
didnt know you could flash the bootloader with arduion, think "update-bootloader-itsybitsy_m0-v2.0.0-adafruit.5.ino" might do it. Havent gotten the board yet tough

Why do you need a jlink?

RasPi and OpenOCD will do it.
 

mooglazer

Well-Known Member
OP
Member
Joined
Jun 24, 2007
Messages
213
Trophies
1
XP
690
Country
United States
Why do you need a jlink?

It's a bit more straightforward. I've used OpenOCD several times over the years, but it has some issues, especially when you need to reset DWORD values.

OpenOCD on newer PIs is fine, but it's touch-and-go with older models. A JLink or even Bluepill is reliable.

edit: Not sure if JLink is more expensive in EU, but you can get a very inexpensive one in the US, probably for less than a Pi. It works with OpenOCD (if that's your thing) and works with Windows/Linux/etc. If you want to talk about cheap, get a Bluepill and flash STM32-DAP, and voila. $2 > $10 pi. I've not used it but have one flashed in case I do.
 
Last edited by mooglazer,

mooglazer

Well-Known Member
OP
Member
Joined
Jun 24, 2007
Messages
213
Trophies
1
XP
690
Country
United States
12/6/2018

Added payloads for Atmosphere 0.8.1 and Hekate 4.5. Check the commits. I recommend you flash Hekate 4.5 and then load the Atmosphere primary as your primary payload ( payload={SD path} from the Hekate readme ).

This offers a custom bootscreen and all the features of Hekate, which then drops you into Atmosphere proper.
 
  • Like
Reactions: mattytrog

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: Imma make quesadillas for lunch :D +1