Difference between revisions of "Micropython firmware"

From Banana Pi Wiki
Jump to: navigation, search
Line 40: Line 40:
  
 
[[File:Micropython_operating_env_22.png]]
 
[[File:Micropython_operating_env_22.png]]
 +
 +
Navigate to the firmware location in Terminal via commands or other methods.
 +
 +
Drag the file onto the Terminal window to show its specific directory.
 +
 +
Prepare your BPI-Leaf-S3, it should be on '''Bootloader Mode''', details listed above.
 +
 +
The following command can erase the flash, adjust the COM port to the corresponding port, in our case it is <code>/dev/cu.usbmodem01</code>.
 +
 +
macos:
 +
 +
<code>python3 -m esptool --chip esp32s3 --port /dev/cu.usbmodem01 erase_flash</code>
 +
 +
The command below will initiate flashing firmware, besure to change firmware_name.bin to the downloaded firmware.
 +
 +
macos:
 +
 +
<code>python3 -m esptool --port /dev/cu.usbmodem01 -b 460800 --before=default_reset --after=hard_reset write_flash -z 0x0 firmware_name.bin</code>
 +
 +
If flashing via USB, press RESET button once flashing has completed to enter normal mode.
 +
 +
If flashing via UART, the board would automatically reset once flashing is complete.

Revision as of 02:54, 18 March 2022

You can download the firmware for ESP32-S3 the firmware for ESP32-S3 on the MicroPython official website).

Click the link and you are met with various download links.

Choose a .bin file and download it to your PC.

Micropython operating env 6.png

Notice the date marked on each firmware file, later versions provide newer features.

Configure Firmware Download Mode

Prepare your ESP device for flashing.

There are two ways to enter Bootloader mode:

  1. Connect it to the computer via USB, hold BOOT button, press RESET button once, then release BOOT button.
  2. Hold BOOT button while disconnected to power, connect to PC via USB, then release BOOT button.

The chip controls GPIO0 via BOOT button to choose between reset or cold boot.

Confirm the port of your ESP device via device manager, it might display different port if you are on different modes.

Esptool

This guide is operated on macOS Terminal.

Use the following command to install esptool:

pip3 install esptool

Micropython operating env 21.png

For future use, the following command can update esptool to latest version:

pip3 install -U esptool

Micropython operating env 22.png

Navigate to the firmware location in Terminal via commands or other methods.

Drag the file onto the Terminal window to show its specific directory.

Prepare your BPI-Leaf-S3, it should be on Bootloader Mode, details listed above.

The following command can erase the flash, adjust the COM port to the corresponding port, in our case it is /dev/cu.usbmodem01.

macos:

python3 -m esptool --chip esp32s3 --port /dev/cu.usbmodem01 erase_flash

The command below will initiate flashing firmware, besure to change firmware_name.bin to the downloaded firmware.

macos:

python3 -m esptool --port /dev/cu.usbmodem01 -b 460800 --before=default_reset --after=hard_reset write_flash -z 0x0 firmware_name.bin

If flashing via USB, press RESET button once flashing has completed to enter normal mode.

If flashing via UART, the board would automatically reset once flashing is complete.