Saturday, April 21st 2018, 7:23pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Date of registration: Feb 13th 2014

Posts: 4


Thursday, February 13th 2014, 4:49pm

J-Link Commander "savebin" command

I am using IAR EWARM with a J-Link probe. I have a C-SPY macro that reads 24k 4-byte values out of

target memory and writes them to a file on the PC, using "__readMemory32" and "__fmessage", which

takes about 45 seconds to run. I would like to make a faster version using the "savebin" command from

J-Link Commander. When I try it the command in its own separate window while IAR is executing, it runs,

but leaves no output file. Does anyone have a working example of this? Thanks!

Date of registration: Feb 13th 2014

Posts: 4


Monday, February 17th 2014, 9:08pm

Never mind, savebin works just fine.

Never mind, savebin works just fine, I was trying to create the file in C:\, which causes Windows to ask if you want to apply administrator privileges, but the prompt was suppressed I guess, so I got no error message nor chance to enter a password. I didn't have "immediate" write access (or whataver you want to call it) to the output file directory that I specified :cursing: .

Now I am looking for a binary to hex file converter to process the binary file and output one 32-bit hex word per line. Then I can select the whole file and paste it into a column in Excel. Or is there a way to read the binary file straight into an Excel column? Any suggestions appreciated... :thumbsup:

Date of registration: Feb 13th 2014

Posts: 4


Thursday, December 4th 2014, 4:52pm

Sporadic "savebin" operation?

I have a windows batch file that executes two j-link script files. The first script reads a pointer out of RAM on my Atmel AT91SAM9XE512 development kit. The second script is created by a "C" executable that uses the pointer to create a script that reads data out of 13 areas in my SDRAM starting from the pointer. Then this second script is executed.

The batch file always seemed to work on a PC with IAR EWARM version, SEGGER software J-Link ARM V4.68 installed, and an IAR J-Link ARM V8.0 USB debugger probe (yellow). When using different versions of these on another PC and on a laptop (IAR EWARM, SEGGER J-Link ARM V4.78g, J-Link V4.94h, or NONE installed, Atmel SAM-ICE 2012.08.02 (blue), I get intermittent problems.

Sometimes I get windows and/or Segger and/or IAR error windows which cause the batch file to cease operations. Sometimes the batch file runs through but the data in the uploaded files is garbage. I know that at the end of a j-link script file, my processor resets. So I do a halt instruction first ("h") to stop the processor before it gets into the SDRAM initialization or the memory tests, which will screw up the data. Also I try to not be running very many other windows applications so that the batch file can run as quickly as possible. Still, every 4th time or so, error messages or bad data. The batch file is run after hitting a break in IAR.

Could the different versions of IAR, SEGGER, and J-Link probes be affecting this operation? Any suggestions or things to try? I am just running SEGGER j-link script commands from a windows batch file while in IAR at a break. There is not much else I can think of to try. I am using this to read out a ton of memory which I port into Excel for data examination. My batch file produces the hex data files with no user action required. I had previously used the IAR Save Memory feature, but you have to enter start address, end address, and filename each time. I am reading out 13 files so this is too much of a pain. I had also tried the IAR C-SPY macros to dump out the data. This works fine but is excruciatingly slow for some reason, taking about 8 minutes to do the 13 files, while the "savebin" batch file technique takes maybe 45 seconds. Each file is a megabyte long.

Any ideas or experience with any of this? Thanks - Rolf Anderson


Super Moderator

Date of registration: Dec 20th 2011

Posts: 400


Wednesday, January 14th 2015, 5:22pm


In general, J-Link script files should work with all combinations (new / old models and new / old versions of the J-Link software).
We need a more detailed problem description in order to help you here.

Can you please describe step by step what you are exactly performing and what issue pops up?
Does a error pops up? If yes, which one?
Does a script file proceed successfully but somehow it seems that some commands have not been performed correctly (e.g. savebin did not work and did not output an error).
Does the issue pops up without using the IAR EWARM, too? Just to strip down the issue. Small setup which shows the issue is the easiest way to find a solution.

Best regards