cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create RAM section for stm32l151rd? (It has only 1 Ram area)

G_A.
Associate II

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.

4 REPLIES 4

The linker script allows you to describe and decompose they memory anyway you want.

I​f 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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
G_A.
Associate II

Thank you for your answer! Do I need to use mpu so that the holes I create are not used by the linker?

TDK
Guru

> Do I need to use mpu so that the holes I create are not used by the linker?

No

If you feel a post has answered your question, please click "Accept as Solution".
Nikita91
Lead II

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.