Skip to content

Releases: foss-for-synopsys-dwc-arc-processors/zephyr

afoliveira-rhx-c1-v1

08 Oct 07:37

Choose a tag to compare

Zephyr: In-Tree west init + Build/Flash (nsim)

This guide shows how to initialize west directly inside an existing Zephyr
repository clone ("in-tree"), then build and flash the hello_world sample for
Synopsys ARC nSIM (nsim_arc_v/rhx100).

If you prefer the standard multi-repo layout (zephyr + modules in a west
workspace), see the official Getting Started docs. This doc focuses on a
single repo with west initialized in-tree.

Prerequisites

Quick Start

  1. Export toolchain and base paths (adjust paths for your system):
cd /path/to/zephyr
export ZEPHYR_SDK_INSTALL_DIR=/path/to/zephyr-sdk-0.17.2
export ZEPHYR_BASE=$(pwd)   # run from the Zephyr repo root
  1. Initialize west in-tree (once):
# From the Zephyr repo root
west init -l .
west update   # optional: pulls/updates modules per west.yml

Notes:

  • west init -l . tells west to use the current directory as the manifest
    (in-tree). It does not move files.
  • If west update is used, it will clone/update additional modules into
    modules/ as specified by west.yml.
  1. Build the hello_world sample for ARC nSIM:
west build -p -b nsim_arc_v/rhx100 samples/hello_world/
  1. Flash (run) with the ARC nSIM runner:
west flash

Expected output includes lines similar to:

-- west flash: using runner arc-nsim
Console now belongs to UART, hit CRTL-] to return to simulator.
Hello World! nsim_arc_v/rhx100
*** Booting Zephyr OS build ... ***

Press Ctrl-] to return from the simulator console, then Ctrl-C to stop
west if needed.