From ce762bdb60839495e4e787eea18df022f7f28a71 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Mon, 13 Feb 2023 15:18:16 +0000 Subject: [PATCH] Added an environment for pico using HW serial I wasn't sure how to compile with or without HW serial support, so I duplicated the "pico" environment and added a -D HW_SERIAL --- platformio.ini | 8 ++++++++ src/config.h | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index d468130..3b79324 100644 --- a/platformio.ini +++ b/platformio.ini @@ -64,6 +64,14 @@ build_flags = -D MCU_ESP32 monitor_filters = esp32_exception_decoder build_type = debug +[env:picohw] +platform = https://github.com/maxgerhardt/platform-raspberrypi.git +board = pico +framework = arduino +board_build.core = earlephilhower +upload_port = /media/filip/RPI-RP2 +build_flags = -D MCU_PICO -D HW_SERIAL + [env:pico] platform = https://github.com/maxgerhardt/platform-raspberrypi.git board = pico diff --git a/src/config.h b/src/config.h index b458b73..92b1f6e 100644 --- a/src/config.h +++ b/src/config.h @@ -3,9 +3,11 @@ #define BOARD_AUTO //#define BOARD_SANGABOARDv5 - //without this, default to HW serial where available + //if HW_SERIAL is not defined, we'll use USB serial communication //the details are board specific and configured in boards.h + #ifndef HW_SERIAL #define USB_SERIAL + #endif #include //defines wiring