Tutorial  Updated

How to flash the HWFLY Clone chips

See below for updates.

IF YOU BREAK YOUR BOOT0 PIN. DO NOT DM ME ASKING FOR HELP. THAT'S IT. YOU BREAK THAT PIN AND YOU CANT FLASH. YOUR CHIP IS STUCK WITH WHATEVER HWFLY PUT ON IT


Pre-requisites:




  • Raspberry Pi Zero W
    • You may use another flasher if you desire.
  • Pinout Diagram
  • Modchip Diagram
  • FULL_CHIP_STOCK.bin
  • Modchip Diagram, find the PA9(TX) and the PA10(RX) pins on your modchip, and do the following:
    • Connect GPIO14(TX) on your Raspberry Pi Zero W to the PA10(RX) pin on your modchip.
    • Connect GPIO15(RX) on your Raspberry Pi Zero W to the PA9(TX) pin on your modchip.

  1. Solder a wire to each of the following pinouts on the Raspberry Pi Zero W:
    • 3.3V
    • Ground
    • GPIO 14 (UART TX)
    • GPIO 15 (UART RX)
  2. Do the following to prepare the modchip:
    1. Lift pin 44 (also known as BOOT0).
    2. You will need a way to power the chip, so you need to find two 3.3v points. It can be on a MOSFET, but it will differ based on the revision of the modchip.
    3. Connect Ground on your Raspberry Pi Zero W to the Ground pin on your modchip.
    4. Check the Modchip Diagram, find the PA9(TX) and the PA10(RX) pins on your modchip, and do the following:
      • Connect GPIO14(TX) on your Raspberry Pi Zero W to the PA10(RX) pin on your modchip.
      • Connect GPIO15(RX) on your Raspberry Pi Zero W to the PA9(TX) pin on your modchip.
  3. Boot your Raspberry Pi Zero W and do the following:
    1. In the terminal, type the following command, and press enter:
      Bash:
      sudo nano /boot/config.txt
    2. Add the following line to the end of the file:
      INI:
      dtoverlay=pi3-miniuart-bt
    3. Press CTRL + X to save and exit the editor.
    4. In the terminal, type the following command, and press enter:
      Bash:
      sudo nano /boot/cmdline.txt
    5. Remove the following line from the file:
      INI:
      console=serial0,115200
    6. Press CTRL + X to save and exit the editor.
    7. Restart your Raspberry Pi with this command
      Bash:
      sudo /sbin/reboot
    8. In the terminal, type the following commands, and press enter after each command:

      Bash:
      git clone https://github.com/Pheeeeenom/stm32flash.git
      cd stm32flash
      sudo make install
  4. Now you will flash the modchip.
    Note: This will remove read protection, and the modchip will wipe itself (that is what we want).
    1. In the terminal, type the following command, and press enter:
      Bash:
      stm32flash -k /dev/serial0
    2. Now to flash Spacecraft-NX Version 0.2.0, type the following, and press enter:
      Bash:
      stm32flash -v -w ./FULL_CHIP_STOCK.bin /dev/serial0
  5. Once you're done flashing your modchip, remove the wiring from the modchip, and restore the 3.3v pin on the modchip to its original position.

Please post pictures of your work here to further the identification of the different board revisions!


UPDATE: So it seems like stitching the spacecraft bootloader and firmware together from the repo causes unstable glitching behaviors. For now, consistent glitching behavior works with this bootload/firmware combo.
This is the original file on the OLED variant chip which has 0.2.0 spacecraft. As for glitching, I'll figure it out, give me some time...unless someone else wants to hop in and reverse the differences.

For now, this at least solves the 0.1.0 HWFLY gen 3 issue. More to come.

UPDATE 2: This is only going to work on some HWFLY chips. Older ones use higher protection than the new revisions that seem to use the QFN FPGA.

UPDATE 3: This should fully work on OLED modchips with the QFN FPGA. https://github.com/Pheeeeenom/firmware
 
Last edited by Mena,

some1ne

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
578
Trophies
1
Website
www.youtube.com
XP
903
Country
United States
so it is better to keep the original firmware. Team hwfly mon said that on the switch lite no need to flash again normally.

