> Just a summary of the direction(roughly) that external scripting
> of OpenOCD is heading. This discussion is very much open
> and alive. Nothing will be settled in stone in the immediate
> future. All input most welcome!

First of all: THANK YOU!!!!


I have a real problem with OpenOCD scripting, and I would like to hear 
opinions on how it fits into this new shiny tcl'ized framework.

We batch program processor cards with a processor and a flash. The steps 
are:

1. programming cable is connected to the board
2. power switched on
3. processor reset
4. processor chip selects are set
5. some LEDs set on the card (a couple of mww's)
6. compressed flash content is uploaded into RAM (through DCC)
7. flash writer is uploaded into RAM
8. flash writer is run, feedback of progress comes through DCC
9. when everything is done, the power is switched off
10. programming cable is disconnected

These ten steps are repeated for each board (around 100 per batch), and 
a reasonably useful user interface (GUI) with reasonable error messages 
and a progress indicator is required for steps 3-8.


What I have now is a bug-ugly combination of a shell script (building 
the required config scripts on-the-fly) and OpenOCD reset script. What 
it does is:

a) start openocd
b) reset the processor
c) wait 100 ms
d) send a lot of mww's (chip selects, LEDs)
e) set the dcc mode
f) upload the compressed flash image
g) upload the flash writer
h) run the flash writer
i) send "shutdown"

This is a command line tool, and if anything goes wrong, it is up to the 
user to notice it from subtle hints. Sometimes the processor won't halt, 
sometimes the cable is not connected, and finally the user has to check 
the programming LED patterns to see if the board got programmed as it 
was expected to, as there is no progress indicator.


Before sending the tool to the floor (now we have an engineering student 
using it...) we need to have something that works. What would be the 
road with the current JIM/tcl etc. structure? Until now I have been 
thinking of using pexpect. The GUI will be written in python.

Any ideas are welcome!

- Ville
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to