EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: homebrew on April 04, 2014, 08:23:02 pm

Title: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: homebrew on April 04, 2014, 08:23:02 pm
I would appreciate some feedback to a little project I am working on currently.

As I can't effort specialised programming hardware for all the stuff I'm working with (ARM/AVR/8051/XILINX-CPLDs etc), I always used simple parallel-port based dongles. However, none of my newer computers / laptops does have a parport any more :-(. So I wasted a lot of time in the past, either using old machines or fiddling around with USB to serial adapters. But that wasn't a solution either (unreliable/sloooooow). And the bench is crowded with a whole load of adapters ...

Enough is enough, something has to be done!

What I need is a board providing all the interfaces I frequently use for both programming and debugging or just tinkering around ...

* JTAG (ARM 14-Pin header) 3.3-5V, defined by target VCC
* SPI  (AVR 10-Pin header) 3.3-5V, defined by target VCC
* I2C 3.3V (3-Pin header)
* I2C 5V   (3-Pin header)
* RS232 3.3V (3-Pin header)
* RS232 5V   (3-Pin header)
* RS232 standard +/-12V (SubD-9 Male)
* RS485 (Terminal 4-pin)

As various other projects have demonstrated a raspberry PI can in deed be used as an (open-ocd) based JTAG-debugger or as an AVR ISP programmer. Its SPI, I2C and RS232 bus is available on the GPIO header.

Therefore I designed a small board (80x100mm) where a raspberry PI can be hooked upon. 
The board contains all the level shifting and a CPLD to control the signal routing to the outputs. The original PIs GPIO header is preserved and still accessible through a separate connector.

The signal routing to the outputs can either be controlled manually by pressing buttons or by the PI, directly controlling the CPLD.

Now I would have all those busses available on a full-blown linux environment. By adding a WiFI-USB-dongle I could also debug and program my  embedded projects isolated from my PCs. No more ground problems, too!

Whatever, here is the current design attached. At the moment those are just drawings. Nothing is either build or tested jet. I did manage to route the board manually (yeah, the auto router sucked or I'm just to stupid to use it correctly) but as you can surely tell from a distance I do not have professional routing skills at all. I'm just a hobbyist …

Would be really glad to get some feedback, before I send this board to the PCB fab and fail horribly ...

Of course, all the stuff is open source. Btw, can someone suggest a specific license? (CERN/TAPR/modified GPL etc etc)?

Best,
Peter
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: homebrew on April 05, 2014, 07:16:21 am
Some additional references:

Raspberry PI as JTAG debugger
https://github.com/synthetos/PiOCD/wiki/Using-a-Raspberry-Pi-as-a-JTAG-Dongle (https://github.com/synthetos/PiOCD/wiki/Using-a-Raspberry-Pi-as-a-JTAG-Dongle)

Raspberry PI as an AVR ISP programmer
http://kevincuzner.com/2013/05/27/raspberry-pi-as-an-avr-programmer/ (http://kevincuzner.com/2013/05/27/raspberry-pi-as-an-avr-programmer/)
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: homebrew on April 07, 2014, 03:14:14 pm
Read over 150 times and not a single comment? :-((((
I must have really screwed up then …
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: Rigby on April 07, 2014, 08:36:37 pm
maybe no one has much to say.  not sure how many pi owners are here.
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: tonyarkles on April 08, 2014, 02:29:06 pm
Personally, I think it's a pretty cool project! It's nice having a swiss army knife single board that can handle multiple protocols. As a curiosity, what does the final cost look like?
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: homebrew on April 08, 2014, 08:55:35 pm
Personally, I think it's a pretty cool project! It's nice having a swiss army knife single board that can handle multiple protocols. As a curiosity, what does the final cost look like?
Cool, thanks for the reply!

Momentarily I expect the a prototyping cost of approx. 90 dollars, excluding the PCB. However, this is a Farnell single piece order list with every component from top quality brands (connectors from harting/wago, bourns resistors, kingbright leds etc. etc.)

For now this is ok for me as I now want to have the Farnell service and only need very small quantities. If others would be interested in that project too, I would probably make a small batch and order from digikey then… I target 50 USD for the finished PCB.
 
Here you find the part list, together with Farnell order number. I will order the parts in the next days to check whether my PCB layout conforms with the packages, before sending off the board to production.

Count   Farnell-Nr
10   1470888RL
3   8906068
1   2212071
1   1193233
1   1379947
1   1755050
10   1757870
1   1596990
1   1597004
2   2211193RL
32   1759016RL
15   2099236
10   2008339
20   2333529
5   2333522
5   2333532
1   1625037RL
3   1829512
4   1022249
1   1593415
1   2356141
1   1106832
1   1096986
1   1106845
1   1084697
1   2315263
1   2315264
1   9731075
1   4218176
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: tonyarkles on April 11, 2014, 08:31:07 pm
I gave the top of the board a quick glance and noticed that there are a few traces that appear to overlap the pins on the big IC. May just be due to a low res screenshot though.
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: bronson on April 12, 2014, 12:45:27 am
Well, since you asked for feedback...

I sometimes use SPI and I2C straight off the Pi's headers, but I mostly just use the decode on my scope.  I have a $3 DIP level shifter somewhere if I ever need 5V SPI/I2C but I haven't needed to use it yet.

I use a Bus Pirate for some stuff, like JTAG.

If I need serial I use this: http://rayshobby.net/cart/accessories/acc-usb/usb-pl2303 (http://rayshobby.net/cart/accessories/acc-usb/usb-pl2303)

I could see getting a dedicated Pi+interface board to handle this sort of stuff but only if the software was AMAZING.
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: theatrus on April 12, 2014, 06:15:14 pm
The trick to a lot of newer protocols is the bi-directional high speed pins such as SWD. If you look at the designs for something like the Segger JLink you can see it's basically a MCU with transceivers.


Sent from my iPhone using Tapatalk
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: parvepratik on April 29, 2016, 05:47:38 am
I would appreciate some feedback to a little project I am working on currently.

As I can't effort specialised programming hardware for all the stuff I'm working with (ARM/AVR/8051/XILINX-CPLDs etc), I always used simple parallel-port based dongles. However, none of my newer computers / laptops does have a parport any more :-(. So I wasted a lot of time in the past, either using old machines or fiddling around with USB to serial adapters. But that wasn't a solution either (unreliable/sloooooow). And the bench is crowded with a whole load of adapters ...

Enough is enough, something has to be done!

What I need is a board providing all the interfaces I frequently use for both programming and debugging or just tinkering around ...

* JTAG (ARM 14-Pin header) 3.3-5V, defined by target VCC
* SPI  (AVR 10-Pin header) 3.3-5V, defined by target VCC
* I2C 3.3V (3-Pin header)
* I2C 5V   (3-Pin header)
* RS232 3.3V (3-Pin header)
* RS232 5V   (3-Pin header)
* RS232 standard +/-12V (SubD-9 Male)
* RS485 (Terminal 4-pin)

As various other projects have demonstrated a raspberry PI can in deed be used as an (open-ocd) based JTAG-debugger or as an AVR ISP programmer. Its SPI, I2C and RS232 bus is available on the GPIO header.

Therefore I designed a small board (80x100mm) where a raspberry PI can be hooked upon. 
The board contains all the level shifting and a CPLD to control the signal routing to the outputs. The original PIs GPIO header is preserved and still accessible through a separate connector.

The signal routing to the outputs can either be controlled manually by pressing buttons or by the PI, directly controlling the CPLD.

Now I would have all those busses available on a full-blown linux environment. By adding a WiFI-USB-dongle I could also debug and program my  embedded projects isolated from my PCs. No more ground problems, too!

Whatever, here is the current design attached. At the moment those are just drawings. Nothing is either build or tested jet. I did manage to route the board manually (yeah, the auto router sucked or I'm just to stupid to use it correctly) but as you can surely tell from a distance I do not have professional routing skills at all. I'm just a hobbyist …

Would be really glad to get some feedback, before I send this board to the PCB fab and fail horribly ...

Of course, all the stuff is open source. Btw, can someone suggest a specific license? (CERN/TAPR/modified GPL etc etc)?

Best,
Peter
HI I appreciate your efforts for this project.I m also planning to do the same thing "to use pi2 board  as jtag adaptor hardware" .I am planning to go with openocd with bitbang lib for ocd debug firmware.if anyone has some inputs..that will appreciated..
Thanks in adavnce
Title: Re: OSHW project: RaspberryPI based Programmer/Debugger/IO-Board
Post by: stmdude on April 29, 2016, 06:21:06 am
While I see the appeal of what you're doing, dedicated hardware doesn't need to be expensive.

Here's a board I'm about to assemble and test:
https://goo.gl/photos/1VQxuhvrx1kPzB4p7 (https://goo.gl/photos/1VQxuhvrx1kPzB4p7)

It's basically a CMSIS-DAP compatible board with a few tweaks. Does SWD JTAG and UART, compatible with most of todays ARM MCUs. Works with OpenOCD (of course), but should also work with IAR and Keil for those windows-inclined folks.

With the right firmware, it should also expose itself as a USB MSC device, so the mbed people can just drag-n-drop a hex-file onto their MCU.

The 0.1" header is a pinout we have standardized on our prototypes and previous iterations of this debug-board. I.e, not an industry standard.

BOM is <$10 in low quantities.