I had the same issue as @tarmo888 (I also had no
ESP_FLASH_BLOCK, so maybe that was a typo, as it's not in the v2 esptool either) but I found a solution (on Windows) after a couple of hours..
I've come back to my Pico after some years (kickstarter backer supplied with ESP8266 & v1 shim). I soldered the ESP8266 & shim to the Pico, and it originally worked. The firmware versions reported the 0018000902-AI03 version, so I wanted to upgrade, but no matter what I tried (via the IDE or esptool) I couldn't get it to work. I think I completely clobbered the driver by trying
require("Storage").eraseAll() and then
reset() since re-running firmware versions reported nothing.
So here's what worked for me - the tool espFlasher mentioned on the page in the last link on Gordon's instructions worked (I used the 64-bit version). The 0.25.0.0 FW version could be loaded provided the "Connect to Espruino" instructions on Use Espriuno (I ignored the digitalWrite lines since those are for the new shim), enabled the ESP8266 bootloader as per the instruction, and instead of running esptool.py, run the espFlasher with baud set to 115200 (via Advanced tab). After restarting, and trying the firmware versions routines, you'll see the 0.25.0.0 version reported.