Compiling everything went just fine till:
Building file: …/src/spark_wiring_interrupts.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p obj/src/
arm-none-eabi-gcc -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -I…/inc -I…/…/core-common-lib/CMSIS/Include -I…/…/core-common-lib/CMSIS/Device/ST/STM32F10x/Include -I…/…/core-common-lib/STM32F10x_StdPeriph_Drive
r/inc -I…/…/core-common-lib/STM32_USB-FS-Device_Driver/inc -I…/…/core-common-lib/CC3000_Host_Driver -I…/…/core-common-lib/SPARK_Firmware_Driver/inc -I…/…/core-communication-lib/lib/tropicssl/include -I…/…/
core-communication-lib/src -I. -ffunction-sections -Wall -fmessage-length=0 -MD -MP -MF obj/src/spark_wiring_interrupts.o.d -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -DDFU_BUILD_ENABLE -DRELEASE_BUILD -fno-exceptions -f
no-rtti -c -o obj/src/spark_wiring_interrupts.o …/src/spark_wiring_interrupts.cpp
…/src/spark_wiring_interrupts.cpp:59:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:60:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:61:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:62:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:63:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:64:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:65:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:66:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:67:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:68:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:69:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:70:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:71:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:72:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:73:7: error: expected primary-expression before ‘.’ token
…/src/spark_wiring_interrupts.cpp:74:7: error: expected primary-expression before ‘.’ token
mingw32-make: *** [obj/src/spark_wiring_interrupts.o] Error 1
Here is a snip of the source code:
//Interrupts
const uint8_t GPIO_IRQn[] = {
EXTI0_IRQn, //0
EXTI1_IRQn, //1
EXTI2_IRQn, //2
EXTI3_IRQn, //3
EXTI4_IRQn, //4
EXTI9_5_IRQn, //5
EXTI9_5_IRQn, //6
EXTI9_5_IRQn, //7
EXTI9_5_IRQn, //8
EXTI9_5_IRQn, //9
EXTI15_10_IRQn, //10
EXTI15_10_IRQn, //11
EXTI15_10_IRQn, //12
EXTI15_10_IRQn, //13
EXTI15_10_IRQn, //14
EXTI15_10_IRQn //15
};
// Create a structure for user ISR function pointers
typedef struct exti_channel {
void (*handler)();
} exti_channel;
//Array to hold user ISR function pointers
static exti_channel exti_channels[] = {
{ .handler = NULL }, // EXTI0 <== ERROR OCCURS WHEN IT HITS THIS LINE
{ .handler = NULL }, // EXTI1
This problem came up with someone else earlier without an answer. I thought I knew ‘C’ pretty well, but I don’t understand the syntax involved in the “.handler” thing (if I were the compiler I might complain as well). Any of the developers know anything about this? What’s trying to be accomplished? More straightforward way to write that code? How to fix the error??
Thanks!
BTW, compiling on XP but the earlier fellow was on linux, so it’s probably not be the environment.