Variables on fixed address in flash

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Variables on fixed address in flash

    Hello,

    my programm is stored at the start of flash memory at 0x8000000.
    Some data should be stored in a different sector at address 0x8060000.

    The Data is not flashed to the specific positon while using JLink. If i use Stlink, the data is flashed correct.

    A demo programm is attached.

    main.c:
    char __attribute__((section (".myString"))) string[] = "String not programmed by JLink";

    linker file:
    STRING (rx) : ORIGIN = 0x8060000, LENGTH = 128K

    .stringBlock 0x8060000 :
    {
    KEEP(*(.myString))
    } > STRING

    I have also tested the programm with Ozone. No data at the desired position in flash.

    Regards,
    Bastian
    Files
  • Hello,

    I looked at your project and noticed that you are using the STM32F446ZC.

    The STM32F446ZC has a flash memory range from 0x8000000 to 0x803FFFF (256KB).

    This means that the address 0x8060000 you are trying to program is not valid.

    This might explain why the Jlink is not programming the data. However, I don't understand why the Stlink is able to flash this data correctly.

    Could it be that you meant to select the STM32F446xE, which has 512KB of flash memory?

    Best regards,
    Simon
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.