Hi
I get a compilation error "error: ‘time_t’ declared as function returning a function "is given when compiling Edge Impulse firmware for Raspberry Pi RP2040.
Followed the instruction from the git repository below.
Compiler version
arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009
Ubuntu 24.10
Make output :
[ 0%] Built target bs2_default
[ 0%] Built target bs2_default_library
[ 1%] Built target ei_rp2040_firmware_pdm_pio_h
[ 1%] Building CXX object CMakeFiles/ei_rp2040_firmware.dir/src/main.cpp.o
In file included from /home/doodle/firmware-pi-rp2040/firmware-sdk/ei_fusion.h:41,
from /home/doodle/firmware-pi-rp2040/firmware-sdk/ei_device_info_lib.h:25,
from /home/doodle/firmware-pi-rp2040/edge-impulse/ingestion-sdk-platform/raspberry-rp2040/ei_device_raspberry_rp2040.h:28,
from /home/doodle/firmware-pi-rp2040/src/main.cpp:30:
/home/doodle/firmware-pi-rp2040/firmware-sdk/sensor_aq.h:140:13: error: expected identifier before ‘*’ token
140 | time_t (time())(time_t);
| ^
/home/doodle/firmware-pi-rp2040/firmware-sdk/sensor_aq.h:140:22: error: ‘time_t’ has not been declared
140 | time_t (time())(time_t);
| ^~~~~~
/home/doodle/firmware-pi-rp2040/firmware-sdk/sensor_aq.h:140:5: error: ISO C++ forbids declaration of ‘time_t’ with no type [-fpermissive]
140 | time_t (time())(time_t);
| ^~~~~~
/home/doodle/firmware-pi-rp2040/firmware-sdk/sensor_aq.h:140:29: error: ‘time_t’ declared as function returning a function
140 | time_t (time())(time_t);
| ^
make[2]: *** [CMakeFiles/ei_rp2040_firmware.dir/build.make:76: CMakeFiles/ei_rp2040_firmware.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1801: CMakeFiles/ei_rp2040_firmware.dir/all] Error 2
make: *** [Makefile:91: all] Error 2