Topic : str7_pgm.exe - unable to load file

Forum : ARM

Original Post
Post Information Post
January 19, 2007 - 4:06pm
Guest

Hi.

I'm trying to use str7_pgm.exe to program a target with the following command line string:

str7_pgm.exe TSTR710FZ2 PC:RACM.hex

The response is:

*****************************

C:Program FilesRIDEBIN>str7_pgm TSTR710FZ2 PC:RACM.hex

STR7_pgm: programming tool for STR7 devices through RLink
Copyright (c) 2005 Raisonance SAS

Closing all connections... OK
Using target: STR710FZ2
Reading file C:RACM.hex...

*** Error: Unknown error!

C:Program FilesRIDEBIN>

*****************************

So the problem arises as early as trying to read the file from disk. I can read it fine when using RFlasher (identified as Intel hex file), but it may be a problem for str7_pgm to find the file at all or what?

How do I specify the path to the file, or do I need to place the file in a certain folder before programming it?

Regards
Steen

Replies
Post Information Post
+1
0
-1
January 22, 2007 - 12:24pm
Guest

Hi,

First, your syntax for specifying the file path is correct. I just checked it. (with a file located in "c:")

The only way I could reproduce the error you report was to specify a file that does not exist.

I'll need more information for helping you:

1. Build Number of RIDE. (not the version) click "help"->"about"
2. Serial Number of RLink.
3. Version of Windows.
4. The hex file you are trying to program.
5. Description of the toolchain (compiler, etc.) that you are using. (GNU, ARM, etc.)

Please send all this to "support@raisonance.com", and say that it's for Vincent.

Best Regards,

Vincent

+1
0
-1
January 22, 2007 - 3:09pm
Guest

Hi,

I just saw that you get the same error if the file does not contain valid hex records, or if it does not contain data for the Flash address range. Maybe you compiled using RAM mode?

I'll make the error messages clearer in the next version...

Best Regards,

Vincent

+1
0
-1
January 23, 2007 - 12:16pm
Guest

Hi,

I have corrected a few errors in "STR7_pgm.exe". Two of them might be related to your problem. I will include the corrections in the next version of RIDE, but in the meantime, you can download the fix there:
ftp://www.raisonance.com/temp/ST/STR7_pgm_fix_070123.zip

Just download, unzip, and read "ReadMe.txt".

Best Regards,

Vincent

+1
0
-1
January 23, 2007 - 3:12pm
Guest

Thanks Vincent!

The fixed version seems to work as expected, and the new error messages helps a lot. Super work! I had the wrong address range in my hex file, so offsetting it with 0x40000000 should do the trick (when i open the hex file I can also see that all data records start at 0x0000 and no other extended address records exist other than offsetting with 0x0000, not helping at all).

I'll report back how it went (I can't test it now since I'm temporarily out of time :-).

Btw, the serial number of my RLink is dngStd003002851, RIDE build is BN746-ST7-ARM-80C51 and Windows is XP Pro.

Cheers,
Steen

+1
0
-1
January 26, 2007 - 2:48pm
Guest

Hi Vincent.

This version does not seem to program the very last byte from my hex-file. The last four lines in my hex files are as follows:

:020000044000BA
:2088F100FEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEA00F09FE5FEFFFFEAA9
:04891100C40200009C
:00000001FF

Thus an offset to 0x40000000 and the second to last line programs the last data byte at 0x40008914 and the value at that address is 0x00. 'Verify' with str7_pgm.exe tells me that:

...
File and Flash are different:
At address 0x40008914: file is 0x0, Flash is 0xFF
...

Does verify start from the start of the file or the end of the file? The programming is ok though - my program runs at least, the last couple of zeros in the hex-file are hopefully just padding...

Also, 'verify' reads the entire internal flash no matter how i set the S switch. Even if I use S0x001 I still get

...
pre-Reading Flash Bank0... OK
pre-Reading Flash Bank1... OK
Reading Flash Bank0...
................ OK
Reading Flash Bank1... OK
...

which tells me the entire flash is being read. What do I do if I only want to check a single sector (for better performance for instance)?

The F switch also do not seem to have much impact on performance. Either I do F400 or F12000 I get the same execution times. Is this switch ignored in str7_pgm.exe?

Cheers,
Steen

+1
0
-1
January 26, 2007 - 4:40pm
Guest

Hi,

Easiest answer first:
the "F" switch is taken into account, but the JTAG clock has not much to do with the overall speed when programming flashes. Everything (PC, USB, RLink, JTAG, etc) is much faster than the Flash modification algorythms.

I'll check for the two other questions and let you know.

Best Regards,

Vincent

+1
0
-1
January 26, 2007 - 6:01pm
Guest

Hi,

The "S" switch is not used for the verification. I'll do that in a future version, but it implies modifications in some low layers of the software, so I'll not be able to do it very quickly.

About the last byte not being programmed, it's a bug in the programmation. The ARM tools are handling everything 4-byte aligned. Your hex file is not 4-byte-aligned and we had not foreseen this. I'll correct it by adding some padding and send you a fix next week, maybe Monday. In the meantime, try to have a hex file that uses only 4-byte aligned data. What kind of linker generated this file anyways???

Vincent

+1
0
-1
January 26, 2007 - 6:24pm
Guest

Hi,

Here is the fix that corrects the not-4-byte-aligned bug above:
ftp://www.raisonance.com/temp/ST/STR7_pgm_fix_070126.zip

Note that this bug was introduced by the previous fix. (point 5 in the readme) It was not there in the official release. (which was programming the whole flash no matter what)

Best Regards,

Vincent

+1
0
-1
January 29, 2007 - 1:53pm
Guest

Hi Vincent.

I'm deeply impressed at how swiftly you are able to support me in this matter. Definetely a big thumbs up for You compared to many other similar cases I have been involved in.

It seems blank-check doesn't use the sector switch either? I can erase bank 0, sector 0 for instance, but can't verify only if this area is erased.

Also, if I lose connection with target during plugin upload, a message box stating "write error" pops up, making it necessary for a test operator to dismiss it before str7_pgm.exe returns. Does a command line switch exist to make these kinds of message boxes not appear? Some kind of 'non-verbose' mode?

Best regards
Steen

+1
0
-1
January 29, 2007 - 3:56pm
Guest

Hi,

Well, you were lucky because last week I was working on STR7s already, so I had the software and boards installed, connected and ready and I could look at your problems quickly. But I have to admit that it's not always that fast.

For the Blank-Check and sectors, I'm afraid it's the same answer as for the Verify: I'll do that later.

For the "quiet" mode, I'll try to see if it can be done quickly. But when there is an error, your operator will have to do something anyways... even if just putting the board in the "boards with a problem" box. :)

Warm Regards,

Vincent

+1
0
-1
January 30, 2007 - 12:19pm
Guest

Hi,

Please give a try at this one:
ftp://www.raisonance.com/temp/ST/STR7_pgm_fix_070130.zip

I just removed this messagebox, which should never have been there in the first place. :)

Best Regards,

Vincent