cancel
Showing results for 
Search instead for 
Did you mean: 

Hi all.

SGoel.2
Associate III

I have created a project in IAR Embedded Workbench and it is working alright but now due to some reasons I have converted and debugging the same project with same buffer values in STM32cubeide but in this compiler it is showing "region RAM overflowed by 7256 bytes" and also i have modified the .ld file according to the .icf file of IAR embedded workbench.

I have attached the both files. Please help me !!!

1 ACCEPTED SOLUTION

Accepted Solutions
Piranha
Chief II

As for topic - do what others suggested and review the .map file with Amap.

Post edited to adhere community guidelines.

View solution in original post

6 REPLIES 6
Bob S
Principal

Unintentional probably, but the subject line is "HI All" - not very helpful. Change it if you can.

Look at the map files from both Keil and CubeIDE and see what is getting put in RAM. Looks like you have the same RAM size in both linker files.

Pavel A.
Evangelist III

Remove the .DWORD_ALIGNED_BLOCK. It contains duplicate symbols.

Might have to fane extra RAM so the linker gets closure, and then inspect whose taking the memory

IAR perhaps better at dead-code elimination or folding of things.

Determine if you're initializing RAM based structures/variables that could be static constants, and left/held in FLASH.

Watch the scope of things. Avoid large auto/locals within main() as this never exits.

Try to use auto/locals for initialization, or where the memory doesn't need to be static/global for all eternity. The stack may need to be bigger to accommodate this, but again watch call-trees and scope expectations.

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

yes, I am using stm32g071cbt6 mcu which has 36K ram & 128K flash memory and same values are their in both files.

Piranha
Chief II

As for topic - do what others suggested and review the .map file with Amap.

Post edited to adhere community guidelines.

Thankyou, Now I have resolved my issue​.