Back to list
XuNeo

vela-run

by XuNeo

6🍴 0📅 Jan 21, 2026

SKILL.md


name: vela-run description: Run NuttX and Vela RTOS targets on QEMU, FVP, goldfish emulator, and simulator. Supports ARM Cortex-M (MPS3-AN547), ARMv7-A, ARMv8-A, ARMv8-R FVP, goldfish (Android emulator), and native simulator with automatic detection and GDB debugging. license: MIT compatibility: Requires qemu-system-arm, qemu-system-aarch64, or Android emulator. FVP requires ARM FVP_BaseR_AEMv8R tool.

Vela Run Skill

Run NuttX and Vela RTOS builds on various emulation targets.

Target Types

TargetBinaryMachineUse Case
mps3-an547qemu-system-armMPS3-AN547ARM Cortex-M55 (ARMv8.1-M)
qemu-armv7aqemu-system-armvirtARM Cortex-A7 (ARMv7-A)
qemu-armv8aqemu-system-aarch64virtARM Cortex-A53 (ARMv8-A), SMP
fvp-armv8rFVP_BaseR_AEMv8RFVPARM Cortex-R82 (ARMv8-R), SMP
goldfishemulator.shAndroid EmulatorVela goldfish (ARM32/ARM64)
simulatornative binaryHostNative simulation

Usage Examples

Use the vela-run skill to run qemu-armv8a with gdb on port 1234
Use the vela-run skill to run mps3-an547
Use the vela-run skill to run goldfish arm32
Use the vela-run skill to run fvp-armv8r with smp
Use the vela-run skill to run the simulator

QEMU Common Parameters

All QEMU targets share these parameters:

Debug Parameters

ParameterDescription
-SFreeze CPU at startup, wait for GDB continue
-sShorthand for -gdb tcp::1234
-gdb tcp::{port}Start GDB server on specified port

Display & I/O Parameters

ParameterDescription
-nographicDisable graphical output, use serial console
-chardev stdio,id=con,mux=onCreate multiplexed stdio character device
-serial chardev:conConnect serial port to chardev
-mon chardev=con,mode=readlineQEMU monitor on same console (Ctrl-a c to switch)

Machine Parameters

ParameterDescription
-M {machine}Machine type (mps3-an547, virt, etc.)
-machine virt,...Virtual machine with options
-cpu {model}CPU model (cortex-a7, cortex-a53, etc.)
-smp {n}Number of CPU cores for SMP
-m {size}Memory size (e.g., 2G)

Machine Options (for -machine virt)

OptionDescription
virtualization=on/offEnable/disable EL2 virtualization
gic-version=2/3GIC version (2 for GICv2, 3 for GICv3)
highmem=offDisable high memory (required for ivshmem)

Network Parameters

ParameterDescription
-net noneDisable networking
-netdev user,id=u1,...User-mode networking with port forwarding
-device virtio-net-device,...Virtio network device

Filesystem Parameters

ParameterDescription
-fsdev local,...9pfs filesystem device
-device virtio-9p-device,...Virtio 9p device for host sharing
-semihostingEnable ARM semihosting (hostfs access)

Device Loading

ParameterDescription
-kernel {file}Kernel/firmware ELF or binary
-device loader,file={img},addr={addr}Load file at specific address

Run Commands

MPS3-AN547 (ARM Cortex-M)

Basic run:

qemu-system-arm -M mps3-an547 -nographic -kernel nuttx.bin

With GDB:

qemu-system-arm -M mps3-an547 -m 2G -nographic -kernel nuttx.bin -S -s
# Or custom port:
qemu-system-arm -M mps3-an547 -m 2G -nographic -kernel nuttx.bin -gdb tcp::1128

With ROMFS (for PIC apps):

qemu-system-arm -M mps3-an547 -m 2G -nographic \
  -kernel nuttx.bin \
  -device loader,file=romfs.img,addr=0x60000000

Note (QEMU 9.20+): UART interrupts swapped, configure:

CONFIG_CMSDK_UART0_TX_IRQ=50
CONFIG_CMSDK_UART0_RX_IRQ=49

QEMU ARMv7-A

Basic run:

qemu-system-arm -cpu cortex-a7 -nographic \
  -machine virt,virtualization=off,gic-version=2 \
  -net none \
  -chardev stdio,id=con,mux=on \
  -serial chardev:con \
  -mon chardev=con,mode=readline \
  -kernel nuttx

With GDB (paused):

qemu-system-arm -cpu cortex-a7 -nographic \
  -machine virt,virtualization=off,gic-version=2 \
  -net none \
  -chardev stdio,id=con,mux=on \
  -serial chardev:con \
  -mon chardev=con,mode=readline \
  -kernel nuttx \
  -S -s

With ivshmem (OpenAMP):

qemu-system-arm -cpu cortex-a7 -nographic \
  -machine virt,highmem=off \
  -object memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/ivshmem0,size=4194304,share=yes \
  -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,addr=0xb \
  -kernel nuttx

QEMU ARMv8-A (AArch64)

Single core (GICv3):

qemu-system-aarch64 -cpu cortex-a53 -nographic \
  -machine virt,virtualization=on,gic-version=3 \
  -net none \
  -chardev stdio,id=con,mux=on \
  -serial chardev:con \
  -mon chardev=con,mode=readline \
  -kernel nuttx

SMP (4 cores):

qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
  -machine virt,virtualization=on,gic-version=3 \
  -net none \
  -chardev stdio,id=con,mux=on \
  -serial chardev:con \
  -mon chardev=con,mode=readline \
  -kernel nuttx

With GDB (paused):

qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
  -machine virt,virtualization=on,gic-version=3 \
  -net none \
  -chardev stdio,id=con,mux=on \
  -serial chardev:con \
  -mon chardev=con,mode=readline \
  -kernel nuttx \
  -S -s

With semihosting:

qemu-system-aarch64 -cpu cortex-a53 -smp 4 -semihosting -nographic \
  -machine virt,virtualization=on,gic-version=3 \
  -net none \
  -chardev stdio,id=con,mux=on \
  -serial chardev:con \
  -mon chardev=con,mode=readline \
  -kernel nuttx

GICv2 variant:

qemu-system-aarch64 -cpu cortex-a53 -nographic \
  -machine virt,virtualization=off,gic-version=2 \
  -net none \
  -chardev stdio,id=con,mux=on \
  -serial chardev:con \
  -mon chardev=con,mode=readline \
  -kernel nuttx

With virtio networking:

qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
  -machine virt,virtualization=on,gic-version=3 \
  -chardev stdio,id=con,mux=on -serial chardev:con \
  -global virtio-mmio.force-legacy=false \
  -netdev user,id=u1,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23 \
  -device virtio-net-device,netdev=u1,bus=virtio-mmio-bus.0 \
  -mon chardev=con,mode=readline \
  -kernel nuttx

With 9pfs (host filesystem sharing):

qemu-system-aarch64 -cpu cortex-a53 -nographic \
  -machine virt,virtualization=on,gic-version=3 \
  -fsdev local,security_model=none,id=fsdev0,path=/path/to/share \
  -device virtio-9p-device,id=fs0,fsdev=fsdev0,mount_tag=host \
  -chardev stdio,id=con,mux=on -serial chardev:con \
  -mon chardev=con,mode=readline \
  -kernel nuttx

FVP ARMv8-R (Cortex-R82)

Prerequisites: Download FVP from ARM Ecosystem Models

Single core:

FVP_BaseR_AEMv8R \
  -f boards/arm64/fvp-v8r/fvp-armv8r/scripts/fvp_cfg.txt \
  -a ./nuttx

SMP:

FVP_BaseR_AEMv8R \
  -f boards/arm64/fvp-v8r/fvp-armv8r/scripts/fvp_cfg_smp.txt \
  -a ./nuttx

Serial ports: FVP exposes 4 UART ports on localhost:

  • terminal_0: port 5000
  • terminal_1: port 5001 (default console)
  • terminal_2: port 5002
  • terminal_3: port 5003

Connect to console:

telnet localhost 5001

Goldfish (Vela Android Emulator)

ARM32:

./emulator.sh out/qemu_vela_goldfish-armeabi-v7a-ap/

ARM64:

./emulator.sh out/qemu_vela_goldfish-arm64-v8a-ap/

No window (terminal only):

./emulator.sh out/qemu_vela_goldfish-armeabi-v7a-ap/ -no-window

With GDB (paused):

./emulator.sh out/qemu_vela_goldfish-armeabi-v7a-ap/ -qemu -S -s

With semihosting (for hostfs):

./emulator.sh out/qemu_vela_goldfish-armeabi-v7a-ap/ -qemu -semihosting

With 9pfs:

./emulator.sh out/qemu_vela_goldfish-armeabi-v7a-ap/ \
  -qemu \
  -fsdev local,security_model=passthrough,id=fsdev0,path=/path/to/share \
  -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare

Persistent instance (-keep):

./emulator.sh vela -keep -no-window

Simulator (Native)

Direct execution:

./build/nuttx

Skill Integration

Interactive Sessions

For interactive work with QEMU, simulator, or GDB where user needs to interact with the console:

Use the tmux skill to start and manage interactive sessions. This allows:

  • Running QEMU/simulator in background
  • Sending commands and capturing output
  • User can attach to monitor the session

GDB Debugging

For debugging NuttX with GDB:

Use the gdb-start skill to connect GDB to QEMU's GDB server. Start QEMU with -S -s flags first.

GDB toolchains:

  • arm: gdb-multiarch
  • xtensa: xtensa-esp32s3-elf-gdb
  • Vela prebuilt: ./prebuilts/gcc/linux/arm[64]/bin/

Enable debug symbols in defconfig:

CONFIG_DEBUG_SYMBOLS=y

Automated Tasks

For fully automated tasks without user interaction:

Use the executor skill to run and control processes programmatically.

Target Detection

From Build Output

OUTDIR=$(cat .vela_build_outdir 2>/dev/null || echo "build")

# Detect from directory name
case "$OUTDIR" in
  *sim*|*simulator*) TARGET="simulator" ;;
  *goldfish*) TARGET="goldfish" ;;
  *mps3*|*an547*) TARGET="mps3-an547" ;;
  *armv7a*|*v7a*) TARGET="qemu-armv7a" ;;
  *armv8a*|*v8a*|*arm64*|*aarch64*) TARGET="qemu-armv8a" ;;
  *fvp*|*armv8r*) TARGET="fvp-armv8r" ;;
  *) TARGET="unknown" ;;
esac

Binary Location

Build TypeBinary Path
CMakebuild/nuttx or build/nuttx.bin
Makefilenuttx/nuttx
Velaout/<config>/nuttx
Goldfishout/qemu_vela_goldfish-*/ (directory)

Default Parameters

ParameterDefault
GDB Port (QEMU -s)1234
GDB Port (Goldfish)1234
SMP Cores (ARM64)4
FVP Console Port5001

Error Handling

ErrorSolution
Binary not foundRun vela-build first, check .vela_build_outdir
QEMU not installedapt install qemu-system-arm qemu-system-aarch64
FVP not foundDownload from ARM Ecosystem Models
emulator.sh missingCheck Vela project root
GDB connection refusedVerify QEMU started with -s or -gdb tcp::port

References

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon