DWM1001-DEV - Can't build example

Hi,

I’m new here! It’s been a month since we handed me some DWM1001-DEV modules for my project, asking me to make it work from scratch since they never used them before. For about the same amount of time, I’ve read every piece of information I could find. But when trying to apply, I can’t even build the simplest example. I’ve tried with multiple versions and all the example codes I found. Although the decawave-examples files can sometimes build, most of the file (such as dim-simple) just fail to build with 0 informations about why it did fail (see screenshot).

Can someone help me? Even a basic ideas would be appreciated.

Thanks a lots,
iQuad

Hello,

In the Output section of your window, can you change it from “Tasks” from to “Output”? That will give more clarity on the issue you are facing.

Did you install the GNU Tools Arm Embedded 5.4 2016q3? Downloads | GNU Arm Embedded Toolchain Downloads – Arm Developer

I was able to build the dwm-simple example:

Thanks for replying that fast!

Here is the output section of the build error :

To answer your question, I did install the Toolchain. Note that I do have another project coming from the decawave-example repository working just fine.

By the way, I do not seem to have the same project as you, I found my version in the Decawave DWM1001 on-board package 2.0.

Here is the path of the example that I built from my previous screenshot: DWM1001_DWM1001-DEV_MDEK1001_Sources_and_Docs_v11\DWM1001\Source_Code\DWM1001_on_board_package\DWM1001_on_board_package_R2.0\dwm\examples\dwm-simple

You can delete or rename the output folder and then try to do Build → Rebuild Solution in SES.

Ok, I have the same file as you. I just tested deleting the output directory, the compiler seem to miss the .o it is supposed to create when compiling dwm-simple.c

Do you have an idea of how to configure the output path of the compiler?

Hello,

I just realized that you are using macOS (I think) and from your last screenshot, it is looking for the GNU toolchain in C:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\bin which is the default location where the toolchain is installed on Windows. Please right click on the Solution on the left side and click options. Then go to Code → Build and change the Toolchain directory to the bin folder of your 5.4 2016q3 install.

1 Like

Ooooh, that’s some very good eyes you’ve got there!

You are totally right, it was the wrong path. Still I’ve got compilation errors :

When seeing your path to /bin I saw that my files are not named the same way, so I went to see the download page of GNU Arm Toolchain, is it possible that the Toolchain is not available on Mac with M1 Apple Silicon?

Yeah, from what I found, GNU Arm is not yet available on AArch64 architecture on Mac.

However, it is available on GNU/Linux, so maybe a VM would do the trick?

This could be the case. Unfortunately, I don’t have a Mac to test this on. If you are able to try using a Linux VM, please report back if that resolves the issue.

1 Like

Since I installed a VM on a Mac with AArch64 architecture, my ubuntu is also AArch64, but this time it is compatible with the last update of the Toolchain. I launched the project and put the path of the Toolchain in SEGGER to the /bin of the Toolchain I downloaded.

Still doesn’t build :cry:

Hello,

Unfortunately, I don’t have any other suggestions as this software requires a “PC with Microsoft Windows OS” as mentioned in the DWM1001 Firmware User Guide.

Hi, I’m returning from hell to update this thread!

I’ve been trying many things, in the end what seem to put me in a better place was to use an already well set environment by copy/pasting the example in an other SES project. From there, I added in “Options > Preprocessor > User Defined Path” the dmw.h file and other important dependencies to make it compile.

An other problem came by at that very moment. Even though SES knows the path to dmw.h (and dwm.o), it doesn’t seem to know where he can find the binaries associated to it. I guess that it is searching for the dmw.c file, but I also guess that it is not included in the example for copyright purposes.

I’m not familiar with those specific tools and build chain but look at the linker settings. Something along the line of additional includes or additional libraries.
That’s where setting to tell it to include a pre-built library in the final output will be.

Hello,
Thanks for your answer, I added the required file to the Linker settings but functions are still not recognized. So, after banging my head on the wall for a couple more hours, I decided to go on the same configuration as @akash, unfortunately I still have an error

C:/Users/quent/OneDrive/Bureau/DWM1001_DWM1001-DEV_MDEK1001_Sources_and_Docs_v11/DWM1001_DWM1001-DEV_MDEK1001_Sources_and_Docs_v11/DWM1001/Source_Code/DWM1001_on_board_package/DWM1001_on_board_package_R2.0/dwm/examples/dwm-simple/output/linker/dwm-simple_fw2.map: No such file or directory

For anyone looking for the same thing as me, I finally found the solution.

It is possible to build all examples from Decawave on-board package on Mac, no need for a Windows operating system :

First, I was using the gcc compiler that was inside of the Segger IDE, not the ARM Toolchain I installed (following the Firmware guide from Decawave). So in Solution > Options… > Toolchain, use the ARM Toolchain under /Applications/ArmGNUToolchain/path/to/bin.

Then, there is a problem with the linker command, which causes the IDE to overlook the .o files. Under Solution > Options… > Code > External Build > Link Command, I had to change from

“$(ToolChainDir)/arm-none-eabi-gcc” -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wl,–gc-sections -Wl,-static -Wl,-n -g -nostdlib -o “$(SolutionDir)/output/linker/$(SolutionName)_fw2.elf” “$(SolutionDir)/output/compiler/*.o” “$(SolutionDir)/…/…/lib/dwm.o” “$(SolutionDir)/…/…/lib/libdwm.a” -nostartfiles -L “$(SolutionDir)/…/…/lib” -Wl,-Map,“$(SolutionDir)/output/linker/$(SolutionName)_fw2.map” -T “$(SolutionDir)/…/…/lib/target_s132_fw2.ld” -lm -lgcc -lc -lnosys

to :

“$(ToolChainDir)/arm-none-eabi-gcc” -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wl,–gc-sections -Wl,-static -Wl,-n -g -nostdlib -o “$(SolutionDir)/output/linker/$(SolutionName)_fw2.elf” “$(SolutionDir)/output/compiler/$(SolutionName).o” “$(SolutionDir)/…/…/lib/dwm.o” “$(SolutionDir)/…/…/lib/libdwm.a” -nostartfiles -L “$(SolutionDir)/…/…/lib” -Wl,-Map,“$(SolutionDir)/output/linker/$(SolutionName)_fw2.map” -T “$(SolutionDir)/…/…/lib/target_s132_fw2.ld” -lm -lgcc -lc -lnosys

See the *.o that changed, in fact, the linker wasn’t able to see it as a wildcard.

Hope it helps :slight_smile:

Hello @iQuad,

I tired everything but I am still unable to run the code
I have this error
Rebuilding ‘dwm-simple’ from solution ‘dwm-simple’ in configuration ‘dwm1001_configuration’
2> Compiling ‘dwm-simple.c’
6> Locating Linker Script File
6> Linker script file ‘./…/…/lib/target_s132_fw2.ld’ does not exist.
6> Linking ‘dwm-simple_fw2.elf’
6> arm-none-eabi-gcc: error: C:/Users/bente/Desktop/workpls/DWM1001-Real-Time-Localization-System/dwm-simple/…/…/lib/dwm.o: No such file or directory
6> arm-none-eabi-gcc: error: C:/Users/bente/Desktop/workpls/DWM1001-Real-Time-Localization-System/dwm-simple/…/…/lib/libdwm.a: No such file or directory
6> Build failed
Build failed

Please help me.

-kaycee