Troubleshooting Firmware Flashing Errors on ESP32-S3 Vision Modules
1. Problem Description
During firmware flashing, launching the executable file results in the error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 140: invalid continuation byte, indicating a Unicode decoding error. This issue typically relates to the encoding environment of the computer.
2. Resolution
2.1 Checking the Current Encoding Format
To open the terminal, press the Win + R keys simultaneously, enter powershell to access the command line, or right-click the Start icon and select Terminal Administrator. Once opened, execute the command chcp to display the current encoding format. A returned value of 65001 indicates that the current system encoding format is set to UTF-8, whereas the ESP32 firmware flashing tool utilizes the GBK encoding format, meaning the system encoding format must be modified.
2.2 Modifying the System Encoding Format
Open the Control Panel, locate the Clock and Region settings, and click Change date, time, or number formats.
Navigate to the Administrative tab and click Change system locale.
Uncheck the option labeled Beta: Use Unicode UTF-8 for worldwide language support (U) and ensure the checkbox is cleared. Click OK and restart the computer.
2.3 Verifying the Modification
After the computer restarts, open the terminal again and execute the command chcp. Normally, the terminal will display Active code page: 936, which confirms that the encoding format has been successfully updated to the GBK format. The firmware flashing tool can now function properly.
If the returned result during step 2.1 Checking the Current Encoding Format is 936, the system encoding format is correct, and the preceding steps are not required. The error can be resolved by installing the latest official version of the Espressif flash download tool. The download link is available at: https://docs.espressif.com/projects/esp-test-tools/en/latest/esp32/production_stage/tools/flash_download_tool.html