Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"idf.py storage-flash" failed with "Invalid head of packet (0x6F): Possible serial noise or corruption" #2

Closed
goodluckrhj opened this issue Dec 2, 2022 · 6 comments

Comments

@goodluckrhj
Copy link

  • Environment:
    Ubuntu 22.04
    ESP-IDF 4.4.3
    esp-wasmachine master

  • Description:
    After build process, idf.py storage-flash failed.

  • Detailed:
    `
    ~/Project/esp/esp-wasmachine$ idf.py storage-flash
    Executing action: storage-flash
    Running ninja in directory /home//Project/esp/esp-wasmachine/build
    Executing "ninja storage-flash"...
    [1/2] cd /home//Project/esp/esp-wasmachine/build/esp-idf/main && /home/...s 0x7f0000 -p 256 -b 4096 /home/Project/esp/esp-wasmachine/build/storage.bin
    /wasm/hello_world.wasm
    [1/2] cd /home/Project/esp/esp-wasmachine/main && /usr/bin/cmake -D IDF_PATH...ld" -P /home/Project/esp/esp-idf/components/esptool_py/run_serial_tool.cmake
    Note: /home/.espressif/python_env/idf4.4_py3.10_env/bin/python /home/Project/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32s3 will search for a serial port. To specify a port, set the ESPPORT environment variable.
    Note: /home/.espressif/python_env/idf4.4_py3.10_env/bin/python /home/Project/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32s3 will attempt to set baud rate automatically. To specify a baud rate, set the ESPBAUD environment variable.
    esptool.py esp32s3 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 16MB 0x810000 storage.bin
    esptool.py v3.3.2
    Found 1 serial ports
    Serial port /dev/ttyACM0
    Connecting...
    Chip is ESP32-S3
    Features: WiFi, BLE
    Crystal is 40MHz
    MAC: 7c:df:a1:e8:23:58
    Uploading stub...
    Running stub...
    Stub running...
    Configuring flash size...
    Flash will be erased from 0x00810000 to 0x00ffffff...
    Compressed 8323072 bytes to 8656...
    Writing at 0x00810000... (100 %)

A fatal error occurred: Invalid head of packet (0x6F): Possible serial noise or corruption.
CMake Error at /home/Project/esp/esp-idf/components/esptool_py/run_serial_tool.cmake:56 (message):
/home/.espressif/python_env/idf4.4_py3.10_env/bin/python
/home/Project/esp/esp-idf/components/esptool_py/esptool/esptool.py
--chip esp32s3 failed

FAILED: esp-idf/main/CMakeFiles/storage-flash /home/Project/esp/esp-wasmachine/build/esp-idf/main/CMakeFiles/storage-flash
cd /home/Project/esp/esp-wasmachine/main && /usr/bin/cmake -D IDF_PATH="/home/Project/esp/esp-idf" -D SERIAL_TOOL="/home/.espressif/python_env/idf4.4_py3.10_env/bin/python /home/Project/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32s3" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @storage-flash_args" -D WORKING_DIRECTORY="/home/Project/esp/esp-wasmachine/build" -P /home/Project/esp/esp-idf/components/esptool_py/run_serial_tool.cmake
ninja: build stopped: subcommand
`

@goodluckrhj
Copy link
Author

supplementary information:

  1. I have happened to succeeded to flash file system to esp-box for just only once.
  2. It always failed to "idf.py storage-flash" or write file system "storage.bin" by "esptool.py"
  3. It normally succeeded to "idf.py flash" to write bootloader or other binary

@goodluckrhj
Copy link
Author

espressif/arduino-esp32#7467 (comment)
reproduce of this error.

@donghengqaz
Copy link
Collaborator

This is related to issue:espressif/esptool#795, I have fix this by reducing file-system image size.

@henrygab
Copy link

henrygab commented Dec 22, 2022

Note: reduction to less than 16MB flash use is not a fix, only a workaround. For devices using 32MB flash, this workaround artificially limits the device to using <16MB of the flash.

@donghengqaz
Copy link
Collaborator

donghengqaz commented Dec 23, 2022

Note: reduction to less than 16MB flash use is not a fix, only a workaround. For devices using 32MB flash, this workaround artificially limits the device to using <16MB of the flash.

Yes, this is a workaround, and I am waiting for esptool maintainer to fix this, firstly I try to let users of this SDK feel smooth to flash image.

@X-Ryl669
Copy link

I think it's fixed (since this commit, so you can probably restore the expected partition here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants