2024-02-23 06:37 AM
Hello,
I program STM32H743ZGT6 with STM32CUBE IDE Version: 1.12.1.
The FLASH1 is full and i want to use FLASH2 => during the compilation i have an error (of course).
How can i use FLASH2 ?
At the start i grown up the FLASH1 as below but i think its' not adising :
/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 768K
FLASH2 (rx) : ORIGIN = 0x081C0000, LENGTH = 128K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}
Looking forward to your reply
Best Regards
Malo
2024-02-23 06:44 AM - edited 2024-02-23 06:45 AM
> during the compilation i have an error (of course).
Plese provide the error. The crystal ball is hard to use.
There's nothing wrong with the code you posted, except you renamed FLASH1 to FLASH possibly? (and if so, why?)
2024-02-23 09:19 AM - edited 2024-02-23 09:33 AM
Hello,
If I would summarize what you have used as Flash:
In yellow what you have used as Flash. My question is:
Are the flash regions that kept unused (in green), is intentional?
If FLASH1 (FLASH) is full you need simply to stretch its size. There is 128K after which is free unless it is used for something else.
Otherwise, to my knowledge, there is no method to let the tool to bond a separated and not contiguous regions (except, I think, IAR..)
2024-02-25 11:52 PM
Hello,
The error displayed during the building is as below :
Sorry, there is a mistake in my explication :
when the error appears the FLASHs is set as below :
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 384K
FLASH2 (rx) : ORIGIN = 0x08100000, LENGTH = 512K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
The lenght of the FLASH is set to 384K because 128K is reserved to the BOOTLOADER (in my application)
When is set as below i have no error (in the .ld file) :
/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 768K
FLASH2 (rx) : ORIGIN = 0x081C0000, LENGTH = 128K
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}
But i think it's not authorize because i read these comments is the reference manual :
So, i suppose it's not authorise to grow up the FLASH1 in my case. What is your opinion about his subject ?
Best Regard
Malo
2024-02-26 12:15 AM
This is what you have to take into account (From the datasheet Table 2). The flash size config depends on the device:
For the config 2 x 512k the flash is not contiguous. So you are limited to 512k for each bank and you cannot bond them. For the second case: 2 x 1M: you can use all the 2M without issue. The two "1M" are contiguous.
2024-02-26 12:36 AM
Ok,
Thank your for your reply.
In my case the FLASH1 is full but the FLASH2 is empty => How can i used the FLASH2 ?
Best Regard
Malo
2024-02-26 12:44 AM
If you have 2x1M device, you can use all the flash so simply stretch the region Flash1. If it overlaps with Flash2 move it in the next contiguous address.
2024-02-26 12:59 AM
In my case i have 2x512KB (STM32H743ZGT6) so it's not contiguous. It's possible to use the FLASH2 with this device ?
2024-02-26 01:14 AM
It's not possible if the flash region you configured in linker file exceeds 512kB.
Already said:
"For the config 2 x 512k the flash is not contiguous. So you are limited to 512k for each bank and you cannot bond them."
2024-02-26 01:23 AM
Is it possible to declare or define some data in FLASH2 ?