On 4/07/12 3:01 AM, Vaclav Peroutka wrote:
Hello all,

for one my hobby project ( http://mz800ukp1.sourceforge.net/ ) I use STM32 and CPLD. My 
idea is to replace current MCU with F205 and use onchip USB to update firmware in both 
MCU and CPLD. Mode switching between CPLD SVF update, FW update and "user mode" 
will be done by jumpers.

My idea is to emulate some well known interface already available by openocd. 
usb_blaster for CPLD maybe ? But for firmware selfupdate, I don't have any idea 
what can be usable. Or is it better not to rely on OpenOCD and write some PC 
application from the scratch communicating through CDC class ?

Another idea - is there any free means for communication with ETM on Cortex M3 
? I tried to find one but no success. Maybe I ask wrong questions to Google.

Thank you in advance,
Vaclav


Hi,
I do a very similar thing on a current product, which is based on an lpc3131 (arm9) and an actel fpga. I actually ended up using JAM Stapl Player (altera/actel) on the pc end to do the fpga programming, and wrote a program for my lpc to emulate the serial programmer it supports. I initially wrote it as usb cdc but later ported it and stapl_player to run on hid instead to avoid driver/port hassles. It works quite well, but takes 3-5minutes to program which I'd really like to improve as opposed to my ft2232 based dongle programming it in about 1.5minutes. To make this possible I set up my pcb layout such that some gpio on the arm can take over the jtag lines on the fpga, it doesn't have any other serial update methods, just jtag. At the time I didn't see any openocd supported programmer with a usb interface I thought I could easily replicate, hence went with the standalone tool. Looking at it now though, opendous-jtag <http://code.google.com/p/opendous-jtag/> looks like it'd be pretty straightforward to replicate. I don't know whether it'd be particularly quick or not though. I use the lpc's built in usb dfu bootloader mode to load the programmer firmware, then run stapl player on computer to load the stapl file.

You should look at versaloon though if you're planning on using an STM32, that's what it's written for. If you pin out your pcb correctly you could probably use it with minimal or no modification.


As far as the arm's concerned, my programs stored in external flash chip, so I just had to write a loader that could write my rom file to that flash. As part of my build procedure I actually convert my firmware.rom into a *.o object file and link it to a predetermined location in my arm loader program which gives my a single final file I load over the usb dfu. The loader program starts up, verifies the firmware.rom at the known memory buffer location, then flashes it to the external flash chip. It's really quite neat and straightforward.

Again, there's probably a simpler way for you too, look up ST UM0412 Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension "Getting started with DfuSe USB device firmware upgrade". Looks like ST have it nicely built in for you.

Andrew
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to