8 years, 6 months ago.

static inline in gpio_object.h doesn't compile in uVision

I'm getting a couple of errors on the same line in gpio_object.h when I export to uVision.
mbed/KL25Z/gpio_object.h(33): warning: #260-D: explicit type is missing ("int" assumed)
mbed/KL25Z/gpio_object.h(33): error: #65: expected a ";"

Those lines look like this


static inline void gpio_write(gpio_t *obj, int value) {
    if (value)
        *obj->reg_set = obj->mask;
        *obj->reg_clr = obj->mask;

The code looks fine to me... Does anyone have any suggestions to try? I've already tried adding braces to the if-else.

1 Answer

8 years, 6 months ago.

I think it was caused by a missing "--c99" compiler flag in the template for the KL25Z uVision project. This should be fixed now.

Accepted Answer