[nrf52_base]
; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files
platform =
  # renovate: datasource=custom.pio depName=platformio/nordicnrf52 packageName=platformio/platform/nordicnrf52
  platformio/nordicnrf52@10.10.0
extends = arduino_base
platform_packages =
  ; our custom Git version until they merge our PR
  # TODO renovate
  platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#c770c8a16a351b55b86e347a3d9d7b74ad0bbf39
  ; Don't renovate toolchain-gccarmnoneeabi
  platformio/toolchain-gccarmnoneeabi@~1.90301.0

extra_scripts =
  ${env.extra_scripts}
  extra_scripts/nrf52_extra.py

build_type = release
build_flags =
  -include variants/nrf52840/cpp_overrides/lfs_util.h
  ${arduino_base.build_flags}
  -Wno-unused-variable
  -Isrc/platform/nrf52
  -DLFS_NO_ASSERT                      ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818
  -DMESHTASTIC_EXCLUDE_AUDIO=1
  -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
  -Os
build_unflags =
  -Ofast
  -Og
  -ggdb3
  -ggdb2
  -g3
  -g2
  -g
  -g1
  -g0

build_src_filter = 
  ${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp> -<serialization/>

lib_deps=
  ${arduino_base.lib_deps}
  ${radiolib_base.lib_deps}
  # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
  rweather/Crypto@0.4.0

lib_ignore =
  BluetoothOTA
  lvgl
