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,

leerz

Well-Known Member
Member
Joined
Jan 11, 2015
Messages
752
Trophies
0
Age
36
Location
Makati
Website
leerz25.sitesled.com
XP
2,158
Country
please help
I followed the instructions and flashed successfully. but when re-installing the oled, only the white light is on at startup, then off, then the oled boots into ofw. does anyone have the full .bin file of v0.1.0 for hwfly lite? I will try to flash again
whitelite shows when no nand is detected (at least on original sx firmware), could be similar, usually red if dat0 can't be detected,. please do correct me but that's from experience.
 
  • Like
Reactions: mocthulang

Mena

Well-Known Member
OP
Member
Joined
Oct 5, 2020
Messages
148
Trophies
0
Age
29
XP
1,032
Country
United States
please help
I followed the instructions and flashed successfully. but when re-installing the oled, only the white light is on at startup, then off, then the oled boots into ofw. does anyone have the full .bin file of v0.1.0 for hwfly lite? I will try to flash again
DM me. I know what issue you’re having
 

mattyv

Member
Newcomer
Joined
May 28, 2009
Messages
20
Trophies
1
XP
1,421
Country
United States
I have this new OLED specific chip installed and can confirm it has Spacecraft 2.0 on it. No USB debug port on this chip for 'easily' flashing firmware.
My OLED chip was just delivered today and is the same revision (without USB). Do you have install instructions for this revision? I can only find instructions for the OLED chip with the USB port
 

mocthulang

Member
Newcomer
Joined
Jan 21, 2022
Messages
13
Trophies
0
Age
42
XP
100
Country
Vietnam
DM me. I know what issue you’re having
IMG_1945.JPG
 

JaRocker

Well-Known Member
Member
Joined
May 3, 2018
Messages
341
Trophies
0
XP
1,486
Country
Jamaica

4.7kΩ ±1% 0.05W 0201​

47kΩ ±1% 0.05W 0201​

iPhone to chip but I don't know which one of these I should get.
RC Series 0201 0.05 W 4.7 kOhm ±1% ±200 ppm/°C SMT Thick Film Chip Resistor

AC Series 0201 4.7 kΩ ±1% 0.05 W ±200 ppm/°C Thick Film Chip Resistor
 

sean222

Well-Known Member
Newcomer
Joined
Sep 7, 2007
Messages
92
Trophies
1
XP
761
Country
Canada
My OLED chip was just delivered today and is the same revision (without USB). Do you have install instructions for this revision? I can only find instructions for the OLED chip with the USB port

Sorry, no instructions. I just went by pictures from the community.
 

Mena

Well-Known Member
OP
Member
Joined
Oct 5, 2020
Messages
148
Trophies
0
Age
29
XP
1,032
Country
United States
There is a lot of variances. This is becoming messier and messier by the day in terms of differences between chips, FPGAs, code in firmware, etc.
 
  • Like
Reactions: leerz

mattyv

Member
Newcomer
Joined
May 28, 2009
Messages
20
Trophies
1
XP
1,421
Country
United States
Sorry, no instructions. I just went by pictures from the community.
NP. Found your pics here that helped. Thanks
I plan on trying to tackle it this weekend. Question....did you cut the one qsb toward the top for a reason? It looks like gnd and 3.3v can be pulled from that same ribbon. Was wondering if you pulled those 2 points from elsewhere for a reason. Did you just have those wires already connected from a prior install?
 

kylum

Well-Known Member
Member
Joined
Dec 8, 2008
Messages
394
Trophies
1
XP
1,477
Country
United States
There is a lot of variances. This is becoming messier and messier by the day in terms of differences between chips, FPGAs, code in firmware, etc.
Sounds like a nightmare. At this point we are probably seeing clones of clones. Thanks for your hard work!

I do have a few questions for you if you don't mind indulging in my curiosity!

Does the OLED chip support flashing using the firmware.bin on the SD? Are you going to implement that if not when you release? This could help in the future

How to update firmware w/o taking it apart
  • If you have flashed Spacecraft-NX, you could update the firmware and built-in payload(sdloader) by putting firmware.bin in the root of your SD card.
  • To reflash/downgrade the firmware regardless of firmware version, create a file called .force_update. (Windows users might find it hard to create dot files, just grab one in the repo.)
  • Some might stuck with green LED at boot. Unfortunately, the only resolution is to connect the chip with micro-USB debug port and reset it via serial interface.

I really like the mod @kazushiMe did. Will you be merging that with your release?
Spacecraft-NX-MOD

  • Boot to OFW by holding down VOL + (works with/without SD card)
    • Usage: Hold down VOL +, then press POWER. Release VOL + when modchip LED turns off or the logo shows up.
 
