Local build failing (in src/cc3000_spi.c)

Trying to do a local build but getting compilation errors. I checked out the hal branch with

git clone -b feature/hal https://github.com/spark/firmware hal-firmware

And a first ‘make clean all’ fails with the following errors:

(git)-[feature/hal] % make clean all PLATFORM=photon
Building firmware for Spark core, platform ID: 0
MCU/STM32F1xx/SPARK_Firmware_Driver/src/cc3000_spi.c:108:9: error: '__enable_irq' is static but used in inline function 'ENABLE_INT' which is not static [-Werror]
         __enable_irq();
         ^
MCU/STM32F1xx/SPARK_Firmware_Driver/src/cc3000_spi.c:100:3: error: '__disable_irq' is static but used in inline function 'DISABLE_INT' which is not static [-Werror]
   __disable_irq();
   ^
MCU/STM32F1xx/SPARK_Firmware_Driver/src/cc3000_spi.c:99:17: error: '__get_PRIMASK' is static but used in inline function 'DISABLE_INT' which is not static [-Werror]
   intState is = __get_PRIMASK();
                 ^
cc1: all warnings being treated as errors
../build/module.mk:160: recipe for target '../build/target/platform/platform-0/./MCU/STM32F1xx/SPARK_Firmware_Driver/src/cc3000_spi.o' failed
make[1]: *** [../build/target/platform/platform-0/./MCU/STM32F1xx/SPARK_Firmware_Driver/src/cc3000_spi.o] Error 1
build/recurse.mk:7: recipe for target 'platform' failed
make: *** [platform] Error 2

The featurehal branch is many months out of date (I will be deleting it now that it’s served it’s purpose.). For the latest release code please use latest, and for cutting edge code use develop.

Even though you’re using an old branch, it should still compile. what version of the compiler are you using?

arm-none-eabi-gcc --version will tell you that.

Thanks @mdma - helpful as always! Fresh checkout of latest compiled just fine. Now I feel dumb for not checking the date on the forum posts when following the instructions on the forum :sweat_smile:

GCC version:

arm-none-eabi-gcc (Arch Repository) 5.2.0
1 Like

We haven’t tested the 5.x series yet, so use with caution, especially if you’re compiling the system firmware or deploying to remote devices. The 4.9.3 release is the one we are presently testing with.

1 Like

Thanks for the heads up, and duly noted. Would you like me to keep track of and report any issues I run into?

Sure! https://github.com/spark/firmware/issues/858