Installation issues for toolchain on macOS

I am having a few issues getting the entire toolchain working on macOS. Both my program and the DaisyToolchain works without issues on Windows.

I used the instructions on the “install.command” file using homebrew. Also followed the instructions on this thread for apple silicons.

Installation went fine and I appear to have arm-none-eabi-gcc installed correctly. However when I try to compile the Reverb example on the patch_sm folder I get this error. What am I missing here?

Can anyone please point me in the right direction.

arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DHSE_VALUE=16000000  -DCORE_CM7 -DSTM32H750IB -DARM_MATH_CM7 -DUSE_FULL_LL_DRIVER -DUSE_DAISYSP_LGPL -include stm32h7xx.h -I../../libDaisy/ -I../../libDaisy//src/ -I../../libDaisy//src/sys -I../../libDaisy//src/usbd -I../../libDaisy//src/usbh -I../../libDaisy//Drivers/CMSIS/Include/ -I../../libDaisy//Drivers/CMSIS/DSP/Include -I../../libDaisy//Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../libDaisy//Drivers/STM32H7xx_HAL_Driver/Inc/ -I../../libDaisy//Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../../libDaisy//Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../../libDaisy//Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc -I../../libDaisy//core/ -I../../DaisySP//Source -I../../DaisySP//DaisySP-LGPL/Source -I../../libDaisy//Middlewares/Third_Party/FatFs/src -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -Wno-stringop-overflow -g -ggdb -MMD -MP -MF"build/startup_stm32h750xx.d" -std=gnu11 -Wa,-a,-ad,-alms=build/startup_stm32h750xx.lst ../../libDaisy//core/startup_stm32h750xx.c -o build/startup_stm32h750xx.o
arm-none-eabi-g++ -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DHSE_VALUE=16000000  -DCORE_CM7 -DSTM32H750IB -DARM_MATH_CM7 -DUSE_FULL_LL_DRIVER -DUSE_DAISYSP_LGPL -include stm32h7xx.h -I../../libDaisy/ -I../../libDaisy//src/ -I../../libDaisy//src/sys -I../../libDaisy//src/usbd -I../../libDaisy//src/usbh -I../../libDaisy//Drivers/CMSIS/Include/ -I../../libDaisy//Drivers/CMSIS/DSP/Include -I../../libDaisy//Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../libDaisy//Drivers/STM32H7xx_HAL_Driver/Inc/ -I../../libDaisy//Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../../libDaisy//Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../../libDaisy//Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc -I../../libDaisy//core/ -I../../DaisySP//Source -I../../DaisySP//DaisySP-LGPL/Source -I../../libDaisy//Middlewares/Third_Party/FatFs/src -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -Wno-stringop-overflow -g -ggdb -MMD -MP -MF"build/ReverbExample.d" -fno-exceptions -fasm -finline -finline-functions-called-once -fshort-enums -fno-move-loop-invariants -fno-unwind-tables -fno-rtti -Wno-register -std=gnu++14 -Wa,-a,-ad,-alms=build/ReverbExample.lst ReverbExample.cpp -o build/ReverbExample.o
arm-none-eabi-g++ build/startup_stm32h750xx.o build/ReverbExample.o   -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard --specs=nano.specs --specs=nosys.specs -T../../libDaisy//core/STM32H750IB_flash.lds -L../../libDaisy//build -L ../../DaisySP//build -L ../../DaisySP//DaisySP-LGPL/build -ldaisy -lc -lm -lnosys -ldaisysp -ldaisysp-lgpl -Wl,-Map=build/ReverbExample.map,--cref -Wl,--gc-sections -Wl,--print-memory-usage -o build/ReverbExample.elf
/Applications/ARM/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: cannot find -ldaisy
/Applications/ARM/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: cannot find -ldaisysp
/Applications/ARM/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: cannot find -ldaisysp-lgpl
collect2: error: ld returned 1 exit status
make: *** [build/ReverbExample.elf] Error 1

I got this portion solved.

I tried running the .pkg file both with shift click as well as getting past the “Apple could not verify “DaisyToolchain-macos-installer-x64-0.2.0.pkg” is free of malware that may harm your Mac or compromise your privacy.” portion. In both cases, the installer didn’t do anything on a Mac M4. This is when I noticed that there was homebrew way of installing. I switched to that instead.

For the homebrew method, I installed

brew install openocd dfu-util
brew install --cask ./gcc-arm-embedded.rb

then ran these two commands instead of the /usr/local/Caskroom ones.

find /opt/homebrew/Caskroom/gcc-arm-embedded -type f -perm +111 -print | xargs spctl --add --label "gcc-arm-embedded"
find /opt/homebrew/Caskroom/gcc-arm-embedded | xargs xattr -d com.apple.quarantine

Hope this makes sense.

For the above error to be solved, I had to go into libdaisy and daisysp folders and manually run a make in there.

Thank you so much for bringing this up!!

I wonder if something with M4 leads to an issue. The team unfortunately doesn’t have access to M4 at the moment to test so hopefully other community members with M4 can join our troubleshooting. Could you tell us more about the issue with the .pkg installation route?

And this prompted the team to discuss more about including the homebrew instruction on the support site. :slight_smile:

I got mine setup on an M4 Mac without any problems fwiw. I don’t remember needing to do anything other than following the official instructions but I barely know what I’m doing so it’s possible I got lucky!

I suspect the problem might be due to conflicts with existing arm-gcc packages installed via PlatformIO and other toolchains. When I inspected the package using pkgutil , I noticed that, for example, files for ocdutil are placed in /Library/DaisyToolChain/0.2.0 , whereas Homebrew installs packages in /opt/homebrew/ —a design choice aimed at maintaining consistency across versions by keeping everything outside of the standard Mac folders.

In either scenario, Homebrew instructions may be more suitable for some users than others. If the package is intended for individuals who aren’t comfortable with the command line, then building an Apple Silicon-specific and intel .pkgs with a real cert via code signing, notarizing and stapling may be the way to go :).

For what its worth the homebrew method of deploying lives comfortably with platformIO and other gcc’s.