electro-smith / DaisyToolchain

Static Toolchain for the Daisy ecosystem
8 stars 7 forks source link

can not build on Mac m1 #18

Closed alex-frx closed 2 years ago

alex-frx commented 2 years ago

I installed the toolchain and everything is installed fine (checked every component separately) but if I want to build the project or any example with make I get this error:

during GIMPLE pass: evrp 
libdaisy//core/startup_stm32h750xx.c: In function 'Reset_Handler':
libdaisy//core/startup_stm32h750xx.c:1566:1: internal compiler error: Illegal instruction: 4
 1566 | }
      | ^

if I open the file this is referring to. it is a function with the following content:

void __attribute__((naked, noreturn)) Default_Handler()
{
    //If you get stuck here, your code is missing a handler for some interrupt.
    //Define a 'DEBUG_DEFAULT_INTERRUPT_HANDLERS' macro via VisualGDB Project Properties and rebuild your project.
    //This will pinpoint a specific missing vector.
    for (;;) ;
}
alex-frx commented 2 years ago

the exact compiler command that was run is:

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 -include stm32h7xx.h -Ilibdaisy/ -Ilibdaisy//src/ -Ilibdaisy//src/sys -Ilibdaisy//src/usbd -Ilibdaisy//src/usbh -Ilibdaisy//Drivers/CMSIS/Include/ -Ilibdaisy//Drivers/CMSIS/DSP/Include -Ilibdaisy//Drivers/CMSIS/Device/ST/STM32H7xx/Include -Ilibdaisy//Drivers/STM32H7xx_HAL_Driver/Inc/ -Ilibdaisy//Middlewares/ST/STM32_USB_Device_Library/Core/Inc -Ilibdaisy//Middlewares/ST/STM32_USB_Host_Library/Core/Inc -Ilibdaisy//Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc -Ilibdaisy//core/ -IDaisySP//Source -Ilibdaisy//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
alex-frx commented 2 years ago

This is an problem with arm-none-eabi-gcc a solution is to use a older versions. More information can be found here: Daisy forum

stephenhensley commented 2 years ago

@alex-frx thanks for the report!

Just wanted to mention that we've pushed a fix. So this will no longer be an issue in the future.

alex-frx commented 2 years ago

@stephenhensley yeah i saw it in the forum. thanks for the quick fix! appreciate this project