Complex ESP-IDF dependencies seem to break pio build script - TypeError: 'NoneType' object is not iterable:

Hi!
Thanks for a great product!
I have an issue where I have ESP-IDF components with their own dependencies seemingly causing problems for Platformio. The reason I think that may be the case, is that it doesn’t seem to break in running idf.py build in the same folder. ESP-IDF doesn’t seem to mind the current config.

It doesn’t compile without errors there, but that is not the problem. Abbreviated, the error is:

TypeError: 'NoneType' object is not iterable:
for cg in target_compile_groups:

It happens in espidf.py, line 614. If I monkey-patch the script to return [] if it is None, the script continues. I am not sure it works properly then, though, so there seems to be some case that isn’t covered or something.

The repository is at: GitHub - nicklasb/NMEA_Gateway

Note that the project itself has ESP-IDF-dependencies, and that this problem only occurs when I add the nmea-gateway component. If I remove it, the pio build scripts works.

I am probably doing something crazy somewhere, but I don’t get it, I have spent a lot of time trying to fix this problem now…

If anyone could take a look, it would be great.
As it works in ESP-IDF, it is hard for me to see why would not be a bug or limitation of PlatformIO?

Did you file a bug in Issues · platformio/platform-espressif32 · GitHub?

1 Like

Nope, done!
(Complex ESP-IDF dependencies seem to break pio build script - TypeError: ‘NoneType’ object is not iterable · Issue #1180 · platformio/platform-espressif32 · GitHub)

This has been resolved, it was the CMakeLists.txt that didn’t include .cpp, but only .c.
Strangely, this worked with ESP-IDF.

Resolution here: Complex ESP-IDF dependencies seem to break pio build script - TypeError: ‘NoneType’ object is not iterable · Issue #1180 · platformio/platform-espressif32 · GitHub