SigOS: Installing Software

From IBLS
Jump to navigation Jump to search


ESP32 S2 Mini

Installing MicroPython.

  • These instructions are for installation from a Linux computer
  • Download the esptool from here onto your Linux computer
  • Obtain a USB to USB-C cable
  • Plug the USB end into the Linux Computer
  • Plug the USB-C end into the ESP32-S2 Mini
  • Run "sudo tail -f /var/log/messages" on your Linux computer
  • Press and hold the "0" button on the ESP32-S2 Mini, then "tap" the "Reset" button
  • You should see the Linux computer recognize the board in the output of /var/log/messages
    • It will look something like this:
Dec  4 00:01:14 onvakkiock kernel: cdc_acm 1-3:1.0: ttyACM0: USB ACM device
Dec  4 00:01:14 onvakkiock mtp-probe[2249351]: checking bus 1, device 20: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3"
Dec  4 00:01:14 onvakkiock mtp-probe[2249351]: bus: 1, device: 20 was not an MTP device
Dec  4 00:01:14 onvakkiock mtp-probe[2249354]: checking bus 1, device 20: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3"
Dec  4 00:01:14 onvakkiock mtp-probe[2249354]: bus: 1, device: 20 was not an MTP device
Dec  4 00:01:15 onvakkiock python3[1159]: 2024-12-04 00:01:15,736 - root - INFO - parse_stats() XDP multiqueue detected.
  • If you are putting MicroPython on your board for the first time then you should first erase the entire flash using:
esptool.py --chip esp32s2 --port /dev/ttyACM0 erase_flash
  • The results will look something like this:
[dnevil@onvakkiock MicroPython]$ esptool.py --chip esp32s2 --port /dev/ttyACM0 erase_flash
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S2FNR2 (revision v1.0)
Features: WiFi, Embedded Flash 4MB, Embedded PSRAM 2MB, ADC and temperature sensor calibration in BLK2 of efuse V2
Crystal is 40MHz
MAC: cc:8d:a2:94:65:6c
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 14.9s
WARNING: ESP32-S2FNR2 (revision v1.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.
  • Download the latest released version of MicroPython for the ESP32-S2 Mini from here. You will want the file ending with ".bin"
  • Run the following command to install MicroPyton onto the ESP32-S2 Mini, replacing the filename with the .bin file you just downloaded
esptool.py --chip esp32s2 --port /dev/ttyACM0 write_flash -z 0x1000 ESP32_GENERIC_S2-20241129-v1.24.1.bin
  • The results will look something like this:
[dnevil@onvakkiock MicroPython]$ esptool.py --chip esp32s2 --port /dev/ttyACM0 write_flash -z 0x1000 ESP32_GENERIC_S2-20241129-v1.24.1.bin
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S2FNR2 (revision v1.0)
Features: WiFi, Embedded Flash 4MB, Embedded PSRAM 2MB, ADC and temperature sensor calibration in BLK2 of efuse V2
Crystal is 40MHz
MAC: cc:8d:a2:94:74:0c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00001000 to 0x0015dfff...
Compressed 1427792 bytes to 935495...
Wrote 1427792 bytes (935495 compressed) at 0x00001000 in 10.8 seconds (effective 1055.6 kbit/s)...
Hash of data verified.

Leaving...
WARNING: ESP32-S2FNR2 (revision v1.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.