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

Guard ethernet parts to make it possible to use without #10609

Merged
merged 6 commits into from
Nov 19, 2024

Conversation

Jason2866
Copy link
Collaborator

@Jason2866 Jason2866 commented Nov 15, 2024

Currently it is not possible to switch off Ethernet support in IDF and compile Arduino as an component. This PR adds guards to make it possible to compile only with WiFi and no Ethernet.
Follow up from #10597

@me-no-dev

Copy link
Contributor

github-actions bot commented Nov 15, 2024

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Update ETH.cpp":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update ETH.h":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update NetworkEvents.h":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update WiFiGeneric.h":
    • summary looks empty
    • type/action looks empty
  • the commit message "remove unnecessary include "sdkconfig.h"":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 20 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

⚠️ Please consider squashing your 6 commits (simplifying branch history).
⚠️
	The **target branch** for this Pull Request **must be the default branch** of the project (`master`).

	If you would like to add this feature to a different branch, please state this in the PR description and we will consider it.

👋 Hello Jason2866, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against a7362a5

Copy link
Contributor

github-actions bot commented Nov 15, 2024

Test Results

 62 files   62 suites   7m 48s ⏱️
 22 tests  21 ✅ 0 💤 1 ❌
144 runs  143 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit a7362a5.

♻️ This comment has been updated with latest results.

Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32P4000.000.00000.000.00
ESP32S30‼️ +23K0.00‼️ +2.910‼️ +3K0.00‼️ +8.81
ESP32S20‼️ +19K0.00‼️ +2.410‼️ +3K0.00‼️ +8.97
ESP32C30‼️ +28K0.00‼️ +3.470‼️ +2K0.00‼️ +10.90
ESP32C60‼️ +43K0.00‼️ +4.780‼️ +25K0.00‼️ +129.87
ESP32H20‼️ +12K0.00‼️ +2.270‼️ +22K0.00‼️ +128.25
ESP320‼️ +23K0.00‼️ +2.550⚠️ +19600.00‼️ +4.74
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32P4ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
Ethernet/examples/ETH_TLK110------------‼️ +13K⚠️ +1188
Ethernet/examples/ETH_W5500_Arduino_SPI--‼️ +15K⚠️ +2024‼️ +12K⚠️ +1700‼️ +18K⚠️ +1780‼️ +20K‼️ +22K‼️ +12K‼️ +22K‼️ +10K⚠️ +1124
Ethernet/examples/ETH_W5500_IDF_SPI--‼️ +15K⚠️ +1992‼️ +11K⚠️ +1652‼️ +18K⚠️ +1780‼️ +20K‼️ +22K‼️ +12K‼️ +22K‼️ +9K⚠️ +1060
Ethernet/examples/ETH_WIFI_BRIDGE--‼️ +21K‼️ +3K‼️ +17K‼️ +2K‼️ +24K‼️ +2K‼️ +39K‼️ +4K--‼️ +19K⚠️ +1800
NetworkClientSecure/examples/WiFiClientInsecure--‼️ +22K‼️ +3K‼️ +18K‼️ +3K‼️ +27K‼️ +2048‼️ +42K‼️ +24K--‼️ +22K⚠️ +1792
NetworkClientSecure/examples/WiFiClientPSK--‼️ +22K‼️ +3K‼️ +18K‼️ +3K‼️ +27K‼️ +2048‼️ +42K‼️ +24K--‼️ +22K⚠️ +1808
NetworkClientSecure/examples/WiFiClientSecure--‼️ +22K‼️ +3K‼️ +18K‼️ +3K‼️ +27K‼️ +2048‼️ +42K‼️ +24K--‼️ +22K⚠️ +1808
NetworkClientSecure/examples/WiFiClientSecureProtocolUpgrade--‼️ +22K‼️ +3K‼️ +18K‼️ +3K‼️ +27K‼️ +2048‼️ +42K‼️ +24K--‼️ +22K⚠️ +1792
NetworkClientSecure/examples/WiFiClientShowPeerCredentials--‼️ +22K‼️ +3K‼️ +18K‼️ +3K‼️ +25K⚠️ +2024‼️ +41K‼️ +24K--‼️ +21K⚠️ +1780
NetworkClientSecure/examples/WiFiClientTrustOnFirstUse--‼️ +20K‼️ +3K‼️ +16K‼️ +2K‼️ +25K⚠️ +1728‼️ +41K‼️ +24K--‼️ +22K⚠️ +1800
PPP/examples/PPP_Basic--‼️ +15K⚠️ +2040‼️ +9K⚠️ +1660‼️ +14K⚠️ +1816‼️ +18K‼️ +22K‼️ +10K‼️ +22K‼️ +11K⚠️ +1108
PPP/examples/PPP_WIFI_BRIDGE--‼️ +20K‼️ +3K‼️ +15K‼️ +2K‼️ +20K‼️ +2K‼️ +37K‼️ +4K--‼️ +19K⚠️ +1792
WebServer/examples/AdvancedWebServer--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +21K‼️ +2K‼️ +41K‼️ +25K--‼️ +18K⚠️ +1792
WebServer/examples/FSBrowser--‼️ +18K‼️ +3K‼️ +15K‼️ +3K‼️ +19K⚠️ +2040‼️ +37K‼️ +24K--‼️ +18K⚠️ +1816
WebServer/examples/Filters--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +21K‼️ +2K‼️ +41K‼️ +25K--‼️ +18K⚠️ +1792
WebServer/examples/HelloServer--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +21K‼️ +2K‼️ +41K‼️ +25K--‼️ +18K⚠️ +1792
WebServer/examples/HttpAdvancedAuth--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +20K‼️ +2K‼️ +40K‼️ +24K--‼️ +18K⚠️ +1784
WebServer/examples/HttpAuthCallback--‼️ +19K‼️ +3K‼️ +14K‼️ +2K‼️ +20K‼️ +2K‼️ +40K‼️ +24K--‼️ +18K⚠️ +1784
WebServer/examples/HttpAuthCallbackInline--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +20K‼️ +2K‼️ +40K‼️ +24K--‼️ +18K⚠️ +1784
WebServer/examples/HttpBasicAuth--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +20K‼️ +2K‼️ +40K‼️ +24K--‼️ +18K⚠️ +1784
WebServer/examples/HttpBasicAuthSHA1--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +20K‼️ +2K‼️ +40K‼️ +24K--‼️ +19K⚠️ +1784
WebServer/examples/HttpBasicAuthSHA1orBearerToken--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +20K‼️ +2K‼️ +40K‼️ +25K--‼️ +19K⚠️ +1792
WebServer/examples/MultiHomedServers--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +21K‼️ +2K‼️ +40K‼️ +25K--‼️ +18K⚠️ +1792
WebServer/examples/PathArgServer--‼️ +16K‼️ +3K‼️ +12K‼️ +3K‼️ +12K‼️ +2048‼️ +33K‼️ +24K--‼️ +15K⚠️ +1960
WebServer/examples/SDWebServer--‼️ +17K‼️ +3K‼️ +12K‼️ +2K‼️ +20K‼️ +2K‼️ +40K‼️ +24K--‼️ +16K⚠️ +1768
WebServer/examples/SimpleAuthentification--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +21K⚠️ +2040‼️ +40K‼️ +24K--‼️ +20K⚠️ +1808
WebServer/examples/UploadHugeFile--‼️ +15K‼️ +3K‼️ +10K‼️ +2K‼️ +12K‼️ +2K‼️ +33K‼️ +25K--‼️ +15K⚠️ +1960
WebServer/examples/WebServer--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +20K‼️ +2048‼️ +40K‼️ +24K--‼️ +18K⚠️ +1776
WebServer/examples/WebUpdate--‼️ +19K‼️ +3K‼️ +15K‼️ +2K‼️ +21K‼️ +2K‼️ +41K‼️ +25K--‼️ +18K⚠️ +1784
WiFi/examples/FTM/FTM_Initiator--‼️ +19K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +19K⚠️ +1808
WiFi/examples/FTM/FTM_Responder--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +19K⚠️ +1808
WiFi/examples/SimpleWiFiServer--‼️ +20K‼️ +3K‼️ +15K‼️ +2K‼️ +23K‼️ +2K‼️ +42K‼️ +25K--‼️ +19K⚠️ +1792
WiFi/examples/WiFiAccessPoint--‼️ +20K‼️ +3K‼️ +15K‼️ +2K‼️ +23K‼️ +2K‼️ +42K‼️ +25K--‼️ +19K⚠️ +1792
WiFi/examples/WiFiClient--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +42K‼️ +24K--‼️ +19K⚠️ +1808
WiFi/examples/WiFiClientBasic--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +42K‼️ +24K--‼️ +19K⚠️ +1808
WiFi/examples/WiFiClientConnect--‼️ +18K‼️ +3K‼️ +14K‼️ +2K‼️ +20K⚠️ +1736‼️ +36K‼️ +3K--‼️ +18K⚠️ +1792
WiFi/examples/WiFiClientEvents--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +19K⚠️ +1808
WiFi/examples/WiFiClientStaticIP--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +42K‼️ +24K--‼️ +19K⚠️ +1792
WiFi/examples/WiFiExtender--‼️ +19K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +19K⚠️ +1792
WiFi/examples/WiFiIPv6--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +23K‼️ +2048‼️ +42K‼️ +24K--‼️ +19K⚠️ +1792
WiFi/examples/WiFiMulti--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +18K⚠️ +1808
WiFi/examples/WiFiMultiAdvanced--‼️ +22K‼️ +3K‼️ +18K‼️ +3K‼️ +25K⚠️ +2032‼️ +41K‼️ +24K--‼️ +21K⚠️ +1788
WiFi/examples/WiFiScan--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +19K⚠️ +1808
WiFi/examples/WiFiScanAsync--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +19K⚠️ +1808
WiFi/examples/WiFiScanDualAntenna--‼️ +20K‼️ +3K‼️ +17K‼️ +3K‼️ +23K⚠️ +2040‼️ +39K‼️ +3K--‼️ +19K⚠️ +1816
WiFi/examples/WiFiScanTime--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +19K⚠️ +1808
WiFi/examples/WiFiTelnetToSerial--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K⚠️ +2024‼️ +42K‼️ +24K--‼️ +19K⚠️ +1776
WiFi/examples/WiFiUDPClient--‼️ +20K‼️ +3K‼️ +16K‼️ +3K‼️ +22K‼️ +2048‼️ +42K‼️ +24K--‼️ +19K⚠️ +1808
NetworkClientSecure/examples/WiFiClientSecureEnterprise--‼️ +23K‼️ +3K‼️ +19K‼️ +3K‼️ +28K⚠️ +2024‼️ +43K‼️ +24K--‼️ +23K⚠️ +1800
WiFi/examples/WPS--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +18K⚠️ +1792
WiFi/examples/WiFiBlueToothSwitch--‼️ +18K‼️ +3K--‼️ +21K⚠️ +1728‼️ +37K‼️ +3K--‼️ +19K⚠️ +1788
WiFi/examples/WiFiClientEnterprise--‼️ +23K‼️ +3K‼️ +19K‼️ +3K‼️ +28K⚠️ +2040‼️ +43K‼️ +24K--‼️ +23K⚠️ +1792
WiFi/examples/WiFiSmartConfig--‼️ +19K‼️ +3K‼️ +15K‼️ +3K‼️ +22K⚠️ +2040‼️ +38K‼️ +3K--‼️ +18K⚠️ +1792
Ethernet/examples/ETH_LAN8720------------‼️ +13K⚠️ +1188

@lucasssvaz lucasssvaz requested a review from me-no-dev November 16, 2024 00:49
@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Nov 18, 2024
@me-no-dev me-no-dev merged commit f5ce3f7 into espressif:release/v3.1.x Nov 19, 2024
53 of 56 checks passed
@Jason2866 Jason2866 deleted the guard_ethernet branch November 19, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Merge Pull Request is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants