Skip to content

Commit

Permalink
Bundle native Arduino Firmware Uploader with Apple Silicon build
Browse files Browse the repository at this point in the history
A separate build of Arduino IDE is produced for each of the macOS host architectures:

* Apple Silicon (ARM)
* Intel (x86)

The Arduino IDE distribution includes several bundled helper tools. The build of those tools should also be selected according to the target host architecture.

At the time the infrastructure was set up for bundling the "Arduino Firmware Uploader" tool with the Arduino IDE distribution, that tool was only produced in a macOS x86 variant. So this was used even in the Apple Silicon Arduino IDE distribution, relying on Rosetta 2 to provide compatibility when used on Apple Silicon machines. Since that time, the Arduino Firmware Uploader build infrastructure has been updated to produce an Apple Silicon build of the tool and such a build is available for the IDE's current version dependency of Arduino Firmware Updater.

The "Arduino Firmware Uploader" tool bundling script is hereby updated to use the most appropriate variant of the dependency for the target host architecture. This provides the following benefits

* Compatibility with systems that don't have Rosetta 2 installed
* Improved performance
  • Loading branch information
per1234 committed Jan 22, 2024
1 parent b8dd39c commit 0e7b0c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion arduino-ide-extension/scripts/download-fwuploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@
const suffix = (() => {
switch (platform) {
case 'darwin':
return 'macOS_64bit.tar.gz';
switch (arch) {
case 'arm64':
return 'macOS_ARM64.tar.gz';
case 'x64':
return 'macOS_64bit.tar.gz';
default:
return undefined;
}
case 'win32':
return 'Windows_64bit.zip';
case 'linux': {
Expand Down

0 comments on commit 0e7b0c9

Please sign in to comment.