Last edited by kylum,
  • Like
Reactions: lufeig

Mena

Well-Known Member
OP
Member
Joined
Oct 5, 2020
Messages
148
Trophies
0
Age
29
XP
1,032
Country
United States
Sounds like a nightmare. At this point we are probably seeing clones of clones. Thanks for your hard work!

I do have a few questions for you if you don't mind indulging in my curiosity!

Does the OLED chip support flashing using the firmware.bin on the SD? Are you going to implement that if not when you release? This could help in the future



I really like the mod @kazushiMe did. Will you be merging that with your release?


The Chinese seem to have released an update for the OLED chip with the USB header. I can tell you right now that this update does a couple of things.

1.) It disables debugging completely, if you try and connect to PuTTy you will get an error.
2.) They modified SD Loader so my payload checker will report an unknown payload. I don't know the changes that they've made. It seems like they merged kazushime's update for compatibility into it. Added some text on the bottom right-hand corner. The OLED chip came with 0.2.0 so I wouldn't assume they went back to 0.1.0 for any reason considering all the backlash.

Currently, the state of the RE'ing done on their firmware is:

I have a working build that does a successful glitch, but it crashes sometimes during training. I've gotten it to not crash on my OLED but I had a friend test it and it made their modchip crash. This looks like "infinite glitching" in reality....it's not glitching and the FPGA has hanged/crashed. I need to figure out the differences there before an official open-source release.

TL;DR I need more testers
 

Attachments

  • firmware_r021.zip
    173.1 KB · Views: 60

Mena

Well-Known Member
OP
Member
Joined
Oct 5, 2020
Messages
148
Trophies
0
Age
29
XP
1,032
Country
United States
Does the OLED chip support flashing using the firmware.bin on the SD? Are you going to implement that if not when you release? This could help in the future
Yes. This feature has been in spacecraft since first release. It was just never documented on github. All you need to do is create a file with the name ".force_update" on the root of your SD card and have the firmware.bin there as well. FAT32 formatted of course.
 
  • Like
Reactions: leerz and mattyv

kylum

Well-Known Member
Member
Joined
Dec 8, 2008
Messages
394
Trophies
1
XP
1,477
Country
United States
Yes. This feature has been in spacecraft since first release. It was just never documented on github. All you need to do is create a file with the name ".force_update" on the root of your SD card and have the firmware.bin there as well. FAT32 formatted of course.
Nice, I can test for you! As long as i do not have to flash via a programmer/ SWD. When i get back to the house i will put your firmware from previous post on the SD along with .force_update. My Raspberrypi has HomeAssistant running my my home automation(need to buy another). However, i do have a ST-Link coming on the slow boat.

FYI, my OLED chip does report to "Do use on a Oled" running payloadchecker.

If the "chip crash" occurs. What to do next?
 

Mena

Well-Known Member
OP
Member
Joined
Oct 5, 2020
Messages
148
Trophies
0
Age
29
XP
1,032
Country
United States
Nice, I can test for you! As long as i do not have to flash via a programmer/ SWD. When i get back to the house i will put your firmware from previous post on the SD along with .force_update. My Raspberrypi has HomeAssistant running my my home automation(need to buy another). However, i do have a ST-Link coming on the slow boat.

FYI, my OLED chip does report to "Do use on a Oled" running payloadchecker.

If the "chip crash" occurs. What to do next?
If you still have the USB header to program, you can always program it via that. DM me and we'll test from there. There's a few things I'd need you to capture for me
 
  • Like
Reactions: leerz

mocthulang

Member
Newcomer
Joined
Jan 21, 2022
Messages
13
Trophies
0
Age
42
XP
100
Country
Vietnam
The Chinese seem to have released an update for the OLED chip with the USB header. I can tell you right now that this update does a couple of things.

1.) It disables debugging completely, if you try and connect to PuTTy you will get an error.
2.) They modified SD Loader so my payload checker will report an unknown payload. I don't know the changes that they've made. It seems like they merged kazushime's update for compatibility into it. Added some text on the bottom right-hand corner. The OLED chip came with 0.2.0 so I wouldn't assume they went back to 0.1.0 for any reason considering all the backlash.

Currently, the state of the RE'ing done on their firmware is:

I have a working build that does a successful glitch, but it crashes sometimes during training. I've gotten it to not crash on my OLED but I had a friend test it and it made their modchip crash. This looks like "infinite glitching" in reality....it's not glitching and the FPGA has hanged/crashed. I need to figure out the differences there before an official open-source release.

TL;DR I need more testers
can i try with this file?
 

