Initial support for RP2040 (Raspberry Pi Pico W) #50
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.
Currently working with ESPHome 2024.12.4.
Modified a number of things to allow for selective inclusion of components depending on platform.
SSL is not supported for MQTT for the RP2040 platform on ESPHome, so a custom component:(rp2040_mqtt) was made. Because of this, various fields relying on the original MQTT component don't work and cause errors if compiling without the stock MQTT. To work around this, subtitutions were implemented in order to fill out the name of the component depending on the platform being built for (${mqtt} is replaced with either "mqtt" or "rp2040_mqtt").
To allow for building for the RP2040 platform, ESP-specific items were moved from the "common.yaml" file to "esp32_common.yaml" and includes to this were added to the ESP device configurations.
I believe this covers the bulk of the modifications to existing code. The rest of the changes are to add support for the RP2040.
Also, a patch (firmware/patches/0001-Updated-web-server-and-captive-portal-to-support-RP2.patch) is included that needs to be applied to the "components" directory within the "esphome" install directory of the build system (if using a virtualenv, it'd be "venv/lib/python3.12/site-packages/esphome/components"). This added support for the web_server, async_tcp, and captive_portal components for the RP2040. Without these modifications the build for the Pico will fail.
Performance seems to be pretty good. When there is a good wifi signal everything seems to work fine.
Note: CA checking for the printer's cert is DISABLED (ie insecure). That probably is an easy fix I can adjust tomorrow.