Request guidance on new model creation for low memory footprint

Hi,

I am required to develop a new model, upon design considerations I considered that my main BLE-Mesh model will have 3 independent sub-models each designed as per functionality.

Now I realized that I am severely constrained in terms of memory available on my embedded device, that is the internal flash memory.

My application build file (.bin) is already 260kb & I cannot move over 300 kb.

So to reduced the memory overhead on my application build file in this case, I have 2 queries:

1. Rather than having 3 independent sub-models, can I club the procedures of 3 independent sub-models into ab single model..? Will it save me much need memory on build file..?

2. How can I estimate the amount of memory the model will add on final build file (.bin)..?

Thanks,
Ubaid

Parents
  • Hi,

    The memory footprint can be difficult to estimate, but depending on the IDE and toolchain you might get information about the resulting size from each individual c file. Changing the models might affect the resulting flash size, yes, but it all depends on what changes you do and how you do them. If it results in more code, then it can use more space. If it results in less code, then it can use less space. It also depends on optimization, and how much the compiler can optimize the code. There might be surprises there, maybe going from three models to one (more complex) model result in a bigger executable.

    I recommend having a look at the microbit configuration files in the <ncs root folder>/zephyr/samples/bluetooth/mesh/ folder, as those contain settings resulting in a minimal build, both in terms of flash usage and in RAM usage. Some settings affect flash more than RAM, and vice versa.

    Please note that we are entering Easter vacation in Norway. You may have to wait until next week for answers to any follow-up questions.

    Regards,
    Terje

  • Hello ,

    Thanks for the suggest, I am going with the multiple models approach.

    ncs root folder>/zephyr/samples/bluetooth/mesh/

    As suggested in the link "developer.nordicsemi.com/.../app_memory.html" regarding BLE optimization, can you please suggest how do I optimize my build file for BLE-Mesh builds..?

    Thanks

Reply Children
Related