Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idf Build failed with LWIP_IRAM_OPTIMIZATION (IDFGH-3823) #5734

Closed
LXY1226 opened this issue Aug 15, 2020 · 3 comments
Closed

idf Build failed with LWIP_IRAM_OPTIMIZATION (IDFGH-3823) #5734

LXY1226 opened this issue Aug 15, 2020 · 3 comments
Assignees
Labels
Resolution: Cannot Reproduce Issue cannot be reproduced Status: Done Issue is done internally

Comments

@LXY1226
Copy link

LXY1226 commented Aug 15, 2020

Environment

Development Kit other [WT32-SC01]
Kit version N/A
Module or chip used [ESP32-WROVER-B]
IDF version v4.1-rc
Build System idf.py
Compiler version (crosstool-NG esp-2020r2) 8.2.0
Operating System Windows
(Windows only) environment type Plain Command Prompt.
Using an IDE? Yes [CLion with ESP Plugin]
Power Supply USB

Problem Description

esp-idf/tools/ldgen/ldgen.py Fails while LWIP_IRAM_OPTIMIZATION = y;

Build Log

FAILED: esp-idf/esp32/ld/esp32.project.ld

cmdline

cmd.exe /C "cd /D C:\Users*User*\CLionProjects\esp\build\esp-idf\esp32 && C:\Users*User*.espressif\python_env\idf4.1_py3.8_env\Scripts\python.exe C:/Users/User/Code/esp-idf/tools/ldgen/ldgen.py --config C:/Users/User/CLionProjects/esp/sdkconfig --fragments C:/Users/User/Code/esp-idf/components/xtensa/linker.lf C:/Users/User/Code/esp-idf/components/esp_ringbuf/linker.lf C:/Users/User/Code/esp-idf/components/spi_flash/linker.lf C:/Users/User/Code/esp-idf/components/espcoredump/linker.lf C:/Users/User/Code/esp-idf/components/esp32/linker.lf C:/Users/User/Code/esp-idf/components/esp32/ld/esp32_fragments.lf C:/Users/User/Code/esp-idf/components/soc/linker.lf C:/Users/User/Code/esp-idf/components/esp_event/linker.lf C:/Users/User/Code/esp-idf/components/esp_wifi/linker.lf C:/Users/User/Code/esp-idf/components/lwip/linker.lf C:/Users/User/Code/esp-idf/components/log/linker.lf C:/Users/User/Code/esp-idf/components/heap/linker.lf C:/Users/User/Code/esp-idf/components/freertos/linker.lf C:/Users/User/Code/esp-idf/components/newlib/esp32-spiram-rom-functions-c.lf C:/Users/User/Code/esp-idf/components/newlib/newlib.lf C:/Users/User/Code/esp-idf/components/app_trace/linker.lf C:/Users/User/Code/esp-idf/components/esp_gdbstub/linker.lf --input C:/Users/User/Code/esp-idf/components/esp32/ld/esp32.project.ld.in --output C:/Users/User/CLionProjects/esp/build/esp-idf/esp32/ld/esp32.project.ld --kconfig C:/Users/User/Code/esp-idf/Kconfig --env-file C:/Users/User/CLionProjects/esp/build/config.env --libraries-file C:/Users/User/CLionProjects/esp/build/ldgen_libraries --objdump C:/Users/User/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-objdump.exe"

Traceback (most recent call last):
File "C:/Users/User/Code/esp-idf/tools/ldgen/ldgen.py", line 158, in
main()
File "C:/Users/User/Code/esp-idf/tools/ldgen/ldgen.py", line 134, in main
mapping_rules = generation_model.generate_rules(sections_infos)
File "C:/Users/User/Code/esp-idf/tools/ldgen/generation.py", line 352, in generate_rules
self._create_exclusions(mapping_rules, default_rules, sections_infos)
File "C:/Users/User/Code/esp-idf/tools/ldgen/generation.py", line 451, in _create_exclusions
general_rule.add_exclusion(specific_rule, sections_info)
File "C:/Users/User/Code/esp-idf/tools/ldgen/generation.py", line 100, in add_exclusion
expansions = do_section_expansion(self, section)
File "C:/Users/User/Code/esp-idf/tools/ldgen/generation.py", line 84, in do_section_expansion
expansions = fnmatch.filter(sections_in_obj, section) [Debugger Screenshot]
File "C:/Users/User/AppData/Local/Programs/Python/Python38/lib/fnmatch.py", line 59, in filter
for name in names:
TypeError: 'NoneType' object is not iterable
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Steps to reproduce

  1. make a copy of Helloworld
  2. Tagged (Top) → Component config → LWIP → Enable LWIP IRAM optimization

sdkconfig

sdkconfig

Python Debugger Screenshot

debugger

@github-actions github-actions bot changed the title idf Build failed with LWIP_IRAM_OPTIMIZATION idf Build failed with LWIP_IRAM_OPTIMIZATION (IDFGH-3823) Aug 15, 2020
@renzbagaporo
Copy link
Contributor

In this case it seems that ethernetif.c is not being compiled with your application, since CONFIG_ETH_ENABLED is missing from your config. To enable, you have to enable one of the three:

CONFIG_ETH_USE_ESP32_EMAC
CONFIG_ETH_USE_SPI_ETHERNET
CONFIG_ETH_USE_OPENETH

These seem to be undefined in the config you posted.

@m-bruck
Copy link

m-bruck commented Aug 28, 2020

But for a WiFi only device this includes unnecessary drivers just to allow the LWIP IRAM optimization?

In this case it seems that ethernetif.c is not being compiled with your application, since CONFIG_ETH_ENABLED is missing from your config. To enable, you have to enable one of the three:

CONFIG_ETH_USE_ESP32_EMAC
CONFIG_ETH_USE_SPI_ETHERNET
CONFIG_ETH_USE_OPENETH

These seem to be undefined in the config you posted.

@ESP-Marius
Copy link
Collaborator

Closing the issue as this does not seem to be a problem anymore on the latest IDF master.

@espressif-bot espressif-bot added Resolution: Cannot Reproduce Issue cannot be reproduced Status: Done Issue is done internally labels Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Cannot Reproduce Issue cannot be reproduced Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

5 participants