Mac mini m1 & Arduino Field problems

Hi,

Just go a mac mini m1 today.

I have managed to install the arduino ide and stm32 as per the guide.

I can load the blink example, but any of the field examples throw these compilation errors on arduino log:

Arduino Log

/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_Init': stm32yyxx_hal_sai.c:(.text.HAL_SAI_Init+0x0): multiple definition of HAL_SAI_Init’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_Init+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_InitProtocol': stm32yyxx_hal_sai.c:(.text.HAL_SAI_InitProtocol+0x0): multiple definition of HAL_SAI_InitProtocol’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_InitProtocol+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_DeInit': stm32yyxx_hal_sai.c:(.text.HAL_SAI_DeInit+0x0): multiple definition of HAL_SAI_DeInit’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_DeInit+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_Transmit': stm32yyxx_hal_sai.c:(.text.HAL_SAI_Transmit+0x0): multiple definition of HAL_SAI_Transmit’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_Transmit+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_Receive': stm32yyxx_hal_sai.c:(.text.HAL_SAI_Receive+0x0): multiple definition of HAL_SAI_Receive’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_Receive+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_Transmit_IT': stm32yyxx_hal_sai.c:(.text.HAL_SAI_Transmit_IT+0x0): multiple definition of HAL_SAI_Transmit_IT’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_Transmit_IT+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_Receive_IT': stm32yyxx_hal_sai.c:(.text.HAL_SAI_Receive_IT+0x0): multiple definition of HAL_SAI_Receive_IT’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_Receive_IT+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_DMAPause': stm32yyxx_hal_sai.c:(.text.HAL_SAI_DMAPause+0x0): multiple definition of HAL_SAI_DMAPause’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_DMAPause+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_DMAResume': stm32yyxx_hal_sai.c:(.text.HAL_SAI_DMAResume+0x0): multiple definition of HAL_SAI_DMAResume’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_DMAResume+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_DMAStop': stm32yyxx_hal_sai.c:(.text.HAL_SAI_DMAStop+0x0): multiple definition of HAL_SAI_DMAStop’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_DMAStop+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_Abort': stm32yyxx_hal_sai.c:(.text.HAL_SAI_Abort+0x0): multiple definition of HAL_SAI_Abort’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_Abort+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_Transmit_DMA': stm32yyxx_hal_sai.c:(.text.HAL_SAI_Transmit_DMA+0x0): multiple definition of HAL_SAI_Transmit_DMA’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_Transmit_DMA+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_Receive_DMA': stm32yyxx_hal_sai.c:(.text.HAL_SAI_Receive_DMA+0x0): multiple definition of HAL_SAI_Receive_DMA’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_Receive_DMA+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_EnableTxMuteMode': stm32yyxx_hal_sai.c:(.text.HAL_SAI_EnableTxMuteMode+0x0): multiple definition of HAL_SAI_EnableTxMuteMode’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_EnableTxMuteMode+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_DisableTxMuteMode': stm32yyxx_hal_sai.c:(.text.HAL_SAI_DisableTxMuteMode+0x0): multiple definition of HAL_SAI_DisableTxMuteMode’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_DisableTxMuteMode+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_EnableRxMuteMode': stm32yyxx_hal_sai.c:(.text.HAL_SAI_EnableRxMuteMode+0x0): multiple definition of HAL_SAI_EnableRxMuteMode’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_EnableRxMuteMode+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_DisableRxMuteMode': stm32yyxx_hal_sai.c:(.text.HAL_SAI_DisableRxMuteMode+0x0): multiple definition of HAL_SAI_DisableRxMuteMode’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_DisableRxMuteMode+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_IRQHandler': stm32yyxx_hal_sai.c:(.text.HAL_SAI_IRQHandler+0x0): multiple definition of HAL_SAI_IRQHandler’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_IRQHandler+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_GetState': stm32yyxx_hal_sai.c:(.text.HAL_SAI_GetState+0x0): multiple definition of HAL_SAI_GetState’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_GetState+0x0): first defined here
/Users/joseluisborrachero/Library/Arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/…/lib/gcc/arm-none-eabi/9.3.1/…/…/…/…/arm-none-eabi/bin/ld: libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o: in function HAL_SAI_GetError': stm32yyxx_hal_sai.c:(.text.HAL_SAI_GetError+0x0): multiple definition of HAL_SAI_GetError’; libraries/DaisyDuino/utility/stm32h7xx_hal_sai.c.o:stm32h7xx_hal_sai.c:(.text.HAL_SAI_GetError+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Generic STM32H7 Series.

Im wondering if this is because of a few reasons:

*My bash profile is setup wrongly
*Stm32 is not compatible with m1 processors.

What is strange is that i did get the Blink example working…

Any ideas? Maybe i need to install brew, python etc?

I really have lost track of how many environments i had on my old mac (el capitan OS)

Thanks!

Hi @Topa

The error you’re getting does not seem to be related to the M1 Mac.

I noticed ST just released a new version (2.0) of their stm32duino board support project.

On the previous version (1.9) I am able to build without issues. However, after updating to v2.0, I reattempted the build and got the same error that you got. I have opened a new Issue on Github to resolve this error, and will try to get the issue resolved ASAP.

In the meantime I believe the previous version can still be accessed from the old URL. So you can add this alongside the entry in your preferences:

https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

I have both links in the configuration side-by-side, but I suspect you won’t want to have them both installed at the same time.
You can then temporarily uninstall the latest version, and install v1.9. After that everything should still work.

I’ll make sure to either respond here or make a new generic update topic as soon as the fix is live.

Hi! Thanks a lot for your support @shensley :grinning:

I have followed you tips and now i can compile fine like on the old computer,

Much appreciated, im freaking out a bit with non working apps at the moment with m1, and i thought this was one,

Cheers!

1 Like

Glad that got you sorted!

I haven’t had a chance to use one of the new macs yet, but it does seem like it’s flipped a whole bunch of software on it’s head, though. At least it seems like most things are still working correctly, or can work through Rosetta.