Tutorial  Updated

How To Flash The Trinket M0 Using Arduino

Arduino Setup For Use With The Trinket M0 Switch D-I-Y Dongle..

Step 1)

Install The Arduino-1.8.5 Software & Adafruit_Drivers_2.2.0.0

Step 2)

Once Both Are Installed Run The Arduino Software & Goto Flies,Scroll Down To Preferences Tab, Settings Pops Up Go Down To Additional Boards Manager URLs And Click The Box On The Right Of The Blank Space.

1.jpg
2.jpg
boards manager url.jpg


Step 3)

The Additional Boards Manager URL Box Will Pop Up, Now Copy & Paste This URL Into The Box, (CTRL+V) To Paste https://adafruit.github.io/arduino-board-index/package_adafruit_index.json Into The Box Then Press Ok & Ok Again.

4.jpg
3.jpg


Step 4)

Now Goto The Tools Tab & Scroll to Board & Select Board Manager Once The Board Manager Pops Up, Type Trinket In The Search Bar Then Click On Adafruit SAMD Boards by Adafruit & Click On Install, Once The Install Has Completed Then Click On The Close Tab.

tools.jpg

board manager.jpg

type trinket.jpg

install trinket.jpg
installed.jpg


Step 5)

Now Close Arduino Software & Goto C:\Program Files (x86)\Arduino\examples Folder & Place The 12.Nintendo_Switch_Fusee_Launcher Folder Into The Examples Folder,Once Thats Done You Can Close Everything.

examples folder.jpg
flash files.jpg


Step 6)
Now Your All Set To Flash Any One Of The Payloads To The Trinket M0 Dongle, So Restart The Arduino Software & Goto Tools Then Scroll Down To Board & Locate The Adafruit Trinket M0 Board & Select It, You Should See Adafruit Trinket M0 on Com4 or A Different Number Com Port In Bottom Right Corner.

tools.jpg
select trinket M0.jpg


Step 7)
Now Plug In Your Trinket M0 Then Goto Tools Again & Scroll Down To Port & Select The Port That The Trinket M0 Is Contected To, If Unsure Then Goto Device Manager Then Ports(COM & LPT) & It'll Show The Trinket M0 & COM Number It's Connected To.

select port.jpg


Step 8)
Now Goto File & Scroll Down To Examples Then Scroll To 12.Nintendo_Switch_Fusee_Launcher & Select One Of The Payloads You Want To Flash To The Trinket.

select the flash file.jpg


Step 9)
Now The Payload Of Your Choice Pops Up & Your Ready To Go.

loaded flash.jpg


Step 10)
You Want To Compile The Sketch Ready To Flash & Make Sure No Issues Before You Flash, Just Click On The Tick.

verify.jpg


Step 11)
Now Compiling Is Done Your Ready To Flash To The Trinket M0, So Click On The Arrow Tab To Upload To The Trinket & Wait For The Flash To Complete, You Should See Upload Done Message Once That Is Shown Then You Can Remove The Trinket From Your Pc Or Laptop.

done compiling.jpg
upload.jpg


Final Step)
If All Went Well Then Your Ready To Use Your New D-I-Y Trinket M0 Dongle.
Make Sure You Have The Correct Sd Card Files For The Payload That You Flashed To The Trinket.


If You Get This Error When Trying To Upload Your Payload File.

java.io.IOException: Cannot run program "{runtime.tools.bossac-1.7.0.path}/bossac": CreateProcess error=2, The system cannot find the file specified

Then This Is The Fix For The Error
Goto Tools Scroll To Boards Then Select Board Manager And Type Arduino SAMD Into The Search Bar.

error.jpg


Then Once Installed Click The Close Tab,Now You Can Upload Your Payload File.

Think That Covers Everythig.

Edit..

Updated Payload INO Files These Are Now All In One, So You Enable The Payload You WantTo Use, And Disable The 3 You Don't Want To Use.

the only UF2 d&d files are for the multi payload gemma/trinket and itsybitsy UF2 File has not been tested as of yet as I don't have one to hand.