Mena

Well-Known Member
OP
Member
Joined
Oct 5, 2020
Messages
148
Trophies
0
Age
29
XP
1,032
Country
United States
The Chinese seem to have released an update for the OLED chip with the USB header. I can tell you right now that this update does a couple of things.

1.) It disables debugging completely, if you try and connect to PuTTy you will get an error.
2.) They modified SD Loader so my payload checker will report an unknown payload. I don't know the changes that they've made. It seems like they merged kazushime's update for compatibility into it. Added some text on the bottom right-hand corner. The OLED chip came with 0.2.0 so I wouldn't assume they went back to 0.1.0 for any reason considering all the backlash.

Currently, the state of the RE'ing done on their firmware is:

I have a working build that does a successful glitch, but it crashes sometimes during training. I've gotten it to not crash on my OLED but I had a friend test it and it made their modchip crash. This looks like "infinite glitching" in reality....it's not glitching and the FPGA has hanged/crashed. I need to figure out the differences there before an official open-source release.

TL;DR I need more testers

I've figured out the random crashing thanks to a friend. It's the SD card. You need to train it without an SD card inserted.

can i try with this file?

Sure, but fair warning: If you have issues, you will need to recover.

I suggest you start with firmware only. run the flash.bat inside that folder with the USB plugged in.

Let it train over putty by pressing T. Don't have an SD card inserted while training.

Let me know, thanks.
 

Attachments

  • OLEDUPDATER.zip
    222.8 KB · Views: 51

Dean_

Well-Known Member
Member
Joined
Sep 11, 2014
Messages
684
Trophies
0
XP
712
Country
I've figured out the random crashing thanks to a friend. It's the SD card. You need to train it without an SD card inserted.
Which version is this firmware based on? I guess it's modified from KazushiMe's mod, right?
 

Mena

Well-Known Member
OP
Member
Joined
Oct 5, 2020
Messages
148
Trophies
0
Age
29
XP
1,032
Country
United States
Which version is this firmware based on? I guess it's modified from KazushiMe's mod, right?
The firmware.bin attached above is vanilla spacecraft + the edits to make it work with their FPGA bitstream. The way they do things is different. They sync up with the FPGA, tie it pin 37? I think. There's not much difference. It's not KazushiMe's mod at all though.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    From what people say pvp isn't even worth it
  • BigOnYa @ BigOnYa:
    I just been playing offline, and they give you a few bots here n there on your team to help battle. I don't think it's as funny as the other games tho, more battle oriented than humor, which kinda sucks, but I'm still early in it
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, doesnt the game have a campaign mode?
  • BigOnYa @ BigOnYa:
    Yea, and co-op, but you can also start a pvp session and battle just with friends. You get special skill cards (powers) the more you play. And higher value cards, but you can only enable so many cards at a time.
  • K3Nv2 @ K3Nv2:
    If you can find enough for it
  • BigOnYa @ BigOnYa:
    Toilet paper is considered the money, you collect and buy stuff with TP, kinda funny. Graphics are def better than the other games tho, I think they used Unity 5 engine.
  • Psionic Roshambo @ Psionic Roshambo:
    Look if I zoom in enough I can see the herpes!!!
    +1
  • BigOnYa @ BigOnYa:
    In fact I'm gonna go make a drink, roll a fatty n play some, good night to all!
    +2
  • Xdqwerty @ Xdqwerty:
    I bet most people at the time still watched it in black and white
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Many of them did before colour television was common.
  • SylverReZ @ SylverReZ:
    Likely because black and white TV was in-expensive.
    +1
  • K3Nv2 @ K3Nv2:
    It certainly wasn't inexpensive it cost the same as a new car back then
  • K3Nv2 @ K3Nv2:
    How much did a 1965 color TV cost?

    For example, a 21-inch (diagonal) GE color television in 1965 had an advertised price of $499, which is equal to $4,724 in today's dollars, according to the federal government's inflation calculator.
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, take into consideration how economy was back then
  • K3Nv2 @ K3Nv2:
    Yeah that's why they listed inflation rates
  • Xdqwerty @ Xdqwerty:
    Sorry didnt read that part
  • BakerMan @ BakerMan:
    @LeoTCK don't worry i knew he was joking
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    My first color TV was like 1984 or something lol
  • Psionic Roshambo @ Psionic Roshambo:
    19 inches it was glorious lol
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, If it doesn't fit, you should've gotten one smaller lol
    +1
  • SylverReZ @ SylverReZ:
    If a racoon can fit up to 8-inches then so be it
    SylverReZ @ SylverReZ: If a racoon can fit up to 8-inches then so be it