2022-04-17 05:20 AM
Hello,
I know that it is possible for mcu which has several ram areas such as RAM_D1, RAM_D2 like STM32H7. STM32l1 has only one RAM. Because I can not divide RAM for some important data. But I saw an STM32L1 example created on KEIL and divided some adresses of this 1 RAM. Is it possible?
Thanks in advance.
2022-04-17 05:42 AM
The linker script allows you to describe and decompose they memory anyway you want.
If you want to divide one 16KB RAM section into two 8KB ones, you can do that. You can create holes in memory the linker is unaware of, and won't use.
2022-04-17 05:50 AM
Thank you for your answer! Do I need to use mpu so that the holes I create are not used by the linker?
2022-04-17 06:37 AM
> Do I need to use mpu so that the holes I create are not used by the linker?
No
2022-04-17 11:53 AM
You can specify in the code which sections the data should go into. Then the linker script allows you to specify where to place the sections in memory.
The linker puts the data in the sections, and places the sections where you specify. If there's a place where you don't put anything, it's a hole.