Dwm3xxx static library loads itself thrice?

Hi! I’m using dwm3000 in my stm32 project using the libdwt_uwb_driver-m4-hfp-6.0.7.a static library, and running out of flash memory.

As I look into the shared lib using a notepad I can see that the file includes the .obj for two other different types of DW devices, my total flash usage is high, and the static build analyzer sees the dw functions added thrice:

Then, if I straight up remove those two lines from the static library, it goes down tremendously:

That’s an over 50k flash difference, almost half the total size of my stm32’s flash.

Are those libraries necessary for the driver? Is there a “recommended” way to disable those libraries? will just removing them like I did work without breaking the driver? What can I do?

I’m adding the library this way:

Edit: Seems like deleting those lines just screws up the driver and it can’t even build, so the reduced .text might be just the whole driver dying.

In any case, how big is the driver supposed to be when added to a microcontroller?

Hi @TomasIbaceta !

Not sure how you defined your build system, but the Segger projects use defines to include an specific driver, like #define USE_DRV_DW3000.

As you have all three drivers you should have included all of them.

Can you give more details on how you did, or the project you used as a base?

Kind regards!

Hi @carlos.silva !

I did the porting around a year ago, so I couldn’t tell you the exact source. I copied and pasted from an example project of the official page, then changed the port functions to adapt to my particular stm32HAL. I can’t find with a project-wide search the given Directive. Where would I put it? I did not use any particular project-wide preprocessor directives. This is the tree structure of the driver:

| deca_device_api.h
| deca_interface.h
| deca_types.h
| deca_version.h
| libdwt_uwb_driver-m4-hfp-6.0.7.a
| libdwt_uwb_driver-m4-sfp-6.0.7.a

King regards to you aswell!

I think if you go to the DWM3000EVB page you will find better sources for ST.

DWM3000EVB - Qorvo

Look for DWM3000 API under the “Software” label.
STM_Nucleo_F429 is one of the targets.

Kind regards!

Yes, indeed, the Driver+Samples structure of that example is the same as the one i’m running, with the same files. thing is, I’m making text searchs both in the API and the STM_NUCLEO target example and neither have anything anywhere that would make me thing that I can disable the other two boards.

Kind regards!