2021-05-25 12:54 AM
STM32F469I discovery board.
How to use internal flash memory address for a particular variables? it's possible ?
I am struggled with this issue.
i am beginner of stm32. help me.
Solved! Go to Solution.
2021-05-26 06:42 AM
2021-05-25 01:06 AM
Not exactly clear what exactly you're trying to achieve here.
Placement of constant data, via attributes and linker script sections?
Or writing semi-permanent data or configuration into section of the flash memory?
2021-05-25 01:19 AM
File: mani.c
unsigned short int FlashArray[8192] __attribute__ ((at((uint32_t)0x08004000)));
File :STM32F469NIHX_FLASH.id
.user_data (NOLOAD) :
{
. = ALIGN(4);
*(.user_data) /* .buffram section */
. = ALIGN(4);
} >FLASH
2021-05-25 01:29 AM
I'd probably avoid the AT method and use a C pointer method, where you make a hole in the FLASH sections in the linker script, with an initial section for the vector table and some initialization code to be directed into.
2021-05-25 02:39 AM
Thanks for your reply. I tried this logic also ,
main.c
const unsigned short int FlashArray[10] __attribute__((__section__(".user_data")));
File :STM32F469NIHX_FLASH.id
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K
SDRAM (rw) : ORIGIN = 0xC0000000, LENGTH = 16M
QSPI (r) : ORIGIN = 0x90000000, LENGTH = 16M
.user_data (NOLOAD) :
{
. = ALIGN(4);
*(.user_data) /* .buffram section */
. = ALIGN(4);
} >FLASH
2021-05-25 09:27 AM
Putting an uninitialized array into flash makes no sense. Flash cannot be used as RAM. You didn't answer Tesla's question on what you are trying to achieve.
2021-05-25 09:34 AM
I'd recommend sub-dividing this into 3 sections, one for the vectors, a hole for your data, and then the residual
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K
2021-05-26 01:54 AM
can i allocate QSPI memory for my uninitialized array? instead of RAM?
2021-05-26 06:42 AM