Step-by-step Windows flashing guide
This guide is long, but following it step-by-step gets you a working MegaGRRL Desktop board and dev environment.
You can follow along with this video: https://www.youtube.com/watch?v=wvfQTjJ12Ss
- Install a text editor that works well with code, such as Notepad++
- Make sure RN2 and the sound chips are not populated on your MegaGRRL Desktop board, then plug it in to USB and power, and turn it on.
- (Windows 7 only) Download and install the CH340 USB driver from this link
- Download Espressif's MSYS2 environment from this link
- Open the zip file and extract the msys32 directory to a convenient place. The path must not include any spaces. Putting it directly in the C: drive will work.
- Enter the msys32 directory and run mingw32.exe.
- Paste in the following. Pasting can be done with Shift+Insert or the right-click menu.
curl https://git.agiri.ninja/snippets/3/raw | bash
- ESP-IDF will be downloaded and setup. This will take several minutes. Close and re-open mingw32.exe when it is complete.
- Open Device Manager and find the USB-Serial device under "Ports (COM & LPT)". Remember its COM port number.
- In the mingw32 window, enter the following, making sure the COM port number matches what you saw in Device Manager. This will burn the flash voltage selection efuse.
$IDF_PATH/components/esptool_py/esptool/espefuse.py --port COM1 set_flash_voltage 3.3V
cd megagrrl/firmwareto enter the firmware directory.
git tagto see the list of tagged firmware versions.
- Find the tag with the highest version and use git checkout to obtain the files. For example, if the highest version available is v0.93dev, you would type
git checkout v0.93dev
- Go back to the msys32 directory, and navigate to
home\<name>\megagrrl\firmware\main. Find hal.h and open it in Notepad++. Remove the
//#define FWUPDATEline, and save the file.
- Go back to the mingw32 window. Enter
ESPPORT=COM1 make flash, again correcting the COM port number to match your system. This flashes the firmware updater. This process will take several minutes.
- Unplug the MegaGRRL Desktop board, and populate the missing resistor network RN2. When done, plug it back in to power and USB and turn it on again.
- Undo your changes to hal.h and save the file again.
- In mingw32, enter
make allto build the main firmware. It will only take a few seconds this time.
mv build/megagrrl.bin factory.mgf
- In Windows Explorer go back to the
home\<name>\megagrrl\firmwaredirectory. Copy the factory.mgf file to an SD card.
- Insert the SD card into the MegaGRRL Desktop board. It will now update itself.