Hi
I need a simple setup for flash programming, for production of prototype boards.
What do i need?
Benny.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
I need a simple setup for flash programming, for production of prototype boards.
What do i need?
Benny.
hi ,
you can use TI Uni flash tool .
http://processors.wiki.ti.com/index.php/Category:CCS_UniFlash
for programming options : refer this video :
http://focus.ti.com/docs/training/catalog/events/event.jhtml?sku=OLT213022
regards
Nanda
Hi
I am using a XDS100v2 & uniFlash (v3) to export the memory from a TMS570LS3137.
Exporting ~2,3MB takes almost 2 hours. Does this sound about right? (I expect it'll take roughly the same time to program it (not including verify), but i don't have the correct program yet, so can't test it)
I am using it in a prototype test equipment and would prefer programming to be done (alot) faster than 2 hours.
How fast would a XDS220 be for a file that size?
When we hit serial production, programming would ideally be less than 30secs. Is that achieveable and with what programmer? (I don't need debug functions, only flash erase, program & verify)
/Palle
Hello Palle,
The UniFlash team does not believe 2 hours should be a normal time. They have requested me to see if you would generate and give to us a debug server log so they can see where the bottleneck is. Here is the link to the wiki page that shows how to do this: http://processors.wiki.ti.com/index.php/Troubleshooting_CCSv5#CCS_Diagnostic_Logs
Hi John
I only had uniflash installed, and I couldn't find any examples on enabling logging in uniflash.
So I installed CCSv4.2.4.00033 (on the wiki page for XDS100, they only mention a free license for CCSv4: http://processors.wiki.ti.com/index.php/XDS100#Q:_Can_I_use_Code_Composer_Studio_v4_with_XDS100.3F ) and I produced attached file.
/Palle
edit: I am planning on using command line from LabVIEW to program during production with uniflash.bat and I have attached a 2nd log from the -log option in uniflash dos utility.
Hi Palle,
The CCS team indicated CCS v4.2.4 is too old for them to see the info they want. Here are the instructions they give to get the log from UniFlash:
1) Run command prompt
2) cd to the path <install\uniflash\uniflashv3\eclipse>
3) Set the following two environment variables to configure logging
set TI_DS_ENABLE_LOGGING=1
set TI_DS_LOGGING_OUTPUT=c:/path/file.log
4) Launch UniFlash from the command line
They do seem to think that the bottleneck is in the XDS100v2 and a faster emulator class like the XDS200 or XDS560 would see a speed improvement, but they do not have any numbers to quantify this.
Hi John
I received a program and tried to program it and it succeeded.
I used the uniflash.bat with the following command: uniflash -ccxml C:/ti/TMS570/TMS570uniflash.ccxml -programBin C:/ti/TMS570/braending/sp1_es.out 0x00000000 C:/ti/TMS570/braending/ecc_sp1_es.out 0xf0400000
which generated the following output (dos prompt clipped the output):
Now, I cannot connect to the target anymore, I get the following error no matter what I try:
I attached log files for the programming and the failed erase command.
/Palle
Hello Palle,
It is possible to program the device in such a way that it prevents an emulator from accessing the device.
The addresses where your ECC is being programmed does not line up to the addresses you are programming the Data to. If you have ECC detection/correction enabled, you may be in a continuous ECC error loop that the emulator cannot break into.
Another way that will prevent accesses to the device from JTAG is an incorrectly configured PLL that causes the device to run too fast or a loop that continuously calls something like PBIST.
You can try holding the reset button on the device until the software connects.
Or download the latest version of CCS (with the XDS100 you will not have any issues using it), configure a project for the TMS570LS3137, connect to the device and try halting the cpu. Once you have the CPU halted, try to just erase the device from CCS Flash Tools menu.
Hi John
Thanks for the quick reply.
I installed CCS5.5 and made a project, but I cannot connect to the target (The same error pops up instantly), so I can't halt the cpu. Tomorrow when I get back to the office, I'll see if I can reset the device when trying to connect.
Regarding the addresses, along with the program, I got an example code with the addresses, but I must have misinterpreted them
/Palle
Hi John
I could not connect to the target when resetting, so I have found a new TMS570 to flash.
The addresses I use, I got from a colleague that have been using a lauterbach to flash the same target as I am trying to flash with a XDS100v2 and uniflash, and it works fine when he does it.
An extract from the script he is using:
;========================================================================
; Flash declaration
FLASH.RESet
; Program flash
FLASH.Create 1. 0x00000000--0x0001ffff 0x8000 TARGET Byte 0. /EraseALIAS 0xf0400000--0xf0403fff ; Bank 0
FLASH.Create 1. 0x00020000--0x0017ffff 0x20000 TARGET Byte 0. /EraseALIAS 0xf0404000--0xf042ffff ; Bank 0
FLASH.Create 2. 0x00180000--0x002fffff 0x20000 TARGET Byte 1. /EraseALIAS 0xf0430000--0xf045ffff ; Bank 1
; Program flash ECC
FLASH.Create 1. 0xf0400000--0xf0403fff 0x1000 TARGET Byte 0. /EraseALIAS 0x00000000--0x0001ffff ; Bank 0
FLASH.Create 1. 0xf0404000--0xf042ffff 0x4000 TARGET Byte 0. /EraseALIAS 0x00020000--0x0017ffff ; Bank 0
FLASH.Create 2. 0xf0430000--0xf045ffff 0x4000 TARGET Byte 1. /EraseALIAS 0x00180000--0x002fffff ; Bank 1
;========================================================================
I assumed that the files was supposed to be placed at the beginning and forward for both data space and ECC space. I am slightly puzzled that the filesizes are not in ratio 8:1 (as I read the user guide, there should be 64bits of data and 8bits of ECC, or am I reading it wrong? (section 2.2.3.2 (page 107) in the user guide))
Filesizes are:
sp1_es.out - 2,444,318 bytes
ecc_sp1_es.out - 28,247 bytes
John Hall said:The addresses where your ECC is being programmed does not line up to the addresses you are programming the Data to. If you have ECC detection/correction enabled, you may be in a continuous ECC error loop that the emulator cannot break into.
Because the filesizes is not ratio 8:1? or else I don't understand how you can see that.
In the datasheet page 67 + 68 for the TMS570LS3137, the 3MB flash is located at 0x0000 0000 to 0x002F FFFF and the flash data space ECC is located at 0xF040 0000 to 0xF04F FFFF, so if the files are correct, that should be the correct locations?
I found a formula to calculate the location for the ECC in the user guide (TMS570LS31x/21x 16/32-Bit RISC Flash Microcontroller Technical Reference Manual (Rev. B)), but I don't get the addresses from the datasheet specifying the memory locations, see image below.
I hope you can help.
/Palle
The way I could tell the ECC was not lining up to your data was from this segment of your results:
No, a map file is not a gel file. A map file is generated by the linker showing where in memory all the functions and symbols are placed.
I don't have such a file, though the guy supplying the software wrote earlier that he has another file. Lauterbach instruction is:
FLASH.TARGET 0x08000000 0x08001000 0x1000 ~~/demo/arm/flash/byte_be/f021r4noecc.bin
I'll have a chat with him tomorrow and see if I can figure out whats going on.
Thanks for helping
/Palle
Hi John
I received the following from the company delivering the software:
The .out file will tell you. It has an elf format, so it can be read by e.g. elfdump
monitor@tte-monitor-virtual:~/ecker/wtg_files$ readelf sp1_es.out -S
There are 31 section headers, starting at offset 0x24fcca:
Section Headers:
Palle,
That list does not show any ECC address ranges. I need a map of the complete data and ECC being programmed into the device.
Hi John
for the .ecc file
And for the .ecc file:
monitor@tte-monitor-virtual:~/ecker/wtg_files$ readelf ecc_sp1_es.out -S
So, the program starts at address 0x0 and the ecc section at 0xf0400000.
Anyway, I don’t know which tool you are using or plan to use, but it should be able to get that information from the ELF file itself. And it actually should get this information from the ELF file itself.
Can uniflash read that elf-header in the .out files?
/Palle
UniFlash understands ELF files. Data and ECC sizes correlate.
The only thing I can think of that you are having an issue re flashing the device is due to the code previously flashed preventing JTAG from taking control of the device.
Hi John
Ok, so I do not have to specify the addresses? Then I think that is the problem. I used the following command on the target that I cannot contact now:
uniflash -ccxml C:/ti/TMS570/TMS570uniflash.ccxml -programBin C:/ti/TMS570/braending/sp1_es.out 0x00000000 C:/ti/TMS570/braending/ecc_sp1_es.out 0xf0400000
where the correct command would be:
uniflash -ccxml C:/ti/TMS570/TMS570uniflash.ccxml -program C:/ti/TMS570/braending/sp1_es.out C:/ti/TMS570/braending/ecc_sp1_es.out
Is that correct?
/Palle