Files
MeshCore-Evo/variants/ikoka_stick_nrf/platformio.ini
kelsey hudson bed311313a Adding support for Ikoka Stick with Seeed Xiao nRF54 baseboard.
Adds a new variant 'ikoka_stick_nrf' and associated support files. This is
based on the Xiao nRF54 code with pin numbers and functions changed to suit the
differences in hardware between the WIO SX1262 board and the Ikoka Stick.

Sets the default LoRa transmit power to 9dBm to avoid burning up the frontend
in Ikoka Sticks equipped with the Ebyte 33dBm S22 module on first boot.

Adds support for an SSD1306 display connected to the display header. Note the
display pinout is the same as the RAK4631 display header so make sure to use a
display wired accordingly (aliexpress etc. SSD1306s typically have Vcc & GND
reversed from what this board expects).

Adds support for display rotation to SSD1306Display via a platformIO define.
This support was added following the same paradigms found elsewhere in the code
for rotating a display.
2025-08-10 10:44:00 -07:00

134 lines
3.6 KiB
INI

[nrf52840_xiao]
extends = nrf52_base
platform_packages =
toolchain-gccarmnoneeabi@~1.100301.0
framework-arduinoadafruitnrf52
board = seeed-xiao-afruitnrf52-nrf52840
board_build.ldscript = boards/nrf52840_s140_v7.ld
build_flags = ${nrf52_base.build_flags}
-D NRF52_PLATFORM -D XIAO_NRF52
-I lib/nrf52/s140_nrf52_7.3.0_API/include
-I lib/nrf52/s140_nrf52_7.3.0_API/include/nrf52
lib_ignore =
BluetoothOTA
lvgl
lib5b4
lib_deps =
${nrf52_base.lib_deps}
rweather/Crypto @ ^0.4.0
adafruit/Adafruit INA3221 Library @ ^1.0.1
adafruit/Adafruit INA219 @ ^1.2.3
adafruit/Adafruit AHTX0 @ ^2.0.5
adafruit/Adafruit BME280 Library @ ^2.3.0
adafruit/Adafruit SSD1306 @ ^2.5.13
[ikoka_stick_nrf]
extends = nrf52840_xiao
;board_build.ldscript = boards/nrf52840_s140_v7.ld
build_flags = ${nrf52840_xiao.build_flags}
-D P_LORA_TX_LED=11
-I variants/ikoka_stick_nrf
-I src/helpers/nrf52
-D DISPLAY_CLASS=SSD1306Display
-D DISPLAY_ROTATION=2
-D RADIO_CLASS=CustomSX1262
-D WRAPPER_CLASS=CustomSX1262Wrapper
-D LORA_TX_POWER=9
-D P_LORA_DIO_1=D1
-D P_LORA_RESET=D2
-D P_LORA_BUSY=D3
-D P_LORA_NSS=D4
-D SX126X_RXEN=D5
-D SX126X_TXEN=RADIOLIB_NC
-D SX126X_DIO2_AS_RF_SWITCH=1
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=1
-D PIN_USER_BTN=0
-D PIN_WIRE_SCL=7
-D PIN_WIRE_SDA=6
-D ENV_INCLUDE_AHTX0=1
-D ENV_INCLUDE_BME280=1
-D ENV_INCLUDE_INA3221=1
-D ENV_INCLUDE_INA219=1
build_src_filter = ${nrf52840_xiao.build_src_filter}
+<helpers/*.cpp>
+<helpers/sensors>
+<helpers/ui/SSD1306Display.cpp>
+<../variants/ikoka_stick_nrf>
debug_tool = jlink
upload_protocol = nrfutil
[env:ikoka_stick_nrf_companion_radio_ble]
extends = ikoka_stick_nrf
build_flags =
${ikoka_stick_nrf.build_flags}
-D MAX_CONTACTS=100
-D MAX_GROUP_CHANNELS=8
-D BLE_PIN_CODE=123456
-D OFFLINE_QUEUE_SIZE=256
; -D BLE_DEBUG_LOGGING=1
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${ikoka_stick_nrf.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<../examples/companion_radio>
lib_deps =
${ikoka_stick_nrf.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:ikoka_stick_nrf_companion_radio_usb]
extends = ikoka_stick_nrf
build_flags =
${ikoka_stick_nrf.build_flags}
-D MAX_CONTACTS=100
-D MAX_GROUP_CHANNELS=8
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${ikoka_stick_nrf.build_src_filter}
+<helpers/nrf52/SerialBLEInterface.cpp>
+<../examples/companion_radio>
lib_deps =
${ikoka_stick_nrf.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:ikoka_stick_nrf_alt_pinout_companion_radio_ble]
extends = env:ikoka_stick_nrf_companion_radio_ble
build_flags =
${env:ikoka_stick_nrf_companion_radio_ble.build_flags}
-D SX1262_XIAO_S3_VARIANT
[env:ikoka_stick_nrf_repeater]
extends = ikoka_stick_nrf
build_flags =
${ikoka_stick_nrf.build_flags}
-D ADVERT_NAME='"Ikoka Stick Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=8
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${ikoka_stick_nrf.build_src_filter}
+<../examples/simple_repeater/main.cpp>
[env:ikoka_stick_nrf_alt_pinout_repeater]
extends = env:ikoka_stick_nrf_repeater
build_flags =
${env:ikoka_stick_nrf_repeater.build_flags}
-D SX1262_XIAO_S3_VARIANT
[env:ikoka_stick_nrf_room_server]
extends = ikoka_stick_nrf
build_flags =
${ikoka_stick_nrf.build_flags}
-D ADVERT_NAME='"Ikoka Stick Room"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
build_src_filter = ${ikoka_stick_nrf.build_src_filter}
+<../examples/simple_room_server/main.cpp>