# RK0 NUCLEO-F103RB Demo

This package contains a ready-to-build RK0 demo for the ST NUCLEO-F103RB board.

## Quick Start

Build the board firmware:

```shell
make
```

Flash with the stock ST-LINK probe:

```shell
make flash
```

The firmware is built under `build/nucleof103rb/`:

- `rk0_demo.elf`: debug ELF with symbols for VS Code/Cortex-Debug.
- `rk0_demo.bin`: raw binary flashed at `0x08000000`.
- `rk0_demo.hex`: Intel HEX image.
- `rk0_demo.map`: linker map.

Do not run the ELF from the terminal. It is an ARM Cortex-M image, not a macOS
or Linux executable. Use `make flash` or the VS Code debugger.

## VS Code Debugging

Install the recommended VS Code extensions when prompted, especially
`Cortex-Debug`.

Open the Run and Debug panel, select:

```text
RK0: NUCLEO-F103RB ST-LINK
```

Then press `F5`. VS Code will build the debug ELF, start OpenOCD, load the
firmware to the board, and stop at `main`.

For J-Link/OpenOCD, select:

```text
RK0: NUCLEO-F103RB J-Link
```

## Demo Output

The default application runs the Rendezvous controller demo:

```text
Sense -> Filt -> Ctrl -> Act -> Sense
```

It prints task activity on USART2 at `115200 8N1`, exposed by the board as the
ST-LINK virtual COM port.

## Requirements

- ARM GNU Toolchain: `arm-none-eabi-gcc`, `arm-none-eabi-objcopy`,
  `arm-none-eabi-gdb`.
- OpenOCD.
- VS Code with Cortex-Debug for source-level debugging.

## More Detail

See `docs/nucleo-f103rb-demo.md` for the board-specific notes.

Copyright (C) 2026 Antonio Giacomelli | All Rights Reserved | www.kernel0.org
