Hacking RELEASE [Trinket] [Rebug] [Others] [Modchip Software] *NEW* Fusee_Suite UF2 packages

sofakng

Well-Known Member
Member
Joined
Jul 3, 2007
Messages
114
Trophies
1
XP
518
Country
United States
Thanks, I did see that but I was hoping for a bit more technical information.

The Adafruit SAMD21 contains a bootloader that can flash new code to the microcontroller (ie. UF2 format).

When you follow "part 1" and copy the first UF2 file, it is updating the SAMD21 microcontroller with new code. However, what's confusing is that afterwards you follow "part 2" which flashes different code to the microcontroller. I am wondering why there are two steps for updating the microcontroller code.

I'm wondering if part 1 is overwriting the SAMD21 internal bootloader (ie. the bootloader pre-installed on the Trinket) with a new one.

...or stated a different way:

Part 1 updates SAMD21 internal bootloader:
Part 2 updates SAMD21 program code.

Snippet from part1 (https://github.com/mattytrog/FUSEE_...-Suite/Part_1/Trinket/FUSEE_SUITE_TRINKET.ino):
Code:
    for (i = 0; i < BOOTLOADER_K * 1024; i += FLASH_ROW_SIZE) {
        memcpy(pageBuf, &bootloader[i], FLASH_ROW_SIZE);
        flash_write_row((uint32_t *)(void *)i, (uint32_t *)(void *)pageBuf);
    }

This appears to be writing to address 0x0 which I think is overwriting the SAMD21 bootloader? I think this SAMD21 bootloader is what mattytrog is calling a "prebootloader" ?

Sorry, I'm just trying to understand how this works because I'm interested in learning.
 
Last edited by sofakng,

Romain80200

Well-Known Member
Newcomer
Joined
Apr 13, 2013
Messages
67
Trophies
0
Age
46
Location
dans ma maison
XP
1,160
Country
France
You will need to double press reset somehow, unless you have vol+ strap. If you have vol+ strap, disconnect from pc if connected, hold down vol+ for around 30 seconds until steady white flashing light appears through the grilles.

Then power off, restart and connect to pc. Done.
I still can't use this feature with my rcmx86. I keep pressing vol+ until the led slowly flash and power off the Switch. When i restart, black screen, no led flashing and no uf2 drive on the pc.
 
Last edited by Romain80200,

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
Thanks, I did see that but I was hoping for a bit more technical information.

The Adafruit SAMD21 contains a bootloader that can flash new code to the microcontroller (ie. UF2 format).

When you follow "part 1" and copy the first UF2 file, it is updating the SAMD21 microcontroller with new code. However, what's confusing is that afterwards you follow "part 2" which flashes different code to the microcontroller. I am wondering why there are two steps for updating the microcontroller code.

I'm wondering if part 1 is overwriting the SAMD21 internal bootloader (ie. the bootloader pre-installed on the Trinket) with a new one.

...or stated a different way:

Part 1 updates SAMD21 internal bootloader:
Part 2 updates SAMD21 program code.

Snippet from part1 (https://github.com/mattytrog/FUSEE_...-Suite/Part_1/Trinket/FUSEE_SUITE_TRINKET.ino):
Code:
    for (i = 0; i < BOOTLOADER_K * 1024; i += FLASH_ROW_SIZE) {
        memcpy(pageBuf, &bootloader[i], FLASH_ROW_SIZE);
        flash_write_row((uint32_t *)(void *)i, (uint32_t *)(void *)pageBuf);
    }

This appears to be writing to address 0x0 which I think is overwriting the SAMD21 bootloader? I think this SAMD21 bootloader is what mattytrog is calling a "prebootloader" ?

Sorry, I'm just trying to understand how this works because I'm interested in learning.

It isn`t writing to 0x0. There are #defines elsewhere.

Think of it like this...

The part 1 is, for the most part, the standard UF2 bootloader.

However, it reads one variable which we use in part 2. It does this via a wear-levelling routine, which is in virtual_eeprom.h

Part 1 never writes, apart from to update part 2. It only reads this variable which we set in part 2 and that decides what straps are dropped at boottime.

I am going to write a PDF manual I think, explaining all of the features

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

I still can't use this feature with my rcmx86. I keep pressing vol+ until the led slowly flash and power off the Switch. When i restart, black screen, no led flashing and no uf2 drive on the pc.

Hmmm... I`ve tested it on every unit I have and it works perfectly.

Would it help if I put up a video, just incase we are getting our wires crossed somewhere?
 

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom


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

When i restart the Switch, the led just blink a little and nothing more.

Hmmm... Try this...

Once the steady booking light on your chip is active, power down by holding power for 12 seconds, instead of using the menu.

Once hard powered off, power on and connect to pc.

Try this and report back
 

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
Sorry, still the same.

OK... What looks like is happening, is the RTC alarm is being activated. Not on FW7.0.0 or something similar are you?

OK... Another thing to try... Disable autoRCM, however you have it activated, so your console can boot normally.

If using it on the chip-side, hold vol+ until rapid blink 1, then release. This will disable autoRCM.

Ensure you can boot normally, then retry entering UF2 update mode by holding vol+.

Start normally, your console should boot to OFW, but the chip should also hijack the USB port and enterUF2 update mode.

Please try and report back
 

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
Doubtful it is the chip...

OK... Re-enable your autoRCM. Download the SAMD21 update payload from OP.

1. Hold vol+ until steady flash
2. Power off unit.
3. CONNECT TO PC. Wait. Should go into RCM mode. UF2 mode should be triggered on the chip.
4. Send SAMD21 update payload with TegraRCMsmash. This "unlocks" USB and UF2 window should pop up.

Please try and report back.
 

Romain80200

Well-Known Member
Newcomer
Joined
Apr 13, 2013
Messages
67
Trophies
0
Age
46
Location
dans ma maison
XP
1,160
Country
France
Yes, except the update mode, everything works ok. I can use nxmtp, charge the Switch, load payload. If i use the jig, i can go into rcm.
I use the 3v from the emmc board. I hope it doesn't care.
Sxos works perfect.
 

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
Yes, except the update mode, everything works ok. I can use nxmtp, charge the Switch, load payload. If i use the jig, i can go into rcm.
I use the 3v from the emmc board. I hope it doesn't care.
Sxos works perfect.

Isnt your chip enabling RCM? If you have all straps connected, it should be.

In "Info" in Fusee, what straps does it say?

If you have autorcm enabled on the chip, you should never need a jig. Thats the whole idea,.
 

Romain80200

Well-Known Member
Newcomer
Joined
Apr 13, 2013
Messages
67
Trophies
0
Age
46
Location
dans ma maison
XP
1,160
Country
France
Autorcm enabled by the chip.
If i disable it, i boot in ofw.
If i use my jig, i can put the Switch in rcm and inject a payload with my pc.
But in update mode, autorcm disable, my pc is waiting for a rcm device in tegrarcm, i can't inject the sam21 update payload.
 

mattytrog

You don`t want to listen to anything I say.
OP
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
Autorcm enabled by the chip.
If i disable it, i boot in ofw.
If i use my jig, i can put the Switch in rcm and inject a payload with my pc.
But in update mode, autorcm disable, my pc is waiting for a rcm device in tegrarcm, i can't inject the sam21 update payload.
So, in update mode, if autoRCM is disabled, your console boots to OFW. Correct?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    NinStar @ NinStar: what's up woke boy