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

add printf support to ESP32/8266 and arduino-pico cores #873

Merged
merged 2 commits into from
Sep 18, 2022

Conversation

2bndy5
Copy link
Member

@2bndy5 2bndy5 commented Sep 18, 2022

resolves #870

I also added the 2 boards to the PlatformIO CI workflow:

  1. Node MCU ESP8266 board
  2. Adafruit QtPy ESP32-S2 board

This should help us detect compiler warnings and whatnot.

@TMRh20
Copy link
Member

TMRh20 commented Sep 18, 2022

Looks good to me, I haven't tested but assume you have. :p

@2bndy5
Copy link
Member Author

2bndy5 commented Sep 18, 2022

I have tested this - it works well. I was just unsure about undefining printf_P on ESP32 core. Seems ok to do so. Compiler will complain if we don't undefine it first.

@2bndy5 2bndy5 force-pushed the printf-support-for-ESP-and-RP2040-cores branch 2 times, most recently from d8e9eb5 to 1d8be2c Compare September 18, 2022 13:54
Arduino CLI seems to have trouble getting the esp* core that
corresponds to the fqbn prefix
@2bndy5 2bndy5 force-pushed the printf-support-for-ESP-and-RP2040-cores branch from 6368e87 to d582f78 Compare September 18, 2022 14:10
@2bndy5
Copy link
Member Author

2bndy5 commented Sep 18, 2022

I just got done re-testing this on the following boards:

  1. Node MCU (ESP8266-12E)
  2. QtPy ESP32-S2
  3. QtPy RP2040

All of them can now use printDetails() 🎉


I should note that the Official Arduino core for the RP2040 Connect will not be able to use printDetails() still. But honestly, users should be encouraged to use the arduino-pico core as it is just better all around.

@2bndy5 2bndy5 merged commit f91fe7e into master Sep 18, 2022
@2bndy5 2bndy5 deleted the printf-support-for-ESP-and-RP2040-cores branch September 18, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

define printf_P as Serial.printf on ESP32/8266 and RP2040 (arduino-pico) cores
2 participants