Skip to main content

Python generator guide

The nobro-rtos Python package turns a small JSON workload into the C and assembly boundary used by compact byte-addressed targets. It also parses supported linker reports so a firmware build can fail when its program or data budget is exceeded.

Install

python -m pip install nobro_rtos

The distribution preserves both import nobro_rtos and the compact nobro_core module. It installs the equivalent nobro and nobro-core commands. For a checked-out release, run python tools/nobro_core.py.

Generate an application

Start from ports/byte/examples/useful/app.json:

{
  "schema": "nobro-rtos-core-byte-v1",
  "tick_unit_us": 1000,
  "program_capacity_bytes": 2048,
  "application_reserve_bytes": 1024,
  "mailbox_capacity": 2,
  "idle_hook": true,
  "watchdog_hook": true,
  "tasks": [
    {
      "name": "sensor",
      "period_ticks": 10,
      "dispatch_deadline_ticks": 3,
      "budget_ticks": 1
    }
  ]
}

Generate the fixed configuration and receipt:

nobro-core app.json --out generated

Unknown fields, invalid identifiers, impossible utilization/response bounds, ambiguous wrap intervals, and capacity violations fail closed. Output includes the normalized contract digest, fixed ABI/configuration, task bridge, assembly symbols, and a machine-readable receipt.

Python API

from pathlib import Path
from nobro_rtos import generate

receipt = generate(Path("app.json"), Path("generated"))
print(receipt["kernel_data_bytes"])

Gate a linked image

nobro-core --map firmware.mem --format sdcc-mem \
  --program-limit 1024 --data-limit 32

Supported report formats include SDCC MCS-51/STM8, IAR 8051, Keil C51, GNU size, and MPLAB XC8/XC16 forms. Format selection is explicit; the tool does not guess a compiler from local filenames.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nobro_rtos-1.0.1.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nobro_rtos-1.0.1-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file nobro_rtos-1.0.1.tar.gz.

File metadata

  • Download URL: nobro_rtos-1.0.1.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for nobro_rtos-1.0.1.tar.gz
Algorithm Hash digest
SHA256 169acd5e22001e544122e90244a67e60016f15dc49335fe2c258891ac41b7380
MD5 7c919687938db0bc3b9ac64639d4e933
BLAKE2b-256 b1c928f0fb0d613dcbd1c3e55f235f817b98022665af0c9b360c1b0055ec810b

See more details on using hashes here.

File details

Details for the file nobro_rtos-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: nobro_rtos-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for nobro_rtos-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5dc44283928e72a9a375dcbc6235f72a73c436e7ccc45fff1b8607d6682d9419
MD5 94be9e163e556fde23f32581604a4bbf
BLAKE2b-256 8f70434b8e94402f7334c6762755922ba9404a7e17297b6aea3771fce56ad6ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page