cancel
Showing results for 
Search instead for 
Did you mean: 

FLASH2 STM32h743

MHéna.1
Associate II

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 ?

MHna1_0-1708698925226.png

 

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

17 REPLIES 17
TDK
Guru

> 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?)

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

Hello,

If I would summarize what you have used as Flash:

SofLit_0-1708708123924.png

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..)

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hello,

 

The error displayed during the building is as below :

MHna1_0-1708933497787.png

 

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 :

MHna1_1-1708933804954.png

 

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

This is what you have to take into account (From the datasheet Table 2). The flash size config depends on the device:

SofLit_0-1708934859592.png

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.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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

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. 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

In my case i have 2x512KB (STM32H743ZGT6) so it's not contiguous. It's possible to use the FLASH2 with this device ?

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."

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Is it possible to declare or define some data in FLASH2 ?