cancel
Showing results for 
Search instead for 
Did you mean: 

How can I allocate .text section to FLASH and FLASH2 at STM32CUBEIDE (STM32H743VGT6)

SDFSDFDSF
Associate II

STM32H743VGT6 has 1M FLASH, but the flash memory is divided into two independent banks.

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

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

 

Now my code size is bigger.

The section .text is over 512K.

So,How can I allocate .text to FLASH and FLASH2???

2 REPLIES 2
BarryWhit
Senior III

Why do you think the independent banks are a problem? if you're trying to link a large program and getting an error or warning, you should shows us what it is. If you're not getting an error, what's the problem?

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.
Rim LANDOLSI
ST Employee

Hello @SDFSDFDSF ,

 

Please let us know if you have any build errors.
Otherwise, allocating the .text section to both FLASH and FLASH2 requires modifying the linker script to specify the memory regions and how the .text section should be allocated.
You can add .text sections for FLASH2 as follows:

.text2 :
  {
    . = ALIGN(4);
    *(.text2*)
    . = ALIGN(4);
  } > FLASH2

 

Hope this helps!

Thanks,

Rim.