Three things that caught us moving to Zephyr 4.5
This week the OGLAS firmware moved from Zephyr 4.4 to 4.5. That covers sensors, repeaters, the hub and a handheld, on nRF52840, ESP32-S3, ESP32-C3 and ESP32-C6. Most of the work was renamed Kconfig options and changed function signatures, and the build errors named each one. Two of the three below compiled without complaint and only showed up on the bench.
The ring buffer option changed meaning
In 4.4, CONFIG_RING_BUFFER=y turned the ring buffer on. In 4.5 the ring
buffer is always built, and the option brings back the old claim and finish
API, which is deprecated. A plain west build prints a warning, and twister
stops the build. Take the line out of prj.conf unless your code calls
ring_buf_put_claim() or its relatives.
The RAK4631 console moved
The rak4631 board was reworked into the bare RAK4630 module, and it now
brings its own USB console, board_cdc_acm_uart. Under 4.4 the board had
no USB console, so our apps added a CDC ACM port of their own and pointed
the console at it. Under 4.5 that second port is never registered with USB.
The board enumerates, Linux creates a ttyACM, and nothing ever appears on
it. It built without a warning.
The fix is to delete your own console node and let the board’s port carry
the console. A board already flashed with the broken image cannot reach
dfu uf2 from its shell, so double-tap RESET to get the UF2 drive back. The
LEDs moved as well, into the rakwireless_rak19007 base-board shield, so a
bare rak4631 build no longer has led0.
The ESP32-S3 battery ADC
Zephyr’s ESP32-S3 devicetree calls ADC unit 1 adc0 and unit 2 adc1. Our
overlays read the battery through &adc1 0, meaning to use unit 1 channel
0 on GPIO1. They were reading unit 2 channel 0, which is GPIO11. On the
Heltec LoRa boards GPIO11 is the radio’s MISO line. In August I traced a
radio that stopped hearing replies to the ADC driver disconnecting that pin
when it set the channel up.
Zephyr 4.5 moves the in-tree Heltec boards to &adc0 and no longer enables
adc1, so our builds stopped with an undeclared __device_dts_ord_ symbol
in the battery code instead of quietly sampling the wrong pin. With every
overlay on &adc0 0, a Wireless Tracker on the bench reads its battery at
4.2 V. If an S3 board of yours has &adc1 near a battery divider, check
which GPIO that really is.