Closed martinberlin closed 3 years ago
Hey Martin,
Thanks for taking a look - I really appreciate it. I thought I had replied this morning, but my reply seems to have vanished (or I forgot to save it...).
I suspect it will only work with >= 4.3 as that's what I see when I build.
Source `/home/martin/.platformio/packages/framework-espidf/components/soc/src/cpu_util.c' not found, needed by target `.pio/build/lilygo_t5_47/bootloader/soc/src/cpu_util.o'.
I think it's the same issue as this one: https://github.com/turgu1/EPub-InkPlate/issues/2#issuecomment-798987397
SOLUTION was to delete that :
~/.platformio/packages$ rm -fr framework-espidf
And build again. That recreates the folder.
I'm hoping your second issue may disappear after doing that as well - though it's not one I've seen before!
Hi Chris, did that and it did work with previous version but with this one does not. Can you try to reproduce it?
PACKAGES:
toolchain-xtensa32 2.80400.210211 (8.4.0) Reading CMake configuration... Generating assembly for certificate bundle... CMake Error at /home/martin/.platformio/packages/framework-espidf/tools/cmake/scripts/data_file_embed_asm.cmake:26 (file): file failed to open for reading (No such file or directory):
/home/martin/esp/projects/diy-esp32-epub-reader/.pio/build/lilygo_t5_47/x509_crt_bundle
*** Error 1
/home/martin/.platformio/penv/bin/python /home/martin/.platformio/packages/framework-espidf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py --input /home/martin/.platformio/packages/framework-espidf/components/mbedtls/esp_crt_bundle/cacrt_all.pem
gen_crt_bundle.py: Parsing certificates from /home/martin/.platformio/packages/framework-espidf/components/mbedtls/esp_crt_bundle/cacrt_all.pem
gen_crt_bundle.py: Invalid certificate in /home/martin/.platformio/packages/framework-espidf/components/mbedtls/esp_crt_bundle/cacrt_all.pem
Invalid certificate
I know it's at this point not strictly related to your code but is a real show stopper, since you cannot build it! It seems the esp-idf 4.3 is having a problem with the mbedtls certificate build. I even went as far as removing the whole directories in packages, everything. And reinstalled latest esp-idf. Then comes this error:
Reading CMake configuration...
Generating assembly for certificate bundle...
CMake Error at /home/martin/.platformio/packages/framework-espidf/tools/cmake/scripts/data_file_embed_asm.cmake:26 (file):
file failed to open for reading (No such file or directory):
/home/martin/esp/projects/diy-esp32-epub-reader/.pio/build/lilygo_t5_47/x509_crt_bundle
This directory does not even exist in the build. Does in yours? Maybe it's the previous error and it simply cannot build it?
There is a reason I use only VSCode to program and idf.py to build and compile. And it's simply that I never experienced this kind of strange error that I have when I try to use Platformio to build. It builds and works great with arduino esp32 framework. But with IDF it always gave me problems. Added this problem in Platformio community section: https://community.platformio.org/t/problems-building-with-esp-idf-latest-version-4-3-0/23758
Tried deleting everything in ~/.platformio/packages
and it redownloaded everything when I hit build.
Here's what I see when I hit build:
PACKAGES:
- framework-espidf 3.40300.0 (4.3.0)
- tool-cmake 3.16.4
- tool-esptoolpy 1.30100.210531 (3.1.0)
- tool-ninja 1.9.0
- toolchain-esp32ulp 1.22851.191205 (2.28.51)
- toolchain-xtensa32 2.80400.210211 (8.4.0)
WARNING: You are using pip version 21.0.1; however, version 21.2.4 is available.
You should consider upgrading via the '/Users/chrisgreening/.platformio/penv/bin/python -m pip install --upgrade pip' command.
Reading CMake configuration...
Generating assembly for certificate bundle...
And then it carries on without any problems :(
I'm running on a mac and have python 3.9.7 - I wonder if that's the difference?
I've tried switching off the certificate bundle in menuconfig - can you pull the latest code and see if that fixes it?
Thanks Chris, like this it builds. But it shouldn't be like that that you need to disable the certificate bundle. I don't really know what consequences has it, but good thing is that it compiles ;)
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [= ] 9.8% (used 32180 bytes from 327680 bytes) Flash: [======== ] 81.8% (used 857325 bytes from 1048576 bytes) Building .pio/build/lilygo_t5_47/firmware.bin esptool.py v3.1 Merged 1 ELF section =================================================== [SUCCESS] Took 38.41 seconds
@cgreening do not leave this hardcoded on platformio.ini!!!
upload_port = /dev/cu.SLAB_USBtoUART monitor_port = /dev/cu.SLAB_USBtoUART
This are your personal USB but of course this is different on every computer configuration (Mines are /dev/ttyUSB0)
That's great! Should have minimal impact unless we need to connect to outside world over https. Hopefully by then the problem will have been fixed :)
Good point on the ports - I'll get those removed.
Awesome. It works now. Please add also on the Readme that for the:
USE_SPIFFS
version you need to run:
pio run -t uploadfs
in order to upload the /data folder to your Spiffs. Notice that also when building they come some warnings (Not your library but still...)
lib/png/PNGdec/src/infback.c: In function 'inflateBack':
lib/png/PNGdec/src/infback.c:479:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
state->mode = LEN;
~~~~~~~~~~~~^~~~~
lib/png/PNGdec/src/infback.c:481:9: note: here
case LEN:
^~~~
Indexing .pio/build/lilygo_t5_47/bootloader/esp-idf/spi_flash/libspi_flash.a
Compiling .pio/build/lilygo_t5_47/libc97/png/inftrees.o
Linking .pio/build/lilygo_t5_47/bootloader.elf
lib/png/PNGdec/src/inflate.c: In function 'inflate':
lib/png/PNGdec/src/inflate.c:750:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
state->mode = EXLEN;
~~~~~~~~~~~~^~~~~~~
lib/png/PNGdec/src/inflate.c:751:9: note: here
case EXLEN:
^~~~
lib/png/PNGdec/src/inflate.c:763:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
state->mode = EXTRA;
~~~~~~~~~~~~^~~~~~~
lib/png/PNGdec/src/inflate.c:764:9: note: here
case EXTRA:
^~~~
lib/png/PNGdec/src/inflate.c:785:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
state->mode = NAME;
~~~~~~~~~~~~^~~~~~
lib/png/PNGdec/src/inflate.c:786:9: note: here
case NAME:
^~~~
lib/png/PNGdec/src/inflate.c:806:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
state->mode = COMMENT;
Thanks a lot looks very cool. Soon I will upload a video in Twitter!
Fantastic!
I'll update the readme with what you've found tomorrow.
Thanks for being the first to try it and go through the pain!
No problem, it has potential to be a very nice ebook reader! Thanks for your help on this one
For this kind of error: .pio/build/lilygo_t5_47/x509_crt_bundle What it works for me (I'm working on linux-based system) is going to this file: Search specifically for this certificate "EC-ACC" and delete it:
That's great - at the moment we've just disabled certificate bundling - but that's not really a long term solution...
Yes this is a good option. I did it do I don't have to worry anymore. But at some point it will kick back on us if we add some download option that requires secure https
Hi Chris, trying to compile this using PlatformIO and wanted to report first problems, so we can build proper build instructions.
So it selects that env by default.
Additional Info:
@cgreening can you understand where is the problem with the missing ULP here? According to this post it should be already solved in this IDF version.
Additionally I would like to know what will be the minimum ESP-IDF framework version required and if it will be possible to compile this on command line using idf.py build (I guess no, since some lib dependences are managed by platformio)
UPDATE: Using esp-idf 4.3.0 it compiles further ( It requires then version >= 4.3? )
Next error hit is:
That is strange, there is no such a file in the .platformio/packages directory
Second error hit, seems related to this issue: