Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Memory allocation Issue

Hi all!
When we used malloc of size 2**15 in C code, it does not allocate.

uint16_t *out = (uint16_t *)malloc(samples_size * sizeof(uint16_t));
if (!out) {
fprintf(stderr, "Memory allocation for out failed.\n");
exit(1);
}
unsigned int samples_size       = 1 << 15;

DTCM 256kb and also ITCM in our chip (ARM Cortex M7) is 256kb.

CM7_DTCMCR
x 0xE000EF94
0xE000EF94: 0x00000049

CM7_ITCMCR
x 0xE000EF90
0xE000EF90: 0x00000049

It seems that I cannot use all 256kb that I have in DTCM.
Can you give me insights through this?

Based on ARM support, I have to located this (via scatterloading region ARM_LIB_(STACK)HEAP), but I do not know how to do it?
Appreciate your kind support and assistance.

Parents Reply Children