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
AScha.3
Chief II

Hi,

Why you set the flash start not at the real start address ? (You loose first 128KB.)

> FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 384K

+ set your bootloader to bank2 ?

or:

If need bootloader at bank1, 

set your program to bank2 :

FLASH (rx) : ORIGIN = 0x08100000, LENGTH = 512K

 

btw

If this product is just for yourself, not for production in quantities, you could try the "2MB" setting :

FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 768K

This uses the 2x1MB flash, which is on chip, but you have a version with only 2x512K tested and guaranteed to work. But if your lucky, all 2 MB flash work fine - just try it.

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

You can separate data (used as eeprom) in FLASH2 and code in FLASH1.

But your situation still not clear.

You have a device of 2 x 512k of flash and in your linker file, you defined the first flash region that starts at 0x08020000 with size of 768K which is incoherent with your device usage. Even physically on the die there is the full 2M of flash but we cannot guarantee the second 1M as it was not tested.

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.

Yes, its was a mistake

The FLASH is defined as below in my project

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 and start to 0x08020000 because 128K is reserved to the BOOTLOADER (in my application)

 

What is the metode to separate data (used as eeprom) in FLASH2 and code in FLASH1 ? Or do you have an example ?

What do you mean by "Data"? logs? or what?

If it's the case see: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/NUCLEO-H743ZI/Applications/EEPROM/EEPROM_Emulation

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.
SofLit
ST Employee

Also why you don't:

FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 384K  --> stretch this region
FLASH2 (rx) : ORIGIN = 0x08100000, LENGTH = 512K --> reserve 128K here to put your bootloader

 

 

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.
NTaha.1
Associate II

Hello, you can maybe add this section to the .ld file 

.usr_part :
  {
   KEEP(*(.usr_part))
  } > FLASH2

and then this attribute: 

__attribute__ ((section (".usr_part")))

in the function decloration. 

Unfortunately, it's not possible to deplace the BOOTLOADER => the project has already been industrialised and sent to customers. So we can't change the position of the BOOTLOADER.

But, the solution might be to use the FLASH2 for my application and keep the FLASH1 for BOOTLOADER.

My application is place in the 384KB sector as explain before. If my application is place in the FLASH2, 512KB will be available.

I will try your solution NTaha.1

 

Hello NTaha.1,

 

Thank you for your response. your solution seems to work. I have tested with some function declared in FLASH2and now i have this result :

MHna1_0-1710143876771.png

 

 

The size used by FLASH2 grow up and the size free for FLASH1 grow up.

Thank you again 🙂