Unverified Commit 1bf41bcc authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Add native Apple ARM silicon support (#1959)

* Add native Apple ARM silicon M1/M2/M3 support

* Identify Mac ARM in download get.py script

Thanks to the ESP32 `get.py` sources!

* Rebuild M1 w/o using strip
parent 7180ca3b
This diff is collapsed.
...@@ -99,22 +99,23 @@ def load_tools_list(filename, platform): ...@@ -99,22 +99,23 @@ def load_tools_list(filename, platform):
return tools_to_download return tools_to_download
def identify_platform(): def identify_platform():
arduino_platform_names = {'Darwin' : {32 : 'i386-apple-darwin', 64 : 'x86_64-apple-darwin'}, arduino_platform_names = {'Darwin' : {32 : 'i386-apple-darwin', 64 : 'x86_64-apple-darwin'},
'Linux' : {32 : 'i686-pc-linux-gnu', 64 : 'x86_64-pc-linux-gnu'}, 'DarwinARM': {32 : 'arm64-apple-darwin', 64 : 'arm64-apple-darwin'},
'LinuxARM': {32 : 'arm-linux-gnueabihf', 64 : 'aarch64-linux-gnu'}, 'Linux' : {32 : 'i686-pc-linux-gnu', 64 : 'x86_64-pc-linux-gnu'},
'Windows' : {32 : 'i686-mingw32', 64 : 'x86_64-mingw32'}} 'LinuxARM' : {32 : 'arm-linux-gnueabihf', 64 : 'aarch64-linux-gnu'},
'Windows' : {32 : 'i686-mingw32', 64 : 'x86_64-mingw32'}}
bits = 32 bits = 32
if sys.maxsize > 2**32: if sys.maxsize > 2**32:
bits = 64 bits = 64
sys_name = platform.system() sys_name = platform.system()
if 'Linux' in sys_name and (platform.platform().find('arm') > 0 or platform.platform().find('aarch64') > 0): sys_platform = platform.platform()
if 'Darwin' in sys_name and (sys_platform.find('arm') > 0 or sys_platform.find('arm64') > 0):
sys_name = 'DarwinARM'
if 'Linux' in sys_name and (sys_platform.find('arm') > 0 or sys_platform.find('aarch64') > 0):
sys_name = 'LinuxARM' sys_name = 'LinuxARM'
if 'CYGWIN_NT' in sys_name: if ('CYGWIN_NT' in sys_name) or ('MSYS_NT' in sys_name) or ('MINGW' in sys_name):
sys_name = 'Windows'
if 'MSYS_NT' in sys_name:
sys_name = 'Windows'
if 'MINGW' in sys_name:
sys_name = 'Windows' sys_name = 'Windows'
print('System: %s, Bits: %d, Info: %s' % (sys_name, bits, sys_platform))
return arduino_platform_names[sys_name][bits] return arduino_platform_names[sys_name][bits]
def main(): def main():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment