Skip to content

How to build WAMR for RP2350 (thumbv8m.main-none-eabihf) target #4505

@JarvisPrestidge

Description

@JarvisPrestidge

Summary

I'm trying to build WAMR for the Raspberry Pi Pico 2 (RP2350) which uses an ARM Cortex-M33 core (ARMv8-M architecture). The build fails during CMake's compiler test phase with linking errors related to missing syscall implementations.

Environment

  • Host OS: macOS (Apple Silicon M1)
  • Target: Raspberry Pi Pico 2 (RP2350)
  • Target Architecture: ARM Cortex-M33 (ARMv8-M)
  • Toolchain: ARM GNU Toolchain 12.3.Rel1 (arm-none-eabi-gcc)
  • CMake: 3.29.6
  • WAMR Version: v1.1.0 (via wamr-rust-sdk)

Current Configuration

I'm building through the wamr-rust-sdk with these CMake configurations (but I'm throwing everything at it at this point to see what will stick):

WAMR_BUILD_PLATFORM=linux
WAMR_BUILD_TARGET=arm
WAMR_BUILD_INTERP=1
WAMR_BUILD_FAST_INTERP=1
WAMR_BUILD_AOT=1
WAMR_BUILD_JIT=0
WAMR_BUILD_FAST_JIT=0
WAMR_BUILD_LIBC_WASI=0
WAMR_BUILD_LIBC_BUILTIN=1
WAMR_BUILD_MINI_LOADER=1

Error Details

The build fails during CMake's compiler test with these linking errors:
CMake Error: The C compiler "/opt/homebrew/bin/arm-none-eabi-gcc" is not able to compile a simple test program.

Linking errors:

  • undefined reference to `_exit'
  • undefined reference to `_close'
  • undefined reference to `_lseek'
  • undefined reference to `_read'
  • undefined reference to `_sbrk'
  • undefined reference to `_write'

Expected Outcome

WAMR should build successfully for the RP2350 target, allowing WebAssembly execution on this embedded platform.

Additional Context

The RP2350 is a new microcontroller from Raspberry Pi with dual ARM Cortex-M33 cores, similar to other ARM Cortex-M targets that WAMR already supports. It should be feasible to get WAMR working on this platform.
Any guidance on the correct build configuration or platform-specific considerations would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions