# Quick Start Guide

## What You Will Accomplish

This page helps you complete one verified end-to-end flow in the shortest possible time:

1. Download the SDK source code
1. Select a board configuration and build an image
1. Flash the image to the development board
1. Log in via serial port and run the first sample

For full documentation, refer to the User Guide:

- [How to Build Firmware](./userguide/how_to_build.md)
- [How to Flash Firmware](./userguide/how_to_flash.md)
- [How to Run Sample Programs](./userguide/how_to_run_samples.md)

## Prerequisites

- Host OS: Ubuntu 20.04 x86_64 (recommended)
- Development board, serial cable, and USB cable (or SD card reader) connected
- Network access (for `repo sync` and toolchain download)

## 15-Minute Quick Start

### Download the Source Code

```bash
mkdir -p ~/rtos_k230 && cd ~/rtos_k230
repo init -u git@gitee.com:canmv-k230/manifest.git --repo-url=git@gitee.com:canmv-k230/git-repo.git
repo sync -j $(nproc)
```

### Download the Toolchain (First Time Only)

```bash
make dl_toolchain
```

### Select a Board Configuration

```bash
# List available configurations
make list-def

# Example: 01Studio
make k230_rtos_01studio_defconfig
```

If your board only has a `k230_canmv_*_defconfig`, you can select it first and then use `menuconfig` to disable CanMV and enable RTOS capabilities. See the section "Building an RTOS image when only a CanMV defconfig is available" in [How to Build Firmware](./userguide/how_to_build.md).

### Build the Image

```bash
time make log
```

Build output is typically located at:

```text
output/<defconfig>/images/
```

Common files:

- `*.kdimg`: recommended for K230BurningTool (USB)
- `*.img`: commonly used for SD card flashing or command-line flashing

### Flash and Boot

It is recommended to flash `*.kdimg` using K230BurningTool first. See [How to Flash Firmware](./userguide/how_to_flash.md) for steps.

After booting, connect to the board using a serial terminal (common baud rate: 115200) to access the RT-Smart shell.

### Run the First Sample

```bash
cd /sdcard/app/examples
find . -name "*.elf" | head
./integrated_poc/smart_ipc.elf
```

If the sample path differs, use the output of `find` as the reference.

## Common Entry Points

- Add or modify an application: [`userguide/helloworld.md`](./userguide/helloworld.md)
- View supported sensors and how to enable them: [`userguide/sensor_list.md`](./userguide/sensor_list.md)
- Application development guide: [`app_develop_guide/index.md`](./app_develop_guide/index.md)
- API reference: [`api_reference/index.md`](./api_reference/index.md)

## Recommended Next Steps

1. Run a ready-made sample first to verify that the toolchain, flashing, and serial link all work.
1. Then enable or trim the samples and application switches you need.
1. Finally, lock in a unified defconfig for your team to avoid configuration drift.
