Fails to compile DWM3000 sample on Raspberry Pi

Hello,

I try to compile and run DWM3000 sample code on Raspberry Pi.
So, I setup the environment with reading README_RPI.txt in the DWM3000_releace_v1.1 but the multiple definition error occured.
I will attach the error log (posting the error log here will the message has been judged as spam, I will temporarily share a link to the text file)

Hardware configuration

  • Raspberry Pi Model 3B + (Raspbian OS installed)
  • Waveshare ARPI600 Arduino Adapter for Raspberry Pi
  • DW3000 Arduino Shield

Thank you.

error log: Google Drive: Sign-in

I was able to create a topic and I’ll post the error log.

[email protected]:~/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API $ make
make -j 4 -f Makefile.rpi
make[1]: Entering directory ‘/home/pi/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API’
Building target output/libdw3000/libdw3000.so …
cc -shared -g -fPIC -Wall -Wextra -pedantic -std=c11 -D _DEFAULT_SOURCE -DRPI_BUILD -O2 -Os -g -pipe -W -fstack-clash-protection -fstack-protector output/libdw3000/./Src/MAC_802_15_8/mac_802_15_8.c.o output/libdw3000/./Src/MAC_802_15_4/mac_802_15_4.c.o output/libdw3000/./Src/decadriver/deca_device.c.o output/libdw3000/./Src/platform_rpi/deca_spi.c.o output/libdw3000/./Src/platform_rpi/deca_sleep.c.o output/libdw3000/./Src/platform_rpi/port.c.o output/libdw3000/./Src/platform_rpi/deca_mutex.c.o -Wl,-soname -Wl,libdw3000.so.4.0 -o
./output/libdw3000/libdw3000.so.4.0.0 &&
ln -sf libdw3000.so.4.0.0 ./output/libdw3000/libdw3000.so.4.0 &&
ln -sf libdw3000.so.4.0 ./output/libdw3000/libdw3000.so
/usr/bin/ld: output/libdw3000/./Src/platform_rpi/deca_sleep.c.o:/home/pi/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API/./Src/platform_rpi/port.h:45: multiple definition of dwt_lock'; output/libdw3000/./Src/platform_rpi/deca_spi.c.o:/home/pi/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API/./Src/platform_rpi/port.h:45: first defined here /usr/bin/ld: output/libdw3000/./Src/platform_rpi/port.c.o:/home/pi/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API/./Src/platform_rpi/port.h:45: multiple definition of dwt_lock’; output/libdw3000/./Src/platform_rpi/deca_spi.c.o:/home/pi/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API/./Src/platform_rpi/port.h:45: first defined here
/usr/bin/ld: output/libdw3000/./Src/platform_rpi/deca_mutex.c.o:/home/pi/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API/./Src/platform_rpi/port.h:45: multiple definition of `dwt_lock’; output/libdw3000/./Src/platform_rpi/deca_spi.c.o:/home/pi/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API/./Src/platform_rpi/port.h:45: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile.rpi:512: output/libdw3000/libdw3000.so] Error 1
make[1]: Leaving directory ‘/home/pi/Documents/DWS3000_Release_v1.1/Software/DW3000_API/API’
make: *** [Makefile:11: rpi] Error 2

Hello Takuro Yoneda,

I hope you are doing well. Did you solve this problem? I’m encountering the same error while working with my DW3000 module. To solve this error, I have tried many online available solutions but none of them worked.
If you managed to solve it, kindly let me know. Any help from you end will be highly appreciated.

Kind Regards,

Maida