Sunday, January 21st 2018, 7:50pm UTC+1

You are not logged in.

  • Login
  • Register

Date of registration: Jan 10th 2018

Posts: 4

1

Wednesday, January 10th 2018, 3:21pm

[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

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 566

2

Thursday, January 11th 2018, 5:11pm

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

Date of registration: Jan 10th 2018

Posts: 4

3

Thursday, January 11th 2018, 5:25pm

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:

Quoted

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

Date of registration: Jan 10th 2018

Posts: 4

4

Friday, January 12th 2018, 11:35am

...in the .hex file, 0x8080000 to 0x80803E8 are not defined, I checked that. still they are erased.

Date of registration: Jan 10th 2018

Posts: 4

5

Friday, January 12th 2018, 1:49pm

I changed the adresses of my linker file to the second EEPROM bank and it is not erasing the unused part in bank1 anymore. thanks!

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 566

6

Friday, January 12th 2018, 2:22pm

Hi,

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

Best regards,
Nino