diff --git a/README.md b/README.md index 90bc83647..1b325d801 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ sudo apt-get install dfu-util gcc-arm-none-eabi python3-pip libffi-dev git ``` ```bash # macOS -brew tap ArmMbed/homebrew-formulae -brew install python dfu-util arm-none-eabi-gcc gcc@12 +brew install --cask gcc-arm-embedded +brew install python3 dfu-util gcc@12 ``` Clone panda repository: diff --git a/tests/libpanda/SConscript b/tests/libpanda/SConscript index 000ca63ca..f9f052e45 100644 --- a/tests/libpanda/SConscript +++ b/tests/libpanda/SConscript @@ -1,5 +1,14 @@ +import platform + +CC = 'gcc' +system = platform.system() +if system == 'Darwin': + # gcc installed by homebrew has version suffix (e.g. gcc-12) in order to be + # distinguishable from system one - which acts as a symlink to clang + CC += '-12' + env = Environment( - CC='gcc', + CC=CC, CFLAGS=[ '-nostdlib', '-fno-builtin', @@ -8,7 +17,8 @@ env = Environment( ], CPPPATH=[".", "../../board/"], ) -env.PrependENVPath('PATH', '/opt/homebrew/bin') +if system == "Darwin": + env.PrependENVPath('PATH', '/opt/homebrew/bin') if GetOption('ubsan'): flags = [