I’m attempting to combine QTouch and Arduino for a project using an Arduino Nano 33 IoT. I’ve generated the QTouch files which include static c-libraries that must be included. However, the compiler is unable to find the files, even though I explicitly tell it where to find them with build_flags
.
Here is my platformio.ini file:
[env:nano_33_iot]
platform = atmelsam
board = nano_33_iot
framework = arduino
build_flags = -w -Ilib -Llib -lqtm_acq_samd21_0x0024_api -lqtm_freq_hop_0x0006_api -lqtm_freq_hop_auto_0x0004_api -lqtm_touch_key_0x0002_api
And the structure of the lib
directory on my Windows machine:
08/01/2023 10:07 AM 6,992 qtm_acq_samd21_0x0024_api.a
08/01/2023 10:07 AM 16,198 qtm_acq_samd21_0x0024_api.h
08/01/2023 10:07 AM 7,212 qtm_common_components_api.h
08/01/2023 10:07 AM 1,704 qtm_freq_hop_0x0006_api.a
08/01/2023 10:07 AM 4,681 qtm_freq_hop_0x0006_api.h
08/01/2023 10:07 AM 1,996 qtm_freq_hop_auto_0x0004_api.a
08/01/2023 10:07 AM 4,952 qtm_freq_hop_auto_0x0004_api.h
08/01/2023 10:07 AM 3,900 qtm_touch_key_0x0002_api.a
08/01/2023 10:07 AM 10,231 qtm_touch_key_0x0002_api.h
And, finally, the error I am getting:
Linking .pio\build\nano_33_iot\firmware.elf
c:/users/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lqtm_acq_samd21_0x0024_api
c:/users/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lqtm_freq_hop_0x0006_api
c:/users/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lqtm_freq_hop_auto_0x0004_api
c:/users/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lqtm_touch_key_0x0002_api
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\nano_33_iot\firmware.elf] Error 1
I am importing the touch library in my main.cpp
file:
extern "C" {
#include "touch/touch.h"
}
which imports the above qtm_*
files directly, or through another sub-import.
Any ideas as to why this is happening?