Skip to content

Make macOS executables universal, for both x86_64 and arm64 #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

markmentovai
Copy link
Contributor

@markmentovai markmentovai commented Jan 23, 2025

This provides a rebuild of all macOS executables. For reproducibility, this was done entirely by build_mac.sh. I verified that different machines produce bit-for-bit identical output. A build machine running Xcode 16.2 16C5032a on macOS 15.2 24C101 was used.

These tools should run on macOS 10.13 and later. This version was selected as it's the minimum macOS version that the xPack tools declare support for.

A build of libusb is included, so that the provided dfu-util no longer has an external dependency.

The universal structure was chosen for these tools to avoid changing paths, anywhere they may be relied on. If desired, build_mac.sh can also be used to produce single-architecture tools, even cross-compiling, depending on the value of the ARCH variable.

The current released versions were selected:

Link: stm32duino/BoardManagerFiles#72

This provides a rebuild of all macOS executables. For reproducibility,
this was done entirely by `build_mac.sh`. I verified that different
machines produce bit-for-bit identical output. A build machine running
Xcode 16.2 16C5032a on macOS 15.2 24C101 was used.

These tools should run on macOS 10.13 and later. This version was
selected as it's the minimum macOS version that the xPack tools declare
support for.

A build of libusb is included, so that the provided `dfu-util` no longer
has an external dependency.

The universal structure was chosen for these tools to avoid changing
paths, anywhere they may be relied on. If desired, `build_mac.sh` can
also be used to produce single-architecture tools, even cross-compiling,
depending on the value of the `ARCH` variable.

The current released versions were selected:
 - libusb 1.0.27
 - dfu-util 0.11 (including dfu-prefix and dfu-suffix)
 - hid-flash from STM32_HID_Bootloader 2.2.2 (this program erroneously
   reports its version as 2.2.1), with a patch from
Serasidis/STM32_HID_Bootloader#68 (comment).
 - upload_reset from this repository at the HEAD of main

Link: stm32duino/BoardManagerFiles#72
Signed-off-by: Mark Mentovai <[email protected]>
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 @markmentovai
Tested binaries with a MacBook Pro with Intel Core I5.

@fpistm fpistm merged commit 492592d into stm32duino:main Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

2 participants