Zephyr 4.5 made uart_irq_update() return void, and the receive interrupt used it as its loop condition, so 0.3.0 does not compile on 4.5. It is now called at the top of each pass, as Zephyr's own samples do. From 4.5 the ring buffer is header-only, and CONFIG_RING_BUFFER brings back the deprecated legacy implementation. CONFIG_RB9704 selects it only when KERNELVERSION is below 4.5. The rig bridge reads its ring with ring_buf_peek() and ring_buf_get() in place of the claim API, and gates the option the same way in a Kconfig of its own. Tested on v4.4.0 and v4.5.0: 37 pass and 2 skip against the fake on native_sim, and the sample, rigs and bridges build for every board. Also in this release, from main since 0.3.0: rbtest in the shell sample, rb9704_send_fill, and the Stamp-C3 overnight run. The README has a section on the Zephyr versions; the standalone manifest pins v4.5.0; the Python tools are 0.4.0.
87 lines
2.6 KiB
Plaintext
87 lines
2.6 KiB
Plaintext
# SPDX-License-Identifier: MIT
|
|
# Copyright (c) 2026 Scott Penrose <scottp@dd.com.au>
|
|
|
|
menuconfig RB9704
|
|
bool "RockBLOCK 9704 Iridium modem"
|
|
default y
|
|
depends on DT_HAS_ROCK7_ROCKBLOCK_9704_ENABLED
|
|
depends on SERIAL
|
|
select RING_BUFFER if RB9704_ZEPHYR_BEFORE_4_5
|
|
select UART_INTERRUPT_DRIVEN
|
|
help
|
|
Ground Control's RockBLOCK 9704 (Iridium Certus, IMT messages) on the
|
|
UART its devicetree node sits on. Builds Ground Control's library,
|
|
pinned pristine at modules/lib/rockblock9704, with a Zephyr serial
|
|
port and one worker thread that owns it. <rb9704/rb9704.h> is the API.
|
|
|
|
if RB9704
|
|
|
|
# Zephyr 4.5 made the ring buffer header-only, and CONFIG_RING_BUFFER there
|
|
# brings back the deprecated legacy implementation. Before 4.5 it is what
|
|
# builds the ring buffer at all. KERNELVERSION is 0xMMmmpp00.
|
|
config RB9704_KERNEL_VERSION
|
|
hex
|
|
default "$(KERNELVERSION)"
|
|
|
|
config RB9704_ZEPHYR_BEFORE_4_5
|
|
def_bool RB9704_KERNEL_VERSION < 0x4050000
|
|
|
|
config RB9704_MESSAGE_MAX
|
|
int "Largest message in either direction (bytes)"
|
|
default 2048
|
|
range 16 100000
|
|
help
|
|
The modem takes up to 100 kB, and the library keeps one static buffer
|
|
of this size for messages out and one for messages in, plus one in
|
|
this module for the copy rb9704_send takes. 2 kB is three buffers of
|
|
2 kB; raise it as far as the RAM allows.
|
|
|
|
DT_COMPAT_ROCK7_ROCKBLOCK_9704 := rock7,rockblock-9704
|
|
|
|
config RB9704_POWER
|
|
bool "Drive the power pins from devicetree"
|
|
default y if $(dt_compat_any_has_prop,$(DT_COMPAT_ROCK7_ROCKBLOCK_9704),iridium-enable-gpios)
|
|
select GPIO
|
|
help
|
|
I_EN, I_BTD and P_EN as the devicetree node gives them, in Ground
|
|
Control's start-up and shutdown sequence. I_EN is the one that
|
|
switches the modem; without it the modem is taken to be powered, as
|
|
the board is with the pins left open.
|
|
|
|
config RB9704_WORKER_STACK_SIZE
|
|
int "Worker thread stack size"
|
|
default 8192
|
|
help
|
|
Measured, not guessed: the library parks a 1.5 kB MT segment on the
|
|
stack in rbPoll(), with cJSON's recursion beneath it. A smaller stack
|
|
overflows only when a message arrives, which may be days after the
|
|
change.
|
|
|
|
config RB9704_WORKER_PRIORITY
|
|
int "Worker thread priority"
|
|
default 8
|
|
|
|
config RB9704_RX_RING_SIZE
|
|
int "Serial receive ring (bytes)"
|
|
default 8192
|
|
help
|
|
The library's longest JSPR line is 8 kB.
|
|
|
|
config RB9704_SHELL
|
|
bool "`rb9704` shell command"
|
|
default y
|
|
depends on SHELL
|
|
|
|
config RB9704_UPSTREAM_DIR
|
|
string "Where Ground Control's library is"
|
|
default ""
|
|
help
|
|
Empty: <west topdir>/modules/lib/rockblock9704, where this
|
|
repository's west.yml puts it.
|
|
|
|
module = RB9704
|
|
module-str = rb9704
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
endif # RB9704
|