Page 1 of 1

esptool.py下载工具默认压缩APP,但代码上找不到解压的地方

Posted: Wed Feb 14, 2024 7:30 am
by Golden
在IDF下烧录APP,默认会压缩APP,然后烧录压缩后的数据。烧录脚本esptool.py采用python zlib库函数进行压缩。我查看了bootloader代码,并未发现zlib解压的过程,代码只是设置了IROM MMU映射了,然后就直接读取FLASH的内容,但实际运行又能正常,所以我感到很疑惑,运行时分区镜像的zlib解压过程是在哪里?
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00010000 to 0x0003efff...
Compressed 191520 bytes to 99726...
Writing at 0x00010000... (14 %)
Writing at 0x0001b380... (28 %)
Writing at 0x000217fd... (42 %)
Writing at 0x00028da6... (57 %)
Writing at 0x0002fe44... (71 %)
Writing at 0x00036db2... (85 %)
Writing at 0x0003e1a7... (100 %)
Wrote 191520 bytes (99726 compressed) at 0x00010000 in 2.8 seconds (effective 539.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...