espressif / esp-dsp

DSP library for ESP-IDF
Apache License 2.0
465 stars 87 forks source link

ESP-DSP optimized functions can't be found during linking(IDFGH-5484) #31

Closed ahmedwahdan closed 3 years ago

ahmedwahdan commented 3 years ago

Environment

Problem Description

After adding ESP-DSP component to esp-idf components, only ANSI C function can be compiled, the optimized functions couldn't be found

image

Expected Behavior

Be able to use optimized DSP functions

Steps to reproduce

  1. Clone DSP component to idf components
  2. configure the DSP to use optimized functions

image

  1. Build any DSP example

Build output: build_output.txt

igrr commented 3 years ago

@ahmedwahdan could you please attach your hello_world_main.c, your main component CMakeLists.txt, and full build output (text, not screenshot)?

ahmedwahdan commented 3 years ago

I'm compiling the dsp iir example

igrr commented 3 years ago

That's odd, the screenshot in your first post shows the filename "main/hello_world_main.c", which isn't present in the IIR example of esp_dsp. So it looks like you have either renamed some files, or copied the contents of one example into the other. Hence the request to share the files you are actually using, plus the build log.

ahmedwahdan commented 3 years ago

@igrr image replaced, build output attached.

ahmedwahdan commented 3 years ago

Any updates?

igrr commented 3 years ago

Sorry for the late response @ahmedwahdan, it is a bug we introduced in https://github.com/espressif/esp-dsp/commit/901d03f4f92e0661564598f3b9e939c678481d7c. CONFIG_IDF_TARGET_ARCH_XTENSA is not defined in IDF 4.2.x, and was only added in IDF 4.3.

ahmedwahdan commented 3 years ago

No problem, What about the V3.3, it seems that the sdkconfig.h is included from different path which doesn't include CONFIG_IDF_TARGET_ARCH_XTENSA

igrr commented 3 years ago

Yes, it's the same for v3.3, CONFIG_IDF_TARGET_ARCH_XTENSA is not defined there. This issue in esp-dsp happens with every IDF version older than v4.3.