2020-08-20 07:53 AM
Hi All,
I have created a STM32 application using STM32CUBDEIDE. I'm using STM32F469IH6 for this project.
I have declared few uninitialized variables in one file. I know this affects ".bss" section but it is required in my code. This causes an error saying "section `.bss' will not fit in region `RAM'" in my application". I have few question regarding this?
float C[40000] __attribute__((section ("RO")));
3.Same object file(predict.o) was stored in both '.rodata' and '.bss' sections? I have attached .map file for more details.
Please find the map from below location:
https://drive.google.com/file/d/1AOiWwmsoodgzdnbz0I5Hp1NzAgetNKRA/view?usp=sharing
Thanks in advance,
Hari
2020-08-20 08:23 AM
Post your linker script.
2020-08-20 09:03 AM
2020-08-20 09:03 AM
2020-08-20 09:24 AM
What do you want to achieve? If you want something to be only in the FLASH memory, then just define it as a constant.
2020-08-20 09:32 AM
Hi @Piranha ,
I am facing "RAM overflow problem". I am trying to resolve this issue by changing code to fit in desired section.
My application cannot entirely run with constants to make it fit in FLASH.
I am new to deployment on STM32 Micro-controllers.
It would be great if you respond to above individual questions on the post. This will really helpful for me.
Thanks a lot,
Hari
2020-08-20 09:56 AM
When posting files to Google Drive, make sure the access rights only require the link to download
Is that really the default linker script? Definitely doesn't look viable, did you edit this?
This one would work better
STM32Cube_FW_F4_V1.25.0\Projects\STM32469I_EVAL\Templates\SW4STM32\STM32469I_EVAL\STM32F469NIHx_FLASH.ld
Not sure how 700KB of data would fit in 320KB of RAM which ever way you turn it.
2020-08-20 10:02 AM
Your MCU has 320+64 KB of RAM, but you are trying to put almost 781,3 KB in it. That's just not possible! :)
2020-08-20 12:57 PM
If you qualify the array as const, gcc will put it into the FLASH instead of RAM. You want to provide an initialize for it and it's of course read-only.
JW