Memory used by DMCP

This is where developers can exchange ideas and ask questions relevant to the DM42 firmware.

Please note that Swiss Micros staff are unable to provide answers here as a general rule. This is intended as a community-driven forum.
Post Reply
c3d
Posts: 54
Joined: Fri Sep 02, 2022 2:24 pm

Memory used by DMCP

Post by c3d »

I was wondering if someone from SwissMicros could share what memory DMCP needs, and when it allocates it.

I've observed variations of at least 8K in the value returned by sys_free_mem(), but it goes up and down, and I don't see why. Typically, leaving 8K free initially, I see sys_free_mem drop to about 6K (6656 bytes to be precise, which is 6.5K), with ocasional drops down to 4K (4592B to be precise, so 2064 bytes were temporaril allocated), and sometimes, I get 0 and the system hangs.

I am not explicitly allocating memory in my program, except a big chunk at the beginning. So I wonder where these 8K of memory are going. I am not using any DMCP display function anymore, except LCD refresh.

Thanks
User avatar
deetee
Posts: 54
Joined: Mon Jul 22, 2019 8:01 am
Location: Vienna

Re: Memory used by DMCP

Post by deetee »

Maybe that helps:

There is some memory allocation in the linker file stm32_program.ld:
FLASH 704k
RAM 8k
QSPI 2048k

In my file is also a commented allocation with RAM 96k.

I never touched this numbers - for big data areas I use malloc.

Regards
deetee
Post Reply