Open
Conversation
Currently, src/bridge_eth.c unconditionally includes driver/gpio.h, which causes build failures if the driver component is not explicitly declared in the CMake requirements. This commit addresses the issue by: 1. Adding driver to the REQUIRES list in CMakeLists.txt to ensure dependency resolution works correctly for the GPIO driver. 2. Wrapping the inclusion of driver/gpio.h and driver/spi_master.h in src/bridge_eth.c with the CONFIG_BRIDGE_USE_SPI_ETHERNET check. This ensures these headers are only included when the SPI Ethernet configuration is actually active.
Contributor
|
Which version of IDF did this compilation issue occur in? |
Author
V5.4.3 |
Contributor
|
Hello, I have tested with the examples from the latest iot-bridge repository and did not encounter any compilation issues. May I ask which demo you are compiling and which configurations you have enabled that led to the problem? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The source file
src/bridge_eth.cincludesdriver/gpio.hto handle Ethernet PHY configuration. Previously, the build failed because thedrivercomponent was missing from the CMakeREQUIRESlist, preventingthe compiler from resolving the header file.
This commit adds
driverto the component requirements to ensure dependencies are correctly linked and the header can be found.