cancel
Showing results for 
Search instead for 
Did you mean: 

Download elf to STM32H743 failed when code over 512K , STM32CubeIDE 1.16.0

SDFSDFDSF
Associate II

I use STM32CubeIDE 1.16.0 to do project and use STM32H743.when my code is over 512K, I re-write ld file,but download is failed.

But I use STM32CubeProgrammer to download  the same elf file,it worked!!! 

 

So what's wrong about it ?

12 REPLIES 12

>Why FLASH2 start address is 0x08100000?

0x08100000 is base address of bank2.

>0x08000000 ~ 0x08100000 is 1024kbytes.

Yes. There's the gap between the banks.

 

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

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

 

1. STM32H743VGT6 flash range is 1024K. And the address is :

     BANK1   0x08000000~ 0x08080000    512K

     BANK2   0x08100000~0x08180000    512K

    Is that right?

 

2.  If so,whtn section .text is big then 512K,I trid modified ld file like this ,but report error:

      >> FLASH | FLASH2

    So how can I modified ld file???

Pavel A.
Evangelist III

PavelA_0-1723045765132.png

 

>> FLASH | FLASH2

This isn't valid syntax.

To use the FLASH2 you may need to analyze the map file and distribute the source modules between FLASH1 and FLASH2. The ld file will be more complicated, unfortunately. Maybe if you define a single FLASH of 1.5MB, and put a section of 512K at absolute address 0x8080000 before defining other normal sections, it could work too. I haven't tried this for GNU linker.

Or just define all RAM as non-executabe ("rw") and both flash regions as "rx", and remove from .ld file definition of all sections that should go to flash. Then the linker could automatically place stuff.