DWM1004 Two Way Ranging

I need advice on flash memory size required for Two Way Ranging code. I am doing an experiment using dw1000 for 2-way ranging of multiple nodes in proximity but moving relative to each other. I am planning to implement a token passing scheme so each node can obtain its range from every other node. I was going to design my own dw1000 support board with the stm32f429 ARM microcontroller (2 Mbyte flash) but supply chain is showing over 52 week delivery. I see there is stock of the dwm1004 module which meets my size requirements but the onboard microcontroller has less flash memory. I am wondering if anyone has a sense for whether TWR code will fit in the 32kbyte flash. It seems tight to me.

My system for an ARM M4 based processor is coming in at 44k.
That’s DW1000 drivers (custom not DW supplied), two different (but fairly minimalist) range measurement protocols, both initiator and target device for both. Range calculation and serial IO for receiving configuration settings and outputting results. No position calculation, that’s done in a different part. The code is C++ and includes some standard libraries that probably add a fair amount.

I could probably squeeze it down to 32k if pushed, code size wasn’t a consideration in this since we have 1MB in the part so we still have a number of no longer used features in there. But if I had to allow sectors for bootloaders, serial numbers etc… then that’s a different matter.

So theoretically I’d say yes, it could be done but it would be tight. Generally not the situation you want to be in right at the start of a new project.

Thank you for your thoughtful and insightful reply. I think I will continue looking for options but I may order a couple of these devices just to experiment with my own code. I appreciate your help. Thanks again.