cancel
Showing results for 
Search instead for 
Did you mean: 

How to change memory areas in CubeIDE?

Vlad Mishustov
Associate

If I need to change memory areas in project (for example for Read-only memory I need 0x8080000 start, 0x40000 size), how can I do in in CubeIDE ?

(addition) I have found Build analyzer, but the fields are not changeable, only view.

1 ACCEPTED SOLUTION

Accepted Solutions
OStan.1
Associate

Hi VMish,

I believe that by now you would have found a solution to your problem, but like me, there must be others too, who are seeking a solution. I am using both CubeIDE and Keil MDK. Keil has a GUI based solution to this problem to set the memory regions, but I didn't find one in CubeIDE, so I'm thinking there must be a plugin or something that helps in this matter.

Anyway, for now, my solution requires the user to simply modify the LinkerScript.ld file located in the project. LinkerScript.ld will be renamed however to reflect the used MCU, ex. STM32F030F4PX_FLASH.ld. In this file you have:

/* Memories definition */

MEMORY

{

 RAM  (xrw)  : ORIGIN = 0x20000000,  LENGTH = 4K

 FLASH  (rx)  : ORIGIN = 0x8000000,  LENGTH = 16K

}

Modify, save and build. That should do it.

I hope it helps,

OG.

View solution in original post

1 REPLY 1
OStan.1
Associate

Hi VMish,

I believe that by now you would have found a solution to your problem, but like me, there must be others too, who are seeking a solution. I am using both CubeIDE and Keil MDK. Keil has a GUI based solution to this problem to set the memory regions, but I didn't find one in CubeIDE, so I'm thinking there must be a plugin or something that helps in this matter.

Anyway, for now, my solution requires the user to simply modify the LinkerScript.ld file located in the project. LinkerScript.ld will be renamed however to reflect the used MCU, ex. STM32F030F4PX_FLASH.ld. In this file you have:

/* Memories definition */

MEMORY

{

 RAM  (xrw)  : ORIGIN = 0x20000000,  LENGTH = 4K

 FLASH  (rx)  : ORIGIN = 0x8000000,  LENGTH = 16K

}

Modify, save and build. That should do it.

I hope it helps,

OG.