Esp32 linked error

Hi
After upgrade PlatformIO i have problem…

PACKAGES:
 - framework-espidf 3.40000.200303 (4.0.0)
 - tool-cmake 3.16.4
 - tool-esptoolpy 1.20600.0 (2.6.0)
 - tool-idf 1.0.1
 - tool-mconf 1.4060000.20190628 (406.0.0)
 - tool-ninja 1.9.0
 - tool-openocd-esp32 1.1000.20190708 (10.0)
 - toolchain-esp32ulp 1.22851.190618 (2.28.51)
 - toolchain-xtensa32 2.80200.200226 (8.2.0)
Warning! Starting with ESP-IDF v4.0, new project structure is required:
https://docs.platformio.org/en/latest/frameworks/espidf.html#project-structure
Reading CMake configuration...
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\CAR\esp-idf\src\main_car.c.o

Generating project linker script .pio\build\CAR\esp32.project.ld
Traceback (most recent call last):
  File "C:\Users\kurza\.platformio\packages\framework-espidf\tools\ldgen\ldgen.py", line 150, in <module>
    main()
  File "C:\Users\kurza\.platformio\packages\framework-espidf\tools\ldgen\ldgen.py", line 126, in main
    mapping_rules = generation_model.generate_rules(sections_infos)
  File "C:\Users\kurza\.platformio\packages\framework-espidf\tools\ldgen\generation.py", line 354, in generate_rules
    self._create_exclusions(mapping_rules, default_rules, sections_infos)
  File "C:\Users\kurza\.platformio\packages\framework-espidf\tools\ldgen\generation.py", line 448, in _create_exclusions
    general_rule.add_exclusion(specific_rule, sections_info)
  File "C:\Users\kurza\.platformio\packages\framework-espidf\tools\ldgen\generation.py", line 100, in add_exclusion
    expansions = do_section_expansion(self, section)
  File "C:\Users\kurza\.platformio\packages\framework-espidf\tools\ldgen\generation.py", line 84, in do_section_expansion
    expansions = fnmatch.filter(sections_in_obj, section)
  File "C:\Users\kurza\.platformio\python37\lib\fnmatch.py", line 59, in filter
    for name in names:
TypeError: 'NoneType' object is not iterable
*** [.pio\build\CAR\esp32.project.ld] Error 1

So did you write your project for ESP-IDF v3 or v4?

If you want to compile for the last v3 version just add a platform_packages instruction to use that version.

platform_packages =
    framework-espidf @ 3.30300.190916

(referenced from Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog)

I try port to v.4, but when i add

platform_packages =

framework-espidf @ 3.30300.190916

PACKAGES:

  • framework-espidf 3.30300.190916 (3.3.0)
  • tool-cmake 3.16.4
  • tool-esptoolpy 1.20600.0 (2.6.0)
  • tool-idf 1.0.1
  • tool-mconf 1.4060000.20190628 (406.0.0)
  • tool-ninja 1.9.0
  • tool-openocd-esp32 1.1000.20190708 (10.0)
  • toolchain-esp32ulp 1.22851.190618 (2.28.51)
  • toolchain-xtensa32 2.80200.200226 (8.2.0)
    Error: the ‘src_filter’ option cannot be used with ESP-IDF. Select source files to build in the project CMakeLists.txt file.

Huh interesting, if it worked before then the backwards compatiblity isn’t working when trying to build ESP-IDFv3 projectes. (cc @valeros).

I think you can get atleast the project to compile in its old form when deleting the platform_packages line from the platformio.ini and instead modfying the platform to say

platform = espressif32@1.11.2

But that doesn’t help you when porting over the project to v4 of course.

Do you have the full platformio.ini and code for reproduction?

I will stay with the old version.
Thank you for your help.

platform = espressif32@1.11.2

is the right solution if you’re not ready to port your project to the new project configuration using CMake.