Topic : RFlasher, ARM STM32, Can't Program

Forum : Ride IDE

Original Post
Post Information Post
April 7, 2010 - 4:13pm
Guest

I am trying to set up RFLasher for programming boards on our production floor. Yesterday I downloaded and installed the most recent version of the Ride7 and Ride7+ARM. The processor is STM32F103VET6 and I think I have the target family and processor selected properly. When I click Connect to RLink it responds with the serial number dgnStd004014594. When I click Connect to Target it responds with Connection OK, an Idcode, Silicon Revision and option bytes RDP=0xA5 and the others as 0xFF. I then click to Reload Memory to make sure my hex file is loaded. I click Program and it says the device was programmed successfully. Then when I click Verify I get a message "Error: Verification against blank image. Use Blank-Check instead." How do you get it to work? I've carefully looked through the manual, which doesn't help much for anything. I've searched through the forums and can't find anything. I'm sure it has to be something simple but I can't find it.

Thanks.

Replies
Post Information Post
+1
0
-1
April 7, 2010 - 4:41pm
Raisonance Support Team

Hi,

This message means that the data range corresponding to the flash in the memory image of RFlasher is empty. It usually results from a loading of the hex file was not done correctly, or a hex file that does not contain any data in this range...

For loading a hex file you must use "Load File", not "Reload Memory".
I suggest that after using LoadFile, you check in the memory view that you can see the data from the file at the address of the flash (0x08000000).
If not, then please check that your hex file really contains data at these addresses. (check that it was not compiled in RAM mode for example)

Which manual are you referring to?
This is explained in the \Doc\GettingStartedRFlasher7.pdf document. Is this the one you read?
Some additional ARM-specific information might be found in \Doc\ARM\GettingStartedARM_Ride7.pdf

I hope it helps.

Best Regards,

Vincent

+1
0
-1
April 7, 2010 - 6:29pm
Guest

Thank you for the reply.

Something still is not right. I recompiled in IAR and the map says my code starts at 0x08000000. When I load the file in RFlasher the tab showing the hex file looks reasonable, although the address numbers to the left start at 0000. When I look at both the Code View or Memory View screens the addresses at 0x00000000 are filled with 0xFF, then goes blank, then at 0x08000000 it is filled with 0xFF, and also at address 0x20000000 for the data. Your manual shows the 0xFF, too, so I am not sure what I should see.

Is it possible that IAR generates an output file that should be named something other than .hex? In otherwords, is RFlasher expecting different formats based on the suffix of the executable file?

Thanks.

+1
0
-1
April 8, 2010 - 10:25am
Raisonance Support Team

Hi,

RFlasher reads standard hex (or elf) files. And we had reports of people using files generated by IAR without problem. But I think that you just did not use the correct command to load the file...

You must use the "Load File" button from the RFlasher panel, or the "Programming"->"Load File" command in the menu.

I think instead you used one of the "File"->"Open with editor" commands in the menu, which is different.

Did you look at the GettingStartedRFlasher7.pdf document? It explains all this.

Best Regards,

Vincent

+1
0
-1
April 8, 2010 - 4:30pm
Guest

Vincent,

I have been using the Load File button and I just tried the Programming->Load File but I get the same results. When I follow the manual I get the same results. In all cases the Verify tells me the memory looks blank. Could you please send me your email address so I can email you screen shots of what I am seeing.

By the way, the screen shot in the manual on page 7 for section 2.3 shows the Code View with all 0xFF, which is what I also see. I would think this should have other values that look like a normal hex file.

Thank you for your patience.

Jim

+1
0
-1
April 8, 2010 - 5:13pm
Raisonance Support Team

Hi,

Please send your screenshots to 'support@raisonance.com', with a reference to this thread (number 3228) and my name.

In fact it would be better to send your hex file, because from what you report, this is what I suspect now.

The screenshot in the doc shows a zone of the memory that does not contain data, or before the file was loaded.
We will change that in the doc to be clearer. For sure when I load a hex file I can see the data in the data view (the one shown on page 7 of the doc), not all FF.

In order to check that your software is correct, please try to load this hex file:
ftp://www.raisonance.com/pub/forum/thread3228_STM32_smalldummyhex/STM32F103_toggle.hex

Then you should see this:
ftp://www.raisonance.com/pub/forum/thread3228_STM32_smalldummyhex/STM32F103_toggle.jpg

(at both address 0 and 0x08000000 because it is mirrored)

I hope it helps.

Best Regards,

Vincent

+1
0
-1
April 12, 2010 - 10:56am
Raisonance Support Team

Hi,

I looked at your files and the problem is in your hex file: it is in fact an elf file, in the ELF format but with the ".hex" extension. You can see when you edit them as text that the hex files that I sent are very different from yours. Did IAR generate it like this? That would be surprising...

Now there are (at least) three options for you (cleanest first):

1. Have IAR generate a real hex file, in HEX format. For that you might need to change the configuration of your IAR project. Or maybe you just took the wrong file...?

2. Use a conversion utility to convert the elf file to hex format. IAR probably provides such a utility, or you can use objcopy from GCC (arm-none-eabi-objcopy.exe, which was installed along with your RKit-ARM), as elf and hex are standard formats.

3. Use this file, but rename it as ".elf". Then RFlasher can read it as an elf file. I tried that with your file and it worked.

Option 3 is much simpler and includes less risk of wrong manipulation. But of course if you do that, your production team will have access to the debugging information of your application, which means they can reverse-engineer it very easily. So if your production team is inside your company and you are in a hurry, go for option 3, which is simplest and fastest.

Otherwise if your design team and source project are available to you, go for option 1, which is the cleanest. ("normal")

Otherwise go for option 2, which requires more manipulation but is always possible.

Best Regards,

Vincent

+1
0
-1
June 16, 2010 - 9:59am
Guest

Hi guys, I seem to be having the same problem and from this post I have realised that mine is not a valid .hex file either. I have a machine which we flash the display software through hyper terminal via the "send file-ymodem" interface and a serial port. The problem is that we have encountered problem with some units when an error occurs in the transfer and I assume the bootsector is damaged rendering the board useless. I purchased the R-link programmer in the chance I maybe able to use it to program the str712fr2 chip thats onboard directly yet I have run into all the same problems that JPrinster has encountered. Does anybody know if this is at all possible or do I need to get the original .hex file from the manufatures. Any help on this matter will be greatly appreciated