mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-01 10:21:59 +00:00
One nRF52840 variant shared across both radios, picked per env: Duo runs the LR1121, Uno the SX1262. Same PCB, only the radio and its DIO1 pin change. SuperIO adds the SH1107 OLED, GPS, buzzer and joystick. GPS is driven by the 3-position mode switch (Mode 2 = on), polled live the way thinknode_m1 does it. Five quick user-button presses power the unit off; a press wakes it back on (arms the button as an nRF52 GPIO SENSE source before SYSTEMOFF). Consolidates #2054 and andyshinn's shared-base/uno work, rebased on dev. Co-authored-by: lbibass <ewdries02@gmail.com> Co-authored-by: Andy Shinn <andys@andyshinn.as>
327 lines
11 KiB
INI
327 lines
11 KiB
INI
; ============================================================================
|
|
; Muzi Base (MuziWorks)
|
|
;
|
|
; One nRF52840 board, shipped in two radio flavors. The radio is selected per
|
|
; environment; all board logic lives in variants/muzi_base and is shared:
|
|
; muzi_base_duo_* -> LR1121 (USE_LR1121)
|
|
; muzi_base_uno_* -> SX1262 (USE_SX1262)
|
|
; ============================================================================
|
|
|
|
[muzi_base_common]
|
|
extends = nrf52_base
|
|
board = muzi_base
|
|
board_build.ldscript = boards/nrf52840_s140_v6.ld
|
|
build_flags = ${nrf52_base.build_flags}
|
|
-I src/helpers/nrf52
|
|
-I lib/nrf52/s140_nrf52_6.1.1_API/include
|
|
-I lib/nrf52/s140_nrf52_6.1.1_API/include/nrf52
|
|
-I variants/muzi_base
|
|
-I src/helpers/ui
|
|
-D muzi_base
|
|
-D NRF52_POWER_MANAGEMENT
|
|
-D PIN_USER_BTN=PIN_BUTTON1
|
|
-D USER_BTN_PRESSED=LOW
|
|
-D PIN_STATUS_LED=35
|
|
-D LORA_TX_POWER=22
|
|
-D P_LORA_BUSY=LORA_BUSY
|
|
-D P_LORA_SCLK=LORA_SCLK
|
|
-D P_LORA_NSS=LORA_NSS
|
|
-D P_LORA_DIO_1=LORA_DIO_1
|
|
-D P_LORA_MISO=LORA_MISO
|
|
-D P_LORA_MOSI=LORA_MOSI
|
|
-D P_LORA_RESET=LORA_RESET
|
|
-D QSPIFLASH=1
|
|
build_src_filter = ${nrf52_base.build_src_filter}
|
|
+<helpers/*.cpp>
|
|
+<helpers/sensors>
|
|
+<../variants/muzi_base>
|
|
debug_tool = jlink
|
|
upload_protocol = nrfutil
|
|
lib_deps =
|
|
${nrf52_base.lib_deps}
|
|
${sensor_base.lib_deps}
|
|
|
|
; ---------------------------------------------------------------------------
|
|
; Radio selection (Duo = LR1121, Uno = SX1262). The matching radio pins / TCXO
|
|
; / RF-switch defines are picked up in variant.h via USE_LR1121 / USE_SX1262.
|
|
; ---------------------------------------------------------------------------
|
|
[muzi_base_duo]
|
|
extends = muzi_base_common
|
|
build_flags = ${muzi_base_common.build_flags}
|
|
-D USE_LR1121
|
|
-D RADIO_CLASS=CustomLR1121
|
|
-D WRAPPER_CLASS=CustomLR1121Wrapper
|
|
-D RF_SWITCH_TABLE
|
|
-D RX_BOOSTED_GAIN=true
|
|
-D LR11X0_DIO_AS_RF_SWITCH=true
|
|
-D LR11X0_DIO3_TCXO_VOLTAGE=3.0
|
|
|
|
[muzi_base_uno]
|
|
extends = muzi_base_common
|
|
build_flags = ${muzi_base_common.build_flags}
|
|
-D USE_SX1262
|
|
-D RADIO_CLASS=CustomSX1262
|
|
-D WRAPPER_CLASS=CustomSX1262Wrapper
|
|
-D SX126X_RX_BOOSTED_GAIN=1
|
|
-D SX126X_CURRENT_LIMIT=140
|
|
-D SX126X_DIO2_AS_RF_SWITCH=1
|
|
-D SX126X_DIO3_TCXO_VOLTAGE=3.3
|
|
|
|
; ===========================================================================
|
|
; Duo (LR1121) environments
|
|
; ===========================================================================
|
|
[env:muzi_base_duo_repeater]
|
|
extends = muzi_base_duo
|
|
build_flags = ${muzi_base_duo.build_flags}
|
|
-I examples/companion_radio/ui-new
|
|
-D ADVERT_NAME='"Muzi Base Repeater"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D MAX_NEIGHBOURS=50
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${muzi_base_duo.build_src_filter}
|
|
+<../examples/simple_repeater>
|
|
lib_deps = ${muzi_base_duo.lib_deps}
|
|
|
|
[env:muzi_base_duo_room_server]
|
|
extends = muzi_base_duo
|
|
build_flags = ${muzi_base_duo.build_flags}
|
|
-I examples/companion_radio/ui-new
|
|
-D ADVERT_NAME='"Muzi Base Room"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D ROOM_PASSWORD='"hello"'
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${muzi_base_duo.build_src_filter}
|
|
+<../examples/simple_room_server>
|
|
lib_deps = ${muzi_base_duo.lib_deps}
|
|
|
|
[env:muzi_base_duo_companion_radio_usb]
|
|
extends = muzi_base_duo
|
|
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags = ${muzi_base_duo.build_flags}
|
|
-I examples/companion_radio/ui-new
|
|
-D MAX_CONTACTS=500 ;can increase number of contacts since we have a ton of extra flash.
|
|
-D MAX_GROUP_CHANNELS=40
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
-D DISPLAY_CLASS=NullDisplayDriver
|
|
build_src_filter = ${muzi_base_duo.build_src_filter}
|
|
+<helpers/ui/NullDisplayDriver.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-new/*.cpp>
|
|
lib_deps = ${muzi_base_duo.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:muzi_base_duo_companion_radio_ble]
|
|
extends = muzi_base_duo
|
|
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags = ${muzi_base_duo.build_flags}
|
|
-I examples/companion_radio/ui-new
|
|
-D MAX_CONTACTS=500 ;can increase number of contacts since we have a ton of extra flash.
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D BLE_PIN_CODE=123456
|
|
-D BLE_TX_POWER=0
|
|
-D QSPIFLASH=1
|
|
; -D BLE_DEBUG_LOGGING=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
-D DISPLAY_CLASS=NullDisplayDriver
|
|
; -D ADVERT_NAME='"@@MAC"'
|
|
build_src_filter = ${muzi_base_duo.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<helpers/sensors>
|
|
+<helpers/ui/NullDisplayDriver.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-new/*.cpp>
|
|
lib_deps = ${muzi_base_duo.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[muzi_base_duo_superIO]
|
|
extends = muzi_base_duo
|
|
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags = ${muzi_base_duo.build_flags}
|
|
-D muzi_base_superIO
|
|
-D UI_HAS_JOYSTICK=1
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
-D DISPLAY_CLASS=SH1107Display
|
|
-D DISPLAY_ROTATION=2
|
|
-D ENV_INCLUDE_GPS=1
|
|
-D ENV_SKIP_GPS_DETECT
|
|
-D PIN_BUZZER=22
|
|
build_src_filter = ${muzi_base_duo.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<helpers/sensors>
|
|
+<helpers/ui/SH1107Display.cpp>
|
|
+<helpers/ui/buzzer.cpp>
|
|
+<helpers/ui/MomentaryButton.cpp>
|
|
lib_deps = ${muzi_base_duo.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
stevemarple/MicroNMEA @ ^2.0.6
|
|
end2endzone/NonBlockingRTTTL@^1.3.0
|
|
adafruit/Adafruit SH110X@^2.1.14
|
|
artronshop/ArtronShop_RX8130CE@1.0.0
|
|
adafruit/Adafruit GFX Library @ ^1.12.1
|
|
debug_tool = jlink
|
|
upload_protocol = nrfutil
|
|
|
|
[env:muzi_base_duo_companion_radio_ble_superIO]
|
|
extends = muzi_base_duo_superIO
|
|
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags = ${muzi_base_duo_superIO.build_flags}
|
|
-D MAX_CONTACTS=500 ; can increase number of contacts since we have a ton of extra flash.
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-I examples/companion_radio/ui-new
|
|
-D BLE_PIN_CODE=123456
|
|
-D BLE_TX_POWER=0
|
|
-D QSPIFLASH=1
|
|
; -D BLE_DEBUG_LOGGING=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
build_src_filter = ${muzi_base_duo_superIO.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-new/*.cpp>
|
|
lib_deps =
|
|
${muzi_base_duo_superIO.lib_deps}
|
|
|
|
; ===========================================================================
|
|
; Uno (SX1262) environments
|
|
; ===========================================================================
|
|
[env:muzi_base_uno_repeater]
|
|
extends = muzi_base_uno
|
|
build_flags = ${muzi_base_uno.build_flags}
|
|
-I examples/companion_radio/ui-new
|
|
-D ADVERT_NAME='"Muzi Base Repeater"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D MAX_NEIGHBOURS=50
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${muzi_base_uno.build_src_filter}
|
|
+<../examples/simple_repeater>
|
|
lib_deps = ${muzi_base_uno.lib_deps}
|
|
|
|
[env:muzi_base_uno_room_server]
|
|
extends = muzi_base_uno
|
|
build_flags = ${muzi_base_uno.build_flags}
|
|
-I examples/companion_radio/ui-new
|
|
-D ADVERT_NAME='"Muzi Base Room"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D ROOM_PASSWORD='"hello"'
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${muzi_base_uno.build_src_filter}
|
|
+<../examples/simple_room_server>
|
|
lib_deps = ${muzi_base_uno.lib_deps}
|
|
|
|
[env:muzi_base_uno_companion_radio_usb]
|
|
extends = muzi_base_uno
|
|
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags = ${muzi_base_uno.build_flags}
|
|
-I examples/companion_radio/ui-new
|
|
-D MAX_CONTACTS=500 ;can increase number of contacts since we have a ton of extra flash.
|
|
-D MAX_GROUP_CHANNELS=40
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
-D DISPLAY_CLASS=NullDisplayDriver
|
|
build_src_filter = ${muzi_base_uno.build_src_filter}
|
|
+<helpers/ui/NullDisplayDriver.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-new/*.cpp>
|
|
lib_deps = ${muzi_base_uno.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:muzi_base_uno_companion_radio_ble]
|
|
extends = muzi_base_uno
|
|
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags = ${muzi_base_uno.build_flags}
|
|
-I examples/companion_radio/ui-new
|
|
-D MAX_CONTACTS=500 ;can increase number of contacts since we have a ton of extra flash.
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D BLE_PIN_CODE=123456
|
|
-D BLE_TX_POWER=0
|
|
-D QSPIFLASH=1
|
|
; -D BLE_DEBUG_LOGGING=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
-D DISPLAY_CLASS=NullDisplayDriver
|
|
; -D ADVERT_NAME='"@@MAC"'
|
|
build_src_filter = ${muzi_base_uno.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<helpers/sensors>
|
|
+<helpers/ui/NullDisplayDriver.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-new/*.cpp>
|
|
lib_deps = ${muzi_base_uno.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[muzi_base_uno_superIO]
|
|
extends = muzi_base_uno
|
|
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags = ${muzi_base_uno.build_flags}
|
|
-D muzi_base_superIO
|
|
-D UI_HAS_JOYSTICK=1
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
-D DISPLAY_CLASS=SH1107Display
|
|
-D DISPLAY_ROTATION=2
|
|
-D ENV_INCLUDE_GPS=1
|
|
-D ENV_SKIP_GPS_DETECT
|
|
-D PIN_BUZZER=22
|
|
build_src_filter = ${muzi_base_uno.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<helpers/sensors>
|
|
+<helpers/ui/SH1107Display.cpp>
|
|
+<helpers/ui/buzzer.cpp>
|
|
+<helpers/ui/MomentaryButton.cpp>
|
|
lib_deps = ${muzi_base_uno.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
stevemarple/MicroNMEA @ ^2.0.6
|
|
end2endzone/NonBlockingRTTTL@^1.3.0
|
|
adafruit/Adafruit SH110X@^2.1.14
|
|
artronshop/ArtronShop_RX8130CE@1.0.0
|
|
adafruit/Adafruit GFX Library @ ^1.12.1
|
|
debug_tool = jlink
|
|
upload_protocol = nrfutil
|
|
|
|
[env:muzi_base_uno_companion_radio_ble_superIO]
|
|
extends = muzi_base_uno_superIO
|
|
board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags = ${muzi_base_uno_superIO.build_flags}
|
|
-D MAX_CONTACTS=500 ; can increase number of contacts since we have a ton of extra flash.
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-I examples/companion_radio/ui-new
|
|
-D BLE_PIN_CODE=123456
|
|
-D BLE_TX_POWER=0
|
|
-D QSPIFLASH=1
|
|
; -D BLE_DEBUG_LOGGING=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
build_src_filter = ${muzi_base_uno_superIO.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-new/*.cpp>
|
|
lib_deps =
|
|
${muzi_base_uno_superIO.lib_deps}
|