Failed to write compressed data to flash



  • Just bought a batch of 25 GPys and after two successful ones, I fail to write the latest firmware to the three next devices, they complain about "Failed to write compressed data to flash" result was C100 in the firmware update tool. Anyone knows what it is and the cure? I use TTL to USB adapter, with the standard expansion board all I get is RX data error…

    When I connect these to VScode I get the error E (31) esp_image: image at 0x10000 has invalid magic byte.



  • @robert-hh Probably so but for my use I am currently quite ok with my homebrew and Pycoms firmware update tool, but when i level-up I will have a look at your suggestions. Thanks for support!



  • @Don-iot I would see it the other way. Using CLI and esptool.py is the only reliable way for a full erase of the device.



  • @robert-hh Thanks Robert, good idea thanks for sharing. In this case I had a couple of devices that needed to be erased and not just updated and I am not confident enough to perform that with CLI. But for a regular software update I agree, then CLI and TTL adapter is the way to go.



  • @Don-iot Maybe you should set up a small linux system with a dedicated USB port, good cables etc. for that task. I did hundreds of firmware flashes with a Linux box and had no problems beside some CH340 based USB/UART modules which cannot cope with 921600 baud. Running at 460800 solved that.
    P.S.: Almost all the time I flash out of the development environment. But that is using the tools of the CLI updater. So for the firmware upgrade itself there is no difference.



  • @jcaron @Gijs So the fix was to use the Pycom Firmware tool, use my TTL adapter and use an extra 5V connected to the device. All fed via my USB hub. So that solved the communication issue. Now I just need to figure out how to get passed this warning. My only fix seems to be to reboot the computer. And that is ok, but updating 20 devices gets even more time consuming when I have to reboot after every 2-3 devices. Any idea what this warning is all about? failed.png



  • @Don-iot I believe the CLI upload tool lets you pick the speed, don't remember if the GUI version does. In some situations reducing the speed may help.



  • Thanks @Gijs that may clarify the problem, I will try again perhaps with a USB hub with a powersupply in between to even out things. But generally speaking, the expansion board should be sufficient when powered from my Macs USB-C ports, right? I tried two ports, two different methods/hardware boards and got successful attempts in between each upload with two devices, but five device failed repeatedly. Would CLI upload be better than the software tool?


  • Global Moderator

    Hi,
    The error code C100 relates to a Bad checksum after writing a block. This will make the Firmware Updater tool throw an error. Reflashing should usually solve the problem. A solution to this issue could be to check the power supply & wiring to your GPy. As voltage fluctuations could influence the bits being written.
    Best,
    Gijs


Log in to reply
 

Pycom on Twitter