[SOLVED] J-link base without erase

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

  • [SOLVED] J-link base without erase

    Hello,
    we have a J-link base which we want to use to program a stm32l0 from a .hex file.
    to not erase the EEPROM content, we need to program without erasing.
    using J-flash lite or even J-link.exe and also the gdb option always erase the memory before writing.
    how can we flash the device without erasing and without buying a j-flash license?

    thanks,
    Michael Schmid
  • Hello Michael,

    Thank you for your inquiry.
    Generally J-Link will only erase sectors that have changed with the image you are trying to program.
    So just make sure that the .hex you are trying to program does not have any data in the EEPROM section and you are good to go.
    For simple editing of hex files you can use our software J-Flash even without a license.

    Best regards,
    Nino
    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.
  • thanks for that. actually I intentionally write to some EEPROM sectors, while the other sectors are still erased as well. Here is my linker file:
    MEMORY
    {
    RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
    FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
    EEPROM_APN (xrw) : ORIGIN = 0x80803E8, LENGTH = 1044 /* starting at eeprom adress 1000 which is 0x80803E8 */
    }

    /* Define output sections */
    SECTIONS
    {
    .eepromAPN :
    {
    /*. = ALIGN(4);*/
    KEEP(*(.eepromAPN.number)) /* numberofApns */
    KEEP(*(.eepromAPN*)) /* APNs */
    /*. = ALIGN(4);*/
    } >EEPROM_APN
    the sectors which should not be erased but still are: 0x8080000 to 0x80803E7. after that (starting at 0x80803E8) i need to write some stuff to EEPROM during flashing. How can that erasing be avoided?
    Michael
  • Hi,

    Great to hear that you are up and running again.
    We will consider this case as closed now.

    Best regards,
    Nino
    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.