It’s a V2 switch. I tried getting in contact with them and they told me it could be caused by specific emmcs. I don’t have other V2 switches with me to test on at the moment.
 

dygeo

Well-Known Member
Newcomer
Joined
Feb 5, 2023
Messages
51
Trophies
0
Age
31
XP
126
Country
France
It’s a V2 switch. I tried getting in contact with them and they told me it could be caused by specific emmcs. I don’t have other V2 switches with me to test on at the moment.
ah okay me it's the switch lite better avoid flashing if it's useless
Post automatically merged:

It’s a V2 switch. I tried getting in contact with them and they told me it could be caused by specific emmcs. I don’t have other V2 switches with me to test on at the moment.
Post automatically merged:

this is what he says: Hwfly Lite V3/V4.1/V5 chip install video(Note: The chip pre installed firmware,No need flash chip by youself , just need your professional welding.)Otherwise it will maybe permanently damage the chip or your console, please use it under the guidance of professionals.
 
Last edited by dygeo,

Phantomas77

Well-Known Member
Member
Joined
Dec 19, 2022
Messages
284
Trophies
0
XP
715
Country
Italy
Hey guys, need some guidance.

Updated OLED to v16.0, soldered HWFLY V4, glitch + train ok, booted to "NO SD" screen at least 3 times without problem. Before closing the console, thought that it would be a good idea to flash the latest hwfly-nx 0.7.2 FW, it wasn't...

Plugged the USB adapter correctly, during the execution of "flash.bat" the bootloader flashed well but probably got something corrupted during the "flashing update" section. The chip trains, I get a pulsating green light at the end and a black screen. I can still talk to it via SSH, tried resetting but did not help.
Tried flashing different FW's (get always a black screen) and repeated the 0.7.2 as well. On all the flashes, the bootloader flashes well, though I get always the same "Failed to update" during the second part. Is the FW on the chip got corrupted?

Today I'll receive the StLink and try to flash it through STM32Cube. What should I still consider to try?

Thanks!
 

dygeo

Well-Known Member
Newcomer
Joined
Feb 5, 2023
Messages
51
Trophies
0
Age
31
XP
126
Country
France
Hey guys, need some guidance.

Updated OLED to v16.0, soldered HWFLY V4, glitch + train ok, booted to "NO SD" screen at least 3 times without problem. Before closing the console, thought that it would be a good idea to flash the latest hwfly-nx 0.7.2 FW, it wasn't...

Plugged the USB adapter correctly, during the execution of "flash.bat" the bootloader flashed well but probably got something corrupted during the "flashing update" section. The chip trains, I get a pulsating green light at the end and a black screen. I can still talk to it via SSH, tried resetting but did not help.
Tried flashing different FW's (get always a black screen) and repeated the 0.7.2 as well. On all the flashes, the bootloader flashes well, though I get always the same "Failed to update" during the second part. Is the FW on the chip got corrupted?

Today I'll receive the StLink and try to flash it through STM32Cube. What should I still consider to try?

Thanks!
reflash the stock firmware if it worked fine like that. I made the same mistake I wanted to flash a chip and I damaged the chip too... the 0.72 and not good . normally if the chip works core no need to flash again.
Post automatically merged:

it's the problem of always wanting everything to latest version, but if it worked perfectly it's a mistake my friend to have flashed it.
 
Last edited by dygeo,
  • Like
Reactions: binkinator

Phantomas77

Well-Known Member
Member
Joined
Dec 19, 2022
Messages
284
Trophies
0
XP
715
Country
Italy
reflash the stock firmware if it worked fine like that. I made the same mistake I wanted to flash a chip and I damaged the chip too... the 0.72 and not good . normally if the chip works core no need to flash again.
Post automatically merged:

it's the problem of always wanting everything to latest version, but if it worked perfectly it's a mistake my friend to have flashed it.
@dygeo my dude, you were right!

I almost thought that everything was lost, flashed with STLink the 0.7.1 and 0.7.2, but it went always to the pulsating green light and black screen after training. Since I didn't have the original FW that was on the chip, I used the one suggested by the Ali seller months back, I think it's based on hwfly-nx 0.7.1, and DAMN, the console worked again!!! Sometimes it takes a little bit more time to glitch than the HWFLY V5 that I have with 0.7.2, but it doesn't matter, it works! I uploaded the files just in case.

