Configuration

Configure the OnMCU controller, upload chunks, retries, and run timeout.

The CLI works without a configuration file. By default it connects to https://ctrl1.onmcu.com, uploads in 5 MiB chunks, retries each failed chunk three times, and limits a run to 600 seconds.

Create a TOML file only when you need to change those defaults:

onmcu.toml
# Base URL of the OnMCU controller.
server = "https://ctrl1.onmcu.com"

# Upload chunk size in MiB. Maximum: 10.
chunk_size = 5

# Retries per failed chunk.
retries = 3

# Job runtime in seconds. Accepted range: 59-86400.
timeout_seconds = 600

Every key is optional. Omit a key to keep its default, so this is valid:

onmcu.toml
timeout_seconds = 1200

The CLI rejects unknown or misspelled keys.

Select the file

Pass the global option before the subcommand:

onmcu --config ./onmcu.toml run --board NUCLEO-H743ZI --file firmware.elf

Or set the path once in the environment:

export ONMCU_CLI_CONFIG_PATH="$PWD/onmcu.toml"
onmcu list-boards
$env:ONMCU_CLI_CONFIG_PATH = "$PWD/onmcu.toml"
onmcu list-boards

--config overrides ONMCU_CLI_CONFIG_PATH.

Override the timeout for one run

The run command's --timeout value overrides timeout_seconds from the selected file:

onmcu --config ./onmcu.toml run \
  --timeout 900 \
  --board NUCLEO-H743ZI \
  --file firmware.elf

Do not put credentials here

The config schema has no API-key field. Use the OS keyring or ONMCU_API_KEY as described under Authentication.

On this page