diff --git a/esphome/core/defines.h b/esphome/core/defines.h index 4831ed2c9e..05e83522d4 100644 --- a/esphome/core/defines.h +++ b/esphome/core/defines.h @@ -146,6 +146,9 @@ #define USE_SOCKET_IMPL_BSD_SOCKETS #endif +#ifdef USE_NRF52 +#endif + // Disabled feature flags // #define USE_BSEC // Requires a library with proprietary license. diff --git a/platformio.ini b/platformio.ini index 57669a6cfb..7a4626c523 100644 --- a/platformio.ini +++ b/platformio.ini @@ -181,6 +181,18 @@ build_flags = -DUSE_LIBRETINY build_src_flags = -include Arduino.h +; This is the common settings for the nRF52 using Zephyr. +[common:nrf52-zephyr] +extends = common +platform = platformio/nordicnrf52@10.3.0 +platform_packages = + platformio/framework-zephyr @ https://github.com/tomaszduda23/framework-sdk-nrf + platformio/toolchain-gccarmnoneeabi@https://github.com/tomaszduda23/toolchain-sdk-ng +build_flags = + ${common.build_flags} + -DUSE_ZEPHYR + -DUSE_NRF52 + ; All the actual environments are defined below. ;;;;;;;; ESP8266 ;;;;;;;; @@ -393,9 +405,8 @@ build_flags = -std=c++17 [env:nrf52] -extends = common -platform = platformio/nordicnrf52@10.3.0 -platform_packages = - platformio/framework-zephyr @ https://github.com/tomaszduda23/framework-sdk-nrf - platformio/toolchain-gccarmnoneeabi@https://github.com/tomaszduda23/toolchain-sdk-ng +extends = common:nrf52-zephyr board = adafruit_feather_nrf52840 +build_flags = + ${common:nrf52-zephyr.build_flags} + ${flags:runtime.build_flags}