mirror of
https://github.com/meshtastic/firmware.git
synced 2026-10-06 05:02:07 -04:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
83 lines
4.0 KiB
INI
83 lines
4.0 KiB
INI
[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@11.0.0
|
|
extends = arduino_base
|
|
platform_packages =
|
|
; our custom Git version with C++17 support in platform.txt
|
|
# renovate: datasource=git-refs depName=meshtastic/Adafruit_nRF52_Arduino packageName=https://github.com/meshtastic/Adafruit_nRF52_Arduino gitBranch=master
|
|
platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#0fd295f13203e93df19d578073646ec32f2bf45a
|
|
; Don't renovate toolchain-gccarmnoneeabi
|
|
platformio/toolchain-gccarmnoneeabi@1.90301.200702
|
|
|
|
extra_scripts =
|
|
${env.extra_scripts}
|
|
extra_scripts/nrf52_extra.py
|
|
pre:extra_scripts/nrf52_lto.py
|
|
extra_scripts/nrf52_warm_region.py ; post-link guard: image must end below the 12 KB warm-store raw-flash region at 0xEA000-0xED000
|
|
|
|
build_type = release
|
|
build_flags =
|
|
-include variants/nrf52840/cpp_overrides/lfs_util.h
|
|
${arduino_base.build_flags}
|
|
-Wno-unused-variable
|
|
-Isrc/platform/nrf52
|
|
; The Arduino loop task runs the entire cooperative OSThread scheduler; the core's stock
|
|
; 4 KB (1024-word) stack overflows during BLE first-sync (admin config-apply -> radio
|
|
; reconfigure with XEdDSA/satmap/log frames stacked) - SWD-proven on T1000-E: SP driven
|
|
; 40 B below pxStack, corrupting adjacent heap -> silent HardFault reset on phone pairing.
|
|
; 2048 words = 8 KB, validated on hardware. Value is in WORDS; requires the #ifndef guard
|
|
; from meshtastic/Adafruit_nRF52_Arduino#7 (harmless redefinition warning until it merges).
|
|
-DLOOP_STACK_SZ=2048
|
|
; The Bluefruit BLE task runs the ENTIRE phone-API chain inline (toRadioWriteCb ->
|
|
; handleToRadio -> admin set-config -> radio reconfigure -> LittleFS save): its stock
|
|
; 5 KB (1280-word) stack overflows during pairing/first-sync, resetting mid-flash-write
|
|
; and tearing LittleFS (auto-format -> total config/key wipe, critical fault #13).
|
|
; Reproduced on Wio Tracker L1 @ develop 6908d27. Same rationale as LOOP_STACK_SZ above;
|
|
; bluefruit.cpp's #ifndef guard makes the -D take effect without a framework patch.
|
|
-DCFG_BLE_TASK_STACKSIZE=2048
|
|
-DLFS_NO_ASSERT ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818
|
|
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
|
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
|
-DMESHTASTIC_EXCLUDE_PKT_HISTORY_HASH=1 ; drop PacketHistory's 1 KB hash index; O(n) over ~240 records is negligible at LoRa packet rates
|
|
-DOLEDDISPLAY_REDUCE_MEMORY ; drop the ThingPulse OLED back buffer (~1 KB); TFT variants must -U this (TFTDisplay.cpp needs buffer_back)
|
|
-D__ASSERT_FUNC=\"\" ; keep __PRETTY_FUNCTION__ strings out of assert(); file:line still identifies the site
|
|
; Only the CDC USB class is used; drop the other TinyUSB class drivers and their buffers
|
|
-DCFG_TUD_MSC=0
|
|
-DCFG_TUD_HID=0
|
|
-DCFG_TUD_MIDI=0
|
|
-DCFG_TUD_VENDOR=0
|
|
-DCFG_TUD_VIDEO=0
|
|
-DCFG_TUD_VIDEO_STREAMING=0
|
|
-DCRYPTO_AES_NO_DECRYPT ; CTR and CCM only encrypt; drops the AES inverse tables (meshtastic/Crypto#5)
|
|
-Os
|
|
-std=gnu++17
|
|
-flto ; whole-image LTO (~-60KB) on every nrf52840 target; nrf52_lto.py (pre: extra_script) keeps the interrupt handlers out of LTO so they survive
|
|
-fmerge-all-constants ; fold identical constants image-wide (~0.7KB; same flag stm32 uses)
|
|
build_unflags =
|
|
-Ofast
|
|
-Og
|
|
-ggdb3
|
|
-ggdb2
|
|
-g3
|
|
-g2
|
|
-g
|
|
-g1
|
|
-g0
|
|
-std=c++11
|
|
-std=gnu++11
|
|
|
|
build_src_filter =
|
|
${arduino_base.build_src_filter} +<platform/nrf52/> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<mesh/raspihttp> -<serialization/>
|
|
|
|
lib_deps=
|
|
${arduino_base.lib_deps}
|
|
${radiolib_base.lib_deps}
|
|
# renovate: datasource=git-refs depName=meshtastic/Crypto packageName=https://github.com/meshtastic/Crypto gitBranch=main
|
|
https://github.com/meshtastic/Crypto/archive/1c817c2f27aa4593e07d0f7e13b3dbf8d980bcae.zip
|
|
|
|
lib_ignore =
|
|
BluetoothOTA
|
|
lvgl
|