Author Topic: PIC used as very inexpensive ARM debugger  (Read 2115 times)

0 Members and 1 Guest are viewing this topic.

Offline majbthrdTopic starter

  • Contributor
  • Posts: 22
PIC used as very inexpensive ARM debugger
« on: January 23, 2014, 09:00:17 pm »
Here is a personal project that I've been working on which might be of interest.

I wanted to see what was feasible in the way of a very-low-cost ARM board.  OK, that doesn't sound original, but stick with me.

The solutions that I've seen (Tweeny, McHck, mbed, etc.) are limited to wholesale firmware updates.  Press a button, download a new image, and see if it works.

I wanted to implement an integrated CMSIS-DAP debugger (ARM standard that is compatible with multiple OSes).  That way, one can do everything from flash updates to single-step debugging.

The brute-force solution would be to plop two ARMs on a board, where one has USB capability and acts as the debugger.

However, that gets pricey.  Atmel, for example, is using an AVR32 on their Xplained boards in a debugger role to shave costs, but the AVR32 isn't exactly a dirt cheap chip either.

Instead, what I did was use a PIC... a PIC16F1454 to be precise.  It costs $1.25US in single quantity and goes below a US dollar in 1k+ quantity.  Plus, it doesn't need an oscillator (further lowering total BOM costs).

The firmware solution consists of two halves.

The first is a USB bootloader that also doubles as a USB-to-UART bridge (thereby also saving the cost of a FTDI chip or equivalent).

I've published the code (including patches to the Microchip USB Framework) here:

https://code.google.com/p/pic16f1454-bootloader/

The bootloader lets one download an application into the second half of the PIC's flash.

For a sample app, I've managed to write a CMSIS-DAP implementation that fits entirely in 4kwords of the PIC16F1454's memory.

One of the ARM targets that I've tested it with is a NXP LPC812 (Cortex-M0+), which is a another <$1US CPU.

So, with two $1 chips, a USB connector, an LDO, and some passives, one has a complete development board with integrated debugger.

I've attached a picture of a sample PCB I did through OSH Park.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PIC used as very inexpensive ARM debugger
« Reply #1 on: January 23, 2014, 09:11:36 pm »
Worthy efforts.

There is also a Russian implementation of jlink on STM32F chips, in case you are interested.

jlink-ob itself is quite simple as well.
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf