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

Discussion in 'Switch - Backup Loaders & Modchips' started by mooglazer, Aug 25, 2018.

  1. mooglazer
    OP

    mooglazer GBAtemp Regular

    Member
    4
    Jun 24, 2007
    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. coin.

    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.

    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, Sep 6, 2018
  2. mooglazer
    OP

    mooglazer GBAtemp Regular

    Member
    4
    Jun 24, 2007
    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.
     

    Attached Files:

    Last edited by mooglazer, Dec 7, 2018
  3. linuxares

    linuxares I'm not a generous god!

    Moderator
    15
    Aug 5, 2007
    Sweden
    It's so tiny!
     
  4. mooglazer
    OP

    mooglazer GBAtemp Regular

    Member
    4
    Jun 24, 2007
    United States
    That's what I love about this little device! There's another smaller board I want to try porting the launcher to, when I have time. Just trying to get these chips installed as discreetly as possible. :)
     
  5. mattytrog

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    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, Aug 25, 2018
    Adr990 likes this.
  6. mooglazer
    OP

    mooglazer GBAtemp Regular

    Member
    4
    Jun 24, 2007
    United States
    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).
     
  7. kristiansja

    kristiansja GBAtemp Regular

    Member
    3
    Apr 30, 2016
    Norway
    Thank you. This is by far the cheapest option for me, living in norway. Placed the order :)
     
  8. Rasa39

    Rasa39 LovesCuteShiz

    Member
    5
    Aug 16, 2015
    United Kingdom
    Wow so small, I don't have the balls to wire anything internally for my switch just yet, but nice work :)
     
  9. kristiansja

    kristiansja GBAtemp Regular

    Member
    3
    Apr 30, 2016
    Norway
    just a quick question, is it possible to use uf2 files?
     
  10. mooglazer
    OP

    mooglazer GBAtemp Regular

    Member
    4
    Jun 24, 2007
    United States
    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, Sep 6, 2018
  11. mattytrog

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    It looks like it's using a 48 pin G18. In that case, I'd use itsybitsy or feather bootloader
     
  12. kristiansja

    kristiansja GBAtemp Regular

    Member
    3
    Apr 30, 2016
    Norway
    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, Sep 6, 2018
  13. kristiansja

    kristiansja GBAtemp Regular

    Member
    3
    Apr 30, 2016
    Norway
    well at least i have an raspberry pi 3
     
  14. mattytrog

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    Why do you need a jlink?

    RasPi and OpenOCD will do it.
     
  15. kristiansja

    kristiansja GBAtemp Regular

    Member
    3
    Apr 30, 2016
    Norway
    it was mentioned in an adafruit article, but ye, will probably just use a raspberry pi
     
  16. mooglazer
    OP

    mooglazer GBAtemp Regular

    Member
    4
    Jun 24, 2007
    United States
    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, Sep 12, 2018
  17. mooglazer
    OP

    mooglazer GBAtemp Regular

    Member
    4
    Jun 24, 2007
    United States
    Dec 1, 2018 - updated to use the fusee primary from Atmosphère 0.8.1.
     
    Last edited by mooglazer, Dec 2, 2018
  18. mooglazer
    OP

    mooglazer GBAtemp Regular

    Member
    4
    Jun 24, 2007
    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.
     
    mattytrog likes this.
Loading...