cancel
Showing results for 
Search instead for 
Did you mean: 

Flash memory as ram

kchin.2
Associate II

I want to use some part of flash memory as ram but i am getting below error

C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: Radar_Data_Acquisition_FW.elf section `user_settings_section' will not fit in region `RAM'

C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: Radar_Data_Acquisition_FW.elf section `user_settings_section' will not fit in region `FLASH'

C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 389856 bytes

C:/ST/STM32CubeIDE_1.13.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 194904 bytes

collect2.exe: error: ld returned 1 exit status

 

what i configured:

MEMORY

{

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

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

RAM2 (xrx) : ORIGIN = 0x804E000, LENGTH = 200K

}

.user_settings_section (NOLOAD):

{

. = ALIGN(4);

KEEP(*(.user_settings_section)) /* Config section */

. = ALIGN(4);

} >RAM2

 

in .c code

uint16_t myarray[200000] __attribute__((section("user_settings_section"), used));

 

can anyone please help me on this.

 

1 ACCEPTED SOLUTION

Accepted Solutions

>>is it possible ?

No, not in the way you imagine it working.

It is slow and has width issues, although you don't identify the part in question. Why can't you just output to the UART? Probably the same reason the FLASH won't work. You've got some other fast backing store you can use?

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

View solution in original post

3 REPLIES 3
TDK
Guru

FLASH cannot be used as RAM.

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

i red dma can access flash memory i want to store adc samples to flash and from flash using dma i want to trasfer data via uart

is it possible ?

 

>>is it possible ?

No, not in the way you imagine it working.

It is slow and has width issues, although you don't identify the part in question. Why can't you just output to the UART? Probably the same reason the FLASH won't work. You've got some other fast backing store you can use?

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