diff --git a/platformio.ini b/platformio.ini index a8940879..4ee70850 100644 --- a/platformio.ini +++ b/platformio.ini @@ -25,7 +25,7 @@ default_envs = linux # nrf52840dk-geeksville # linux # or if you'd like to chang ; note: we add src to our include search path so that lmic_project_config can override ; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc -build_flags = -Wno-missing-field-initializers -Isrc -Isrc/mesh -Isrc/gps -Ilib/nanopb/include -Os -Wl,-Map,.pio/build/output.map +build_flags = -Wno-missing-field-initializers -Isrc -Isrc/mesh -Isrc/gps -Ilib/nanopb/include -Wl,-Map,.pio/build/output.map -DHW_VERSION_${sysenv.COUNTRY} -DAPP_VERSION=${sysenv.APP_VERSION} -DHW_VERSION=${sysenv.HW_VERSION} @@ -64,7 +64,7 @@ lib_deps = Wire ; explicitly needed here because the AXP202 library forgets to add it SPI -; Common settings for Ardino targets +; Common settings for conventional (non Portduino) Ardino targets [arduino_base] framework = arduino @@ -72,6 +72,8 @@ framework = arduino lib_deps = ${env.lib_deps} +build_flags = ${env.build_flags} -Os + ; Common settings for ESP targes, mixin with extends = esp32_base [esp32_base] extends = arduino_base @@ -81,7 +83,7 @@ src_filter = upload_speed = 921600 debug_init_break = tbreak setup build_flags = - ${env.build_flags} -Wall -Wextra -Isrc/esp32 -Isrc/esp32-mfix-esp32-psram-cache-issue -lnimble -std=c++11 + ${arduino_base.build_flags} -Wall -Wextra -Isrc/esp32 -Isrc/esp32-mfix-esp32-psram-cache-issue -lnimble -std=c++11 -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -DAXP_DEBUG_PORT=Serial # Hmm - this doesn't work yet @@ -149,7 +151,7 @@ build_flags = platform = https://github.com/HelTecAutomation/platform-asrmicro650x.git ; we use top-of-tree because stable version has too many bugs - asrmicro650x board = cubecell_board_plus ; FIXME, bug in cubecell arduino - they are supposed to set ARDUINO -build_flags = ${env.build_flags} -DARDUINO=100 -Isrc/cubecell +build_flags = ${arduino_base.build_flags} -DARDUINO=100 -Isrc/cubecell src_filter = ${env.src_filter} - - @@ -163,7 +165,7 @@ debug_tool = jlink build_type = debug ; I'm debugging with ICE a lot now ; note: liboberon provides the AES256 implementation for NRF52 (though not using the hardware acceleration of the NRF52840 - FIXME) build_flags = - ${env.build_flags} -Wno-unused-variable + ${arduino_base.build_flags} -Wno-unused-variable -Isrc/nrf52 -Isdk-nrfxlib/crypto/nrf_oberon/include -Lsdk-nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/ -lliboberon_3.0.3 ;-DCFG_DEBUG=3 @@ -249,6 +251,6 @@ lib_deps = [env:linux] platform = https://github.com/geeksville/platform-portduino.git src_filter = ${env.src_filter} - - - -build_flags = ${env.build_flags} +build_flags = ${arduino_base.build_flags} framework = arduino board = linux_x86_64