espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.71k stars 7.43k forks source link

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

Closed Jason2866 closed 3 days ago

Jason2866 commented 6 days ago

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

github-actions[bot] commented 6 days ago
Warnings
:warning: **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](https://www.conventionalcommits.org/en/v1.0.0/) - correct format of commit message should be: `(): `, 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](https://github.com/espressif/conventional-precommit-linter)).
:warning: Please consider squashing your 6 commits (simplifying branch history).
:warning: 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 :no_entry_sign: dangerJS against a7362a5211d72e28308b8fe89ff7f44a5972b65f

github-actions[bot] commented 6 days ago

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 a7362a52.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 6 days ago

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