Skip to content

maritime reference

maritime is AVBotz’s firmware for the Raspberry Pi Pico (RP2040), built on Zephyr RTOS.

It interfaces with the eight thrusters ESCs, the servos, the depth sensor, and the kill switch, and communicates with thalassic’s sub_low over USB. The code is at avbotz/maritime.

  1. Setup and build
  2. Firmware
  3. Talking to the board
  4. Hardware

In a terminal (do not clone the repository, the installer does):

Terminal window
curl -sSL https://raw.githubusercontent.com/avbotz/maritime/refs/heads/main/install.sh | bash

Then, in maritime-workspace/maritime:

Terminal window
source ./setup.sh # in every new terminal
west build -b rpi_pico # build for the Raspberry Pi Pico
west flash -r uf2 # flash a board to the Pico's UF2 bootloader
./maritime.py # communicate with the board (type help)
Command Does
west build -b rpi_pico Build
west build -b rpi_pico -- -DEXTRA_CONF_FILE=debug.conf Debug build, which sends logs over USB
west flash -r uf2 Copy the build to a Pico in its UF2 bootloader
./maritime.py bootloader Reboot the board into its UF2 bootloader, ready to flash
./maritime.py monitor Print the board’s state at 5 Hz until Ctrl+C
./format.sh Format C and devicetree, and report checkpatch issues
./format.sh --check Change nothing and fail if anything needs fixing

A thesaurus listing “maritime” as a synonym for “nautical”.

maritime was designed from the ground up to solve many deficiencies with the system before it, Nautical:

  • Limited computing power on the ATmega2560 (clock, flash and RAM, no FPU)
  • Constrained to AVR devices only
  • No threading
  • No robust communication protocol between the microcontroller and the PC

maritime addresses these, and makes further improvements:

  • Switched hardware from the Arduino Mega 2560 to RP2040-based boards
  • Uses Zephyr RTOS, for hardware abstraction and multithreading

Planned:

  • Ethernet or CAN rather than USB between maritime and the PC
  • MAVLink between maritime and the PC
  • Migration to VESC ESCs and CAN