Skip to main content
Associate II
September 16, 2026
Question

Steps for Using EDATA as extended flash in STM32C562RE

How to use EDATA as extended flash in STM32-C562RE?
I disabled the EDATA_EN
Verified CubeProgrammer can read 0x08400000
Created a project from MX2
Added EDATA_CODE (rx) in stm32c562xe_flash.ld in memory block as EDATA_CODE (rx)  : org = 0x08400000, len = 0x10000
Added the following section:
           .edata_code :
            {
                    . = ALIGN(16);
                    KEEP(*(.edata_code))
                   KEEP(*(.edata_code.*))
                    . = ALIGN(16);
            } > EDATA_CODE
Added the simple EDATA_Add() function in main:
__attribute__((section(".edata_code")))
            __attribute__((noinline))
            uint32_t EDATA_Add(uint32_t a, uint32_t b)
            {
                    return a + b;
            }
Called it once from main()
Build it and build was successfull

Before flashing, check the .map lines containing .edata_code and EDATA_Add and foundsomething similar to:
            .edata_code    0x08400000 ...
                                 0x08400000 EDATA_Add

Now, when I am going to flash through cubeprogrammer or cbeIDE, it is not writing to the address 0x08400000 and cubeprogrammer is giving an error 

3 replies

Amine_Jridi
ST Technical Moderator
September 22, 2026

Hello ​@Vishalpandey,

I was able to reproduce the issue on my side. A ticket has been logged to the development team for further investigation. (Internal Ticket number: CDM0065943).

As a workaround if you want to use the EDATA section you can enable the EDATA_EN option byte and link it to 0x09000000 instead of 0x08400000: 

> EDATA_CODE (rx)  : org = 0x09000000, len = 0x10000

 

Thanks,

Amine.

In order 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.
Associate II
September 24, 2026

Thanks ​@Amine_Jridi,

I have used the workaround you suggested and will be waiting for internal ticket to be resolved and use EDATA for 0x08400000

Associate II
October 6, 2026

Hi ​@Amine_Jridi 

Please let me know as soon as the ticket related to this doubt is resolved!

I am waiting for the same. I have use EDATA for 0x08400000 to execute from EDATA area as the execution from 0x09000000 is not possible as per RM0522