Using CMSIS-NN placed in the lib folder: \lib\tensorflow-lite\third_party\cmsis_nn
→ When compiling, the following error occurs:
Linking .pio\\build\\portenta_h7_m7\\firmware.elf
.pio\\build\\portenta_h7_m7\\libb7a\\libtensorflow-lite.a(arm_elementwise_add_s8.c.o): In function `arm_elementwise_add_s8': arm_elementwise_add_s8.c:(.text.arm_elementwise_add_s8+0x11c): undefined reference to `\__sadd16’
arm_elementwise_add_s8.c:(.text.arm_elementwise_add_s8+0x12a): undefined reference to `__sadd16' arm_elementwise_add_s8.c:(.text.arm_elementwise_add_s8+0x138): undefined reference to `\__sadd16’
arm_elementwise_add_s8.c:(.text.arm_elementwise_add_s8+0x14a): undefined reference to `__sadd16' .pio\build\portenta_h7_m7\libb7a\libtensorflow-lite.a(arm_depthwise_conv_3x3_s8.c.o): In function `arm_depthwise_conv_3x3_s8’:
arm_depthwise_conv_3x3_s8.c:(.text.arm_depthwise_conv_3x3_s8+0x396): undefined reference to `__smlabb' arm_depthwise_conv_3x3_s8.c:(.text.arm_depthwise_conv_3x3_s8+0x3aa): undefined reference to `\__smlatt’
arm_depthwise_conv_3x3_s8.c:(.text.arm_depthwise_conv_3x3_s8+0x3ba): undefined reference to \`\__smlabb’
I’ve tried many methods and used many different CMSIS-NN libraries but haven’t been able to fix it. I need help.
I already made it public, I don’t understand why you can’t access it :((
I’ve fixed this error, although it’s not perfect (create a header file .h myself).
Thank you for your help.
Sorry maxgerhardt, sivar2311, for bothering you again.
Cc: All members
Although I created my own intrinsic functions for __smlabb, __sxtb16… to build successfully, the model’s inference results are inaccurate. I searched online (GPT chat, web) and found that self-defined functions lead to functions that don’t work according to CMSIS’s nature.
I tried changing the gcc toolchain to newer versions like gcc 9.3, 10.3, 12.2, 14.x (platform_packages = toolchain-gccarmnoneeabi@~1.120201.0), the build was successful, but when I turned on Serial Monitor, the COM port was not visible.
Additionally, I’ve set many flags in platformio.ini to enable SMSIS DSP, but the result is still the same error.
I’m sending the project link again (if the git file is broken, please download from Google Drive) and I’d appreciate it if you could help me fix it.