So here're the steps that I did:
- got a clone of STLink V2, had trouble connecting it to STM32Cube, but managed to update the STLink's FW by following this guide and it got recognized by the program;
- followed the STHETIX video and flashed the bootloader to the address 0x08000000
- flashed the firmware to the address 0x08003000
- disconnected everything, let the chip train and the bastard was alive again!

Thanks again, and here're my (learned) 2 cents: if it works, let it be.
 

Attachments

  • fw_debrick_V4.zip
    73.6 KB · Views: 77

dygeo

Well-Known Member
Newcomer
Joined
Feb 5, 2023
Messages
51
Trophies
0
Age
31
XP
126
Country
France
@dygeo my dude, you were right!

I almost thought that everything was lost, flashed with STLink the 0.7.1 and 0.7.2, but it went always to the pulsating green light and black screen after training. Since I didn't have the original FW that was on the chip, I used the one suggested by the Ali seller months back, I think it's based on hwfly-nx 0.7.1, and DAMN, the console worked again!!! Sometimes it takes a little bit more time to glitch than the HWFLY V5 that I have with 0.7.2, but it doesn't matter, it works! I uploaded the files just in case.

So here're the steps that I did:
- got a clone of STLink V2, had trouble connecting it to STM32Cube, but managed to update the STLink's FW by following this guide and it got recognized by the program;
- followed the STHETIX video and flashed the bootloader to the address 0x08000000
- flashed the firmware to the address 0x08003000
- disconnected everything, let the chip train and the bastard was alive again!

Thanks again, and here're my (learned) 2 cents: if it works, let it be.
your chip and it recognized by usb?
 

Phantomas77

Well-Known Member
Member
Joined
Dec 19, 2022
Messages
284
Trophies
0
XP
715
Country
Italy
Correct, the chip got always recognized via USB, but I was able only to flash the booatloader, the firmware update was always failing via "flash.bat". So probably the USB interface is not working properly.

The only thing that worked was to flash the bootloader and firmware of my previous post via StLink.
 

dygeo

Well-Known Member
Newcomer
Joined
Feb 5, 2023
Messages
51
Trophies
0
Age
31
XP
126
Country
France
Correct, the chip got always recognized via USB, but I was able only to flash the booatloader, the firmware update was always failing via "flash.bat". So probably the USB interface is not working properly.

The only thing that worked was to flash the bootloader and firmware of my previous post via StLink.
I learned that there was code on the last page often in the chip on the hwfly lite the code and wrote and locked on page 127 I assumed that on your chip there must be similar code if you compare the bin files to the internal memory of the chip you will see the additional code written in 0x0801FC00 maybe you have it and more written further you will see in red if you have additional code but be careful not to delete this code otherwise the chip will be unusable. but maybe what and corrupt at this level?. there is also a manual reset on the chips.
 

Attachments

  • Screenshot_20230315_110722_AliExpress.jpg
    Screenshot_20230315_110722_AliExpress.jpg
    931.3 KB · Views: 94

Phantomas77

Well-Known Member
Member
Joined
Dec 19, 2022
Messages
284
Trophies
0
XP
715
Country
Italy
Hmm, that's interesting, though I don't have the skill nor the knowledge to get around the code.

I have a V4 OLED chip version (see below), so maybe it doesn't have that part in the code? If you have some V4/V4.1 (lite) chip which is bricked, feel free to try the FW that I uploaded to see if it comes back to life as mine did.

Otherwise, replacing the GD32F350 IC would fix it?
 

Attachments

  • 1678877079978.png
    1678877079978.png
    97.1 KB · Views: 91
Last edited by Phantomas77,

dygeo

Well-Known Member
Newcomer
Joined
Feb 5, 2023
Messages
51
Trophies
0
Age
31
XP
126
Country
France
Hmm, c'est intéressant, même si je n'ai pas les compétences ni les connaissances nécessaires pour contourner le code.

J'ai une version de puce OLED V4 (voir ci-dessous), alors peut-être qu'elle n'a pas cette partie dans le code ? Si vous avez une puce V4/V4.1 (lite) qui est maçonnée, n'hésitez pas à essayer le FW que j'ai téléchargé pour voir s'il revient à la vie comme le mien.

