Trained_model_compiled.cpp undefined references

Hi there,

Thanks to some responses, I corrected a lot of errors I was facing for my project, but now ran into hopefully the last ones before the project compiles successfully but now I am not sure what to do. In the project folder I share:(Google Drive: Sign-in)

I have .cc files that are related to the functions being called, and the files have more includes than the .cpp variants that are used in a PSoC 6 MCU porting code that was published on github, so I am not sure how the functions are being undefined references. I have the necessary additions to my makefile so the compiler knows where to find the locations of all needed files, and I added the porting folder from the github so the project should work for the cy8ckit-062-ble board, and I updated the ei_classifier_porting.h to have access to the folder. Incase, its needed, the IDE being used to try to build the project is Eclipse on ModusToolBox.

c:/users/ssjsonic/modustoolbox/tools_2.4/gcc/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: D:/ECE186B_Project/Project/build/CY8CKIT-062-BLE/Debug/tflite-model/trained_model_compiled.o: in function trained_model_init(void* (*)(unsigned int, unsigned int))': D:\ECE186B_Project\Project/tflite-model/trained_model_compiled.cpp:423: undefined reference to tflite::ops::micro::Register_RESHAPE()’

The undefined refernece also applies to functions tflite::Register_CONV_2D()', tflite::ops::micro::Register_MAX_POOL_2D()’, and `tflite::Register_FULLY_CONNECTED()’.

These errors I will show next, are from the main folder, which is a backup folder I made where I tried to fix the errors from above.
main folder:
(Google Drive: Sign-in)

c:/users/ssjsonic/modustoolbox/tools_2.4/gcc/bin/…/lib/gcc/arm-none-eabi/10.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: D:/ECE186B/main/build/CY8CKIT-062-BLE/Debug/edge-impulse-sdk/tensorflow/lite/micro/kernels/kernel_util_micro.o: in function tflite::micro::HaveSameShapes(TfLiteEvalTensor const*, TfLiteEvalTensor const*)': D:\ECE186B\main/edge-impulse-sdk/tensorflow/lite/micro/kernels/kernel_util_micro.cpp:24: multiple definition of tflite::micro::HaveSameShapes(TfLiteEvalTensor const*, TfLiteEvalTensor const*)’; D:/ECE186B/main/build/CY8CKIT-062-BLE/Debug/edge-impulse-sdk/tensorflow/lite/micro/kernels/fully_connected.o:D:\ECE186B\main/./edge-impulse-sdk/tensorflow/lite/kernels/kernel_util.h:265: first defined here

There are other errors but they’re the same category as they all say multiple definitions of a function. I looked online, and some solutions I saw was that I have to change my build order, which I am not sure how to within the makefile of the folder. The other solution was to make sure the header files only call the functions while the cc or cpp file gives a definition to the function except comparing the header files related to the files in question to the files from the github, shows they’re the same except with minor differences.
Also, just to let anyone reading this know, the main differences between my two folders are that in the main folder, in the directory of edge-impulse-sdk/tensorflow/lite/micro/kernels, I changed the .cc files related to the functions of the first errors I listed, to .cpp files and added includes to fix other errors until I reached the multiple definitions errors.

Hi @ssjsonic,

The PSoC 6 is not a board we currently support, and my knowledge of that build system is very limited. While it was created for a TI target, perhaps this Makefile can offer some insights into the build order for the SDK: example-standalone-inferencing-ti-launchxl/makefile at main · edgeimpulse/example-standalone-inferencing-ti-launchxl · GitHub