"Error: Typedef redefinition with different types ('__fp16' vs 'float') " in mbed online compiler

Hello, I’ve run my EI project locally with mbed CLI as mentioned in the tutorial (https://docs.edgeimpulse.com/docs/running-your-impulse-mbed) on my ST B-L475E-IOT01A board and everything was fine. Then I tried to compile the project on the online Mbed compiler and I came into this error:


Would anyone know what causes this error? am I missing something?

Thanks,

Angelo

you could modify that file like so:

#ifndef float16_t
typedef __fp16 float16_t
#endif
2 Likes

Note that your features array is not correct, it should be:

static const float features[] = {
   4.2900, -7.3400 // etc.
};
1 Like

Thanks! I fixed the typedef _fp16 float16_t error and the features error and now this appear: