m33-f libmorse using dynamic memory allocation

mm-iot-sdk version: MM-IoT-SDK 2.9.7 release (MM6108)
target: stm32u575

We are developing application using mm-iot-sdk that is free of dynamic memory allocation. I therefore overridden dynamic memory allocations call and put assert there to see if its being called. I have seen this being called whenever mmwlan_boot is called. I further confirmed by looking at .map file generated and I can find calloc being called inside libmorse.a:

/mm-iot-sdk/framework/morselib/lib/arm-cortex-m33f/libmorse.a(bip.o) (calloc)

Can I know what is calling dynamic allocation and how can I avoid it?

Hi @abbas , thank you for catching this.

To be able to use libmorse without any dynamic allocation you will need to override the default allocators (mmosal_alloc) to a custom one which you will need to write.

It’s worth nothing that:

  1. We have found 1 or 2 instances in morselib where the stdlib malloc/calloc were used, and that will be fixed in an upcoming release
  2. This will only account for the allocations in libmorse not any third-party libs (i.e. mbedtls)

Thanks @cmistry for the response.