gemma/trinket and itsybitsy files are for dongle only at moment as.

pad A0 = payload change on gemma and itsybitsy.

pad 1 = payload change on the trinket.

the multi can only have 3 payloads enabled due to flash on the trinket/gemma & itsybitsy flash not being big enough.

red = sxos
white = hekate
blue = ReiNX

demo of the multi payload on my trinket.



demo if multi payload working.




ReiNX
RajNX
SXOS
Hekate 4.0

have revamped ino to all in one code

just enable the payload you wish to use. and disable the other 3.

like in the image sx os is enabled and the others are disabled.


Trinket All In One.jpg
 

Attachments

  • all in one payload ino files.zip
    1.7 MB · Views: 709
Last edited by M-O-B, , Reason: Updated Files.

methamz

Well-Known Member
Member
Joined
Jul 1, 2013
Messages
171
Trophies
0
Age
30
XP
1,080
Country
United States
some more dongle uf2 drag and drop files.

these will work on the R4 dongle and trinket and gemma these are individual payloads and ReiNX in compiled from the source this morning.

I will add these to the op once I sorted the multi payloads out. plus going to put most my time into an internal method now, as these ones will do for most if not all dongles..

Will those work on any random external payloader?
 

methamz

Well-Known Member
Member
Joined
Jul 1, 2013
Messages
171
Trophies
0
Age
30
XP
1,080
Country
United States
No. Depends what bootloader is flashed on it.

What does it say when you double-press reset? TRINKETBOOT?
Actually, Im working on a custom external payload injector with SAMD21 but I have no idea about flashing part. Thats why Im asking.
 

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 depends on the chip, and what bootloader you flash to the chip.
For example...

ATSAMD21E18 is a 32 pin QFN / QFP package. The trinket and Gemma use this. This is the one I recommend you use.
ATSAMD21G18 is a 48 pin QFN / QFP package. Itsybitsy and feather use this. You need an external crystal for this or oscillator. According to the datasheet. Can`t see one on the itsybitsy though, so your mileage may vary.
 
Last edited by mattytrog,

enderer

Well-Known Member
Member
Joined
Jul 19, 2015
Messages
381
Trophies
0
Age
34
XP
1,652
Country
United States
i click on the attachment for ino files in OP and nothing happens. opens a blank page called 'untitled'

--------------------- MERGED ---------------------------

also, my trinket won't mount as an external drive
 

methamz

Well-Known Member
Member
Joined
Jul 1, 2013
Messages
171
Trophies
0
Age
30
XP
1,080
Country
United States
It depends on the chip, and what bootloader you flash to the chip.
For example...

ATSAMD21E18 is a 32 pin QFN / QFP package. The trinket and Gemma use this. This is the one I recommend you use.
ATSAMD21G18 is a 48 pin QFN / QFP package. Itsybitsy and feather use this. You need an external crystal for this or oscillator. According to the datasheet. Can`t see one on the itsybitsy though, so your mileage may vary.
I bought ATSAMD21E-18 chip from digikey. How can I flash the Trinket M0 bootloader to my chip?
 

DuveltjeDG

Well-Known Member
Member
Joined
Apr 5, 2019
Messages
132
Trophies
0
Age
41
XP
854
Country
Netherlands
I can't find the script for creating my own bootloader for the R4s Dongle in this threat. Every script I used with the Arduino application did result in a flashing led and no interaction on the switch. In the OP there is a zip file containing several scripts to use but non of them are working for me when it's flashed to the R4s dongle. Could someone provide me the correct *.ino file with the correct bin converter *.py file? I am lost at the moment. I can use the bootloaders found on the R4s site but that's not what I want, I want to create my own bootloaders so that in the future if support drops from R4s I can create them myself.

M-O-B has a youtube video where he uses a "Trinket-R4-Gemma" that works with the R4s dongle, maybe he of someone can provide that one.

Thanks in advance.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    The Real Jdbye @ The Real Jdbye: never had one before that, and never had one since