Sinon, remplacer le CI GD32F350 réglerait le problème ?
J'ai tout essayé mais j'ai dû renvoyer la puce, un micrologiciel de puce doit casser lequel et précisément maçonné. peut-être qui sont trop gros en écriture Après je ne suis pas un expert
 

doom95

Well-Known Member
Member
Joined
Aug 12, 2019
Messages
303
Trophies
0
Age
24
XP
785
Country
Netherlands
I learned that there was code on the last page often in the chip on the hwfly lite the code and wrote and locked on page 127 I assumed that on your chip there must be similar code if you compare the bin files to the internal memory of the chip you will see the additional code written in 0x0801FC00 maybe you have it and more written further you will see in red if you have additional code but be careful not to delete this code otherwise the chip will be unusable. but maybe what and corrupt at this level?. there is also a manual reset on the chips.
at 0x0801FC00 is simply training data. if it gets corrupt, chip trains again.
 

dygeo

Well-Known Member
Newcomer
Joined
Feb 5, 2023
Messages
51
Trophies
0
Age
31
XP
126
Country
France
at 0x0801FC00 is simply training data. if it gets corrupt, chip trains again.
okay when I deleted all the memory and wanted to reflash an original firmware it no longer worked why? on the other hand my chip was no longer recognized by usb. maybe my chip had a problem
 

realtimesave

///AMG
Member
Joined
May 19, 2020
Messages
518
Trophies
0
Age
45
XP
989
Country
United States
Hmm, that's interesting, though I don't have the skill nor the knowledge to get around the code.

I have a V4 OLED chip version (see below), so maybe it doesn't have that part in the code? If you have some V4/V4.1 (lite) chip which is bricked, feel free to try the FW that I uploaded to see if it comes back to life as mine did.

Otherwise, replacing the GD32F350 IC would fix it?
any tutorials how to unbrick hwfly core? I have 2 sitting here that my PC won't detect and neither will boot up on a system.
 

realtimesave

///AMG
Member
Joined
May 19, 2020
Messages
518
Trophies
0
Age
45
XP
989
Country
United States
@dygeo my dude, you were right!

I almost thought that everything was lost, flashed with STLink the 0.7.1 and 0.7.2, but it went always to the pulsating green light and black screen after training. Since I didn't have the original FW that was on the chip, I used the one suggested by the Ali seller months back, I think it's based on hwfly-nx 0.7.1, and DAMN, the console worked again!!! Sometimes it takes a little bit more time to glitch than the HWFLY V5 that I have with 0.7.2, but it doesn't matter, it works! I uploaded the files just in case.

So here're the steps that I did:
- got a clone of STLink V2, had trouble connecting it to STM32Cube, but managed to update the STLink's FW by following this guide and it got recognized by the program;
- followed the STHETIX video and flashed the bootloader to the address 0x08000000
- flashed the firmware to the address 0x08003000
- disconnected everything, let the chip train and the bastard was alive again!

Thanks again, and here're my (learned) 2 cents: if it works, let it be.
I'm getting this error:

UR connection mode is defined with the HWrst reset mode

does anyone know where RST is located on hwfly core clone chip? maybe I need to connect that?
edit: nevermind. the latest ST software is not compatible with clone ST chips. You know my cheap ass bought a chip that was bootleg of course ;)

Anyway, it works fine with this version: https://www.st.com/en/development-tools/stsw-link004.html but I reprogrammed the chip and my switch still won't boot it so something else is wrong with it. still no USB. I'm considering this order a total loss.
 
Last edited by realtimesave,

Rodrigonts

New Member
Newbie
Joined
May 4, 2023
Messages
4
Trophies
0
Age
32
XP
261
Country
Brazil
Hello everything is fine,

On Saturday now, I installed Hwfly on my console, so far everything was normal, it booted, I made a backup of Nand and created Emunand , so I had the idea of updating the Chip to the latest version. on the rocket screen when you turn on the console you have the option to update the chip, when I selected it there was a white screen and it stopped now the chip does not turn on any more lights and the console only turns on in the original what can I do (I already tried to call on the PC but windows does not recognize the chip)

What can I do? Has anyone gone through this and could help me?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Weird I have been playing MSU enhanced Genesis games for a while now lol