Open navinreddy23 opened 3 years ago
Hi all,
I have an update.. I got the CPP standalone to work with Eclipse. https://github.com/navinreddy23/Test_EdgeImpulse_Eclipse (First commit)
But the standalone C config for Eclipse is failing during Linking process. It complains about multiple definition.
Here is the error from the Eclipse below:
_usr/bin/ld: ./edge-impulse-sdk/classifier/ei_run_classifier_c.o:/home/navin/eclipse-workspace/Test_Impulse/model-parameters/model_metadata.h:93: multiple definition of ei_classifier_inferencing_categories'; ./src/Test_Impulse.o:/home/navin/eclipse-workspace/Test_Impulse/model-parameters/model_metadata.h:93: first defined here /usr/bin/ld: ./edge-impulse-sdk/classifier/ei_run_classifier_c.o:/home/navin/eclipse-workspace/Test_Impulse/model-parameters/model_metadata.h:181: multiple definition of
ei_dsp_config_3'; ./src/Test_Impulse.o:/home/navin/eclipse-workspace/Test_Impulse/model-parameters/model_metadata.h:181: first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:94: TestImpulse] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.
Did anyone face similar problems?
Best regards, Navin
+1
Any updates to this?
Thanks, Sridhar
That's solved. For an example Eclipse project setup please checkout this repo.
Thank you for the link! Any tips on how you solved the issue would be appreciated!
I have the same issue with using edge-impulse within C. I followed the example-standalone-inferencing-c example on ESP32 with FreeRTOS, and ran into multiple definitions issue similar to what you described above.
Thanks, Sridhar
Hi @sridharrajagopal,
I think the path was incorrect if I remember correctly. For e.g. if you have edge-impulse directory in your eclipse root folder then you need to include '.' as well.
CFLAGS += -I.
I think my issue might be different. I'm calling it in the ESP32 environment, and the multiple definitions seem to be because of global variables in header files getting compiled into multiple .o's and archived into static libraries.
Not sure at this point how to create a shared library (on ESP32 build) as was suggested in the example (which seems to be for the desktop environment).
At least now I know where the problem is! :-)
Thanks for responding! Sridhar
Hi all,
I tried the example on the CMD line, it works fine!
But when I tried porting to the Eclipse by creating an empty project and adding all the sources and includes, it does not compile. I think it has to do with the header names.
Eclipse indexing is fine, because clicking on the header files will open them.
But when I compile..
include "edge-impulse-sdk/dsp/numpy_types.h" -> Does not work
include "numpy_types.h" -> Works!
It is a lot of work to change all the headers.
Is there a way to make Eclipse know that they are the same? I am trying to integrate into an Eclipse based IDE for an NXP MCU. It would be really helpful if somebody could help!
Here is the link to the project: https://github.com/navinreddy23/Test_EdgeImpulse_Eclipse.
Thanks and regards, Navin