Skip to content

Conversation

@Bucknalla
Copy link
Contributor

@Bucknalla Bucknalla commented Dec 3, 2025

Summary

This PR adds comprehensive ARM64 (aarch64) Linux support to Arduino_Tools, enabling STM32duino development on ARM64 systems such as Raspberry Pi 5, Linux Docker under MacOS (ARM64) etc.

  • ARM64 Linux binary support (dfu-util, hid-flash, upload_reset)
  • Docker-based cross-compilation build system

ARM64 Linux systems are increasingly common in embedded development and IoT applications (Raspberry Pi 4+, cloud ARM instances, Apple Silicon via Linux VMs, etc.), but Arduino_Tools currently only provides x86_64 Linux binaries.

Adds ARM64 build script to use Docker to generate Linux ARM64 executables for:

  • dfu-prefix
  • dfu-suffix
  • dfu-util
  • hid-flash

Implements Arch/OS selecter for Linux ARM64 into maple_upload.sh and dfu-util.sh

Validation

  • Ensure CI build is passed.
  • Demonstrate the code is solid. [e.g. Provide a sketch]

Code formatting

  • Ensure AStyle check is passed thanks CI

Closing issues

Fixes #103

@fpistm fpistm self-requested a review December 3, 2025 15:21
@fpistm fpistm added arduino compatibility enhancement New feature or request labels Dec 3, 2025
@fpistm fpistm added this to the 2.4.0 milestone Dec 3, 2025
@fpistm fpistm linked an issue Dec 3, 2025 that may be closed by this pull request
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Bucknalla
Thanks for this PR.

I don't want duplicate files. As the primary OS is linux I would like to kept only one directory linux/ then inside create 2 directory:
x86_64
aarch64
And update script to call binaries from the correct directory.

Ex:

    case "${UNAME_ARCH}" in
      x86_64)
        DFU_UTIL=${DIR}/linux/x86_64/dfu-util
        ;;
      aarch64|arm64)
        DFU_UTIL=${DIR}/linux-arm64/aarch64/dfu-util
        ;;
      *)
        echo "Unsupported Linux architecture: ${UNAME_ARCH}."
        exit 1
        ;;
    esac

This will ease packaging as Arduino only consider windows, macosx and linux as differentiatior.

Then move script/ folder in the src/ directory, this will avoid to release them and the src/ directory goal is to contains all related stuff to generate the binaries.
Ex: src/linux-arm64/

And accordingly update the script to properly out in the correct folder if needed.

@Bucknalla Bucknalla requested a review from fpistm December 4, 2025 09:47
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick update.
LGTM.
Not tested as I don't have such arch.

@zfields
Copy link

zfields commented Dec 4, 2025

This is exciting! @fpistm do you have a release date scheduled for 2.4.0?

@fpistm
Copy link
Member

fpistm commented Dec 4, 2025

The release is planned soon but linked to the STM32 core 2.12.0 which is also planned soon. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for linux aarch64

3 participants