Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Development => Topic started by: Xykon on February 26, 2014, 11:02:25 pm

Title: MLA CDC demo for BusPirate v4
Post by: Xykon on February 26, 2014, 11:02:25 pm
We had a small discussion here on the Forum (http://http://dangerousprototypes.com/forum/viewtopic.php?f=19&t=6156) about using code from the Microchip USB Libraries on open-source projects. It seems that, since the initial firmware for the BPv4 was written, Microchip has relaxed their license agreements to actually allow both Source and Binary distribution of Software based on their libraries.

I have thus started to look into the CDC driver and basic demo application for the BPv4 hw. For starters, I have put together a small package with a CDC echo application specifically for the BPv4 HW which can be found on my GitHub repo (http://https://github.com/Xykon/pic-dev) as cdc_basic_p24FJ256GB106. The original MLA version supports all kinds of different hardware and thus contains a lot of files in many different subdirectories, so putting it all together into one small package and removing things like leds and buttons that the BPv4 doesn't have should help a lot in understanding what's really needed to get it running.

I have also started looking into adding this into the actual BusPirate code as an optional compiler switch, but haven't been very successful yet. I think what should be done first is to completely separate the software and the hardware part of the code. I also think that it might be time to drop hardware support for everything below v3 because all those #ifdefs make the code very hard to understand.

I'll keep thinking about this in the next few weeks and try to come up with a few suggestions that might ultimately make it easier to maintain the actual code, incorporate different USB stacks and port the BusPirate code to different hardware like a PIC32 or even ARM based microcontrollers.

I thus thought I'd post the CDC example here in case someone else might be interested in using it as an alternate USB stack for the BusPirate or something else that uses the BPv4 design.
Title: Re: MLA CDC demo for BusPirate v4
Post by: ian on March 20, 2014, 06:53:05 am
I'd be behind this. I'm feeling bored and frustrated with PIC and Microchip latly and will let you in on a secret: we're brewing up a Bus Pirate v5 based on a big ARM chip with lots of free libraries... It'll cost a ton, which sucks, but it'll be way easier to maintain.

You can remove all pre v3 stuff, but note that many v2 defines also apply to v3 are are set in the configuration file.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00892053808session_write_close ( )...(null):0
20.00932185400ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00932186176Database_MySQL->query( ).../DatabaseHandler.php:119
40.05482324912Database_MySQL->error( ).../Db-mysql.class.php:273