Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Development => Topic started by: jayb1239 on March 16, 2013, 09:10:26 pm

Title: Compiling from source
Post by: jayb1239 on March 16, 2013, 09:10:26 pm
Hi,
I wonder if somebody could provide a little assistance.

I am trying to compile the BPv4 firmware from source.

I cloned the SVN and opened up the project in MPLAB 8, I then modified the base.h and commented out the v3 (tried with and without comment) and then tried to make.

The build reports to go successfully and I get a hex in the output dir which is 339kb or if I export using the default end I get a file of 962kb but flashing either of these via pirate-loader does not work. The pirate-loader reports success but the bus pirate does not boot.

This is probably something silly that I am overlooking but from my reading around the forums and trying to find a solution myself I am getting nowhere.

Any suggestions

Thanks in advance
Title: Re: Compiling from source
Post by: tayken on March 16, 2013, 11:06:34 pm
BPv4 uses USB and another PIC microcontroller. There should be a second MPLAB project file in there, try opening that one.
Title: Re: Compiling from source
Post by: jayb1239 on March 16, 2013, 11:11:02 pm
I have tried building with MPLAB & MPLAB X with all projects in there (the MPLAB x project, the BusPirate project and the BPv4 project. The hex flashes fine, but the bus pirate isnt enumerated when plugging back in :-(
Title: Re: Compiling from source
Post by: tayken on March 17, 2013, 12:02:48 am
OK, found the problem: In base.h, look at lines 127-129:
Code: [Select]
//Debugging mode for BPv4, comment out for normal compiling
//Adds alternative communicaton to UART1 over AUX1 and AUX2 instead of USB.
#define BPV4_DEBUG
You have to comment out line 129. Then it works.
Title: Re: Compiling from source
Post by: jayb1239 on March 17, 2013, 12:15:05 am
Thank you, I have lost several hours trying different things to get it to work and this was the solution. As i thought something simple

Thank you again
Title: Re: Compiling from source
Post by: arakis on March 18, 2013, 11:43:49 am
[quote author="tayken"]OK, found the problem: In base.h, look at lines 127-129:
Code: [Select]
//Debugging mode for BPv4, comment out for normal compiling
//Adds alternative communicaton to UART1 over AUX1 and AUX2 instead of USB.
#define BPV4_DEBUG
You have to comment out line 129. Then it works.[/quote]

sorry for that, I'll comment it out, and recommit to SVN so it's off by default..
Title: Re: Compiling from source
Post by: jayb1239 on March 18, 2013, 11:58:06 am
You can leave it in if its helpful for you, I know what to look for now and others having the same issue will find this thread to tell them what it is.

Thanks again for all the help
Title: Re: Compiling from source
Post by: arakis on March 19, 2013, 09:16:03 am
[quote author="jayb1239"]You can leave it in if its helpful for you, I know what to look for now and others having the same issue will find this thread to tell them what it is.

Thanks again for all the help[/quote]

It was left there by mistake, thanks for uncovering it, and sorry you had to find it :)

( ! ) 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.00902061680session_write_close ( )...(null):0
20.00932193256ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00932194032Database_MySQL->query( ).../DatabaseHandler.php:119
40.05252332752Database_MySQL->error( ).../Db-mysql.class.php:273