[native_base] extends = portduino_base build_flags = ${portduino_base.build_flags} -I variants/native/portduino -I /usr/include board = cross_platform board_level = extra lib_deps = ${portduino_base.lib_deps} # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028 melopero/Melopero RV3028@1.2.0 build_src_filter = ${portduino_base.build_src_filter} [env:native] extends = native_base ; The pkg-config commands below optionally add link flags. ; the || : is just a "or run the null command" to avoid returning an error code build_flags = ${native_base.build_flags} !pkg-config --libs libulfius --silence-errors || : !pkg-config --libs openssl --silence-errors || : !pkg-config --cflags --libs sdl2 --silence-errors || : !pkg-config --cflags --libs libbsd-overlay --silence-errors || : [env:native-tft] extends = native_base build_type = release lib_deps = ${native_base.lib_deps} ${device-ui_base.lib_deps} build_flags = ${native_base.build_flags} -Os -lX11 -linput -lxkbcommon -ffunction-sections -fdata-sections -Wl,--gc-sections -D RAM_SIZE=16384 -D USE_X11=1 -D HAS_TFT=1 -D HAS_SCREEN=1 -D LV_CACHE_DEF_SIZE=6291456 -D LV_BUILD_TEST=0 -D LV_USE_LIBINPUT=1 -D LV_LVGL_H_INCLUDE_SIMPLE -D LV_CONF_INCLUDE_SIMPLE -D LV_COMP_CONF_INCLUDE_SIMPLE -D USE_LOG_DEBUG -D LOG_DEBUG_INC=\"DebugConfiguration.h\" -D USE_PACKET_API -D VIEW_320x240 !pkg-config --libs libulfius --silence-errors || : !pkg-config --libs openssl --silence-errors || : !pkg-config --cflags --libs sdl2 --silence-errors || : !pkg-config --cflags --libs libbsd-overlay --silence-errors || : build_src_filter = ${native_base.build_src_filter} [env:native-fb] extends = native_base build_type = release lib_deps = ${native_base.lib_deps} ${device-ui_base.lib_deps} build_flags = ${native_base.build_flags} -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -D RAM_SIZE=8192 -D USE_FRAMEBUFFER=1 -D LV_COLOR_DEPTH=32 -D HAS_TFT=1 -D HAS_SCREEN=1 -D LV_BUILD_TEST=0 -D LV_USE_LOG=0 -D LV_USE_EVDEV=1 -D LV_LVGL_H_INCLUDE_SIMPLE -D LV_CONF_INCLUDE_SIMPLE -D LV_COMP_CONF_INCLUDE_SIMPLE -D USE_LOG_DEBUG -D LOG_DEBUG_INC=\"DebugConfiguration.h\" -D USE_PACKET_API -D VIEW_320x240 -D MAP_FULL_REDRAW !pkg-config --libs libulfius --silence-errors || : !pkg-config --libs openssl --silence-errors || : !pkg-config --cflags --libs libbsd-overlay --silence-errors || : build_src_filter = ${native_base.build_src_filter} [env:native-tft-debug] extends = native_base build_type = debug lib_deps = ${native_base.lib_deps} ${device-ui_base.lib_deps} build_flags = ${native_base.build_flags} -O0 -fsanitize=address -lX11 -linput -lxkbcommon -D DEBUG_HEAP -D RAM_SIZE=16384 -D USE_X11=1 -D HAS_TFT=1 -D HAS_SCREEN=0 -D LV_CACHE_DEF_SIZE=6291456 -D LV_BUILD_TEST=0 -D LV_USE_LOG=1 -D LV_USE_SYSMON=1 -D LV_USE_PERF_MONITOR=1 -D LV_USE_MEM_MONITOR=0 -D LV_USE_PROFILER=0 -D LV_USE_LIBINPUT=1 -D LV_LVGL_H_INCLUDE_SIMPLE -D LV_CONF_INCLUDE_SIMPLE -D LV_COMP_CONF_INCLUDE_SIMPLE -D USE_LOG_DEBUG -D LOG_DEBUG_INC=\"DebugConfiguration.h\" -D USE_PACKET_API -D VIEW_320x240 !pkg-config --libs libulfius --silence-errors || : !pkg-config --libs openssl --silence-errors || : !pkg-config --cflags --libs libbsd-overlay --silence-errors || : build_src_filter = ${env:native-tft.build_src_filter} [env:coverage] extends = env:native build_flags = -lgcov --coverage -fprofile-abs-path -fsanitize=address ${env:native.build_flags} ; https://docs.platformio.org/en/latest/projectconf/sections/env/options/test/test_testing_command.html test_testing_command = ${platformio.build_dir}/${this.__env__}/meshtasticd -s ; --------------------------------------------------------------------------- ; Native build for macOS (Darwin / arm64 + x86_64). Headless meshtasticd that ; runs in SimRadio mode (`-s`) or against real LoRa hardware via a CH341 ; USB-SPI bridge. No BlueZ, libgpiod, or Linux I2C — those require Linux. ; ; Prerequisites (Homebrew): ; brew install platformio yaml-cpp libuv openssl@3 libusb argp-standalone pkg-config ; ; The macOS-side patches now live upstream: ; * meshtastic/platform-native — `String.h`-shadow shim, `-Wno-enum-constexpr-conversion`, ; empty-variant-dir guard. Pulled via `portduino_base.platform` zip pin. ; * meshtastic/framework-portduino — LinuxHardwareI2C macOS stubs, AsyncUDP ; SOCK_NONBLOCK fallback, Common.h __APPLE__ guard, WiFiServer.cpp extern-C ; fix, package.json URL refresh. Pulled by platform-native at its pinned commit. ; This env therefore only carries the firmware-side build flags and src filter. ; --------------------------------------------------------------------------- [env:native-macos] extends = native_base ; Apple's ld doesn't accept GNU ld's `-Wl,-Map,` syntax (inherited from ; the top-level platformio.ini). Strip it; the linker map isn't useful for ; the macOS dev loop anyway, and Apple ld's equivalent (`-Wl,-map,`) ; uses different argument shape. build_unflags = -Wl,-Map,"${platformio.build_dir}"/output.map build_flags = ${portduino_base.build_flags_common} -I variants/native/portduino -I/opt/homebrew/include -I/opt/homebrew/opt/argp-standalone/include -I/opt/homebrew/opt/yaml-cpp/include -L/opt/homebrew/lib -L/opt/homebrew/opt/argp-standalone/lib -L/opt/homebrew/opt/yaml-cpp/lib -largp -DPORTDUINO_DARWIN ; Headless build — variants/native/portduino/variant.h would otherwise ; default HAS_SCREEN to 1 and pull in screen-renderer source that uses ; VLA-with-initializer (a GNU/GCC extension Apple Clang rejects). ; MESHTASTIC_EXCLUDE_SCREEN gates the optional `screen->setHeading(...)`- ; style screen-driver hooks scattered through sensor sources. -DHAS_SCREEN=0 -DMESHTASTIC_EXCLUDE_SCREEN=1 !pkg-config --libs openssl --silence-errors || : ; src/input/Linux*.{cpp,h} drive evdev (``) which doesn't exist ; on macOS. graphics/Panel_sdl.* and graphics/TFTDisplay.cpp pull LovyanGFX ; (which we lib_ignore on macOS for the issue). Neither is needed ; for the headless build. build_src_filter = ${native_base.build_src_filter} - - - - ; LovyanGFX includes (Linux-only) and is only needed by TFT ; variants — not relevant for the headless macOS build. lib_ignore = ${portduino_base.lib_ignore} LovyanGFX