Skip to main content
Topic: Compiling v6.0 source (Read 3307 times) previous topic - next topic

cannot execute source code

Reply #1
Ian,
thanks for the reference to the Tortoise files and the PIC configuration information.

I downloaded Tortoise and executed it.  Under the .../svn/Trunk/Bus Pirate I could find no source code.  Only the hardware and manufacturing_resources directories.  There was a .hex file, but no source.  I looked through all the other .../svn/Trunk directories.  But there are for other projects and some do have source but not for Bus Pirate.  I was able to use Tortoise to "checkOut" the Bus Pirate directory and view it.  I am doing something wrong so that I do not get the V5.10 source code?  I can only find .hex files.

So I went back to my source code for V5.7 and used the writeup on PIC configuration.  I did an export of my source code build to have an end address of  0xa7fa, no config bits, and an INHX32 format.  When I create that format code (which is slightly smaller in size that the old builds not using that end address), I still do not get either my BP_LEDMODE to blink or any TERMINAL input to show any characters with the newly build V5.7      Are there any tests or backdoors to the BootLoader that could show me that the executable got called?

And it would be great if I could get access to the V5.10 code.  Oh, I now have my PicKit2 so I can now download code with or without the BootLoader.  ANy suggests what to try next?
  Tjcooper

Re: Update problems

Reply #2
Hi TJ,

Sorry about that, the Bus Pirate source is in its own SVN:
http://code.google.com/p/the-bus-pirate ... unk/source
Got a question? Please ask in the forum for the fastest answers.

Where the source Lives

Reply #3
Ian,
Thanks for the heads up on where the source is.  When I go there, I see a "source" in the "trunk" directory.
I see a different source in the "v5.newterm" directory.  Which one of these, if any, corresponds to the source of V5.10?  I also see there is a "command line svn" way to download source.  I tried reading the online documentation, but it was not clear how or what program (in a Dos window??) I run to have a command line option for "svn  checkout  http://filesource  file_destination" type of argument.

Another question, is the version number of a Bus Pirate build contained in one of the source files so that I could now what version in source set refers to?

Also, I took the V5.7 and used the "export" to go to the .hex file according to your instructions.  Changing the "end address" to 0xa7fa and the no configuration words and the INHX32 file format did not make the V5.7 source run (I now have the MODE LED turned on the main.c as the first and only thing it does (after defining the Port directions and bits names).  I still see no activity under BL4.4 for my build.  Am I missing some other setup parameter?  Much thanks for all your help.
  tjcooper

Re: Update problems

Reply #4
Hi TJ,

The main source is in /trunk/source, that is v5.10 (rather v6 now). The other directories are snapshots of development work.

Instructions for the Bus Pirate SVN are the same as the DP SVN:
http://dangerousprototypes.com/docs/Using_SVN

There may be a build number in a define somewhere, it is shown in the terminal. We're not militant about updating it except at release though.

I'm sorry, I can't help with v5.7. I don't remember any quirks now, and there have been bugs that were fixed in the latest source.
Got a question? Please ask in the forum for the fastest answers.

finally working

Reply #5
Ian,
Thanks for the updates on where stuff is located.  I finally got the V6.0 stuff downloaded, built, and tested.
Yeah!!!!  I can now get the TERMINAL to fully work with V6.0.  I still try v5.7 source but that is a "no go".

The location of the firmware version is in base.h:

#define BP_FIRMWARE_STRING "Firmware v6.0RC (r572) "

and it appears in all the sources I have found so you have consistently updated it there.  Also base.h has all the #define's so you pick up all the conditional tests for all the other modules.  I will start playing again with serviceuser and make sure I can turn on the LED's at will.  Is the VREG LED something I can play with, or is it hard wired to a specific hardware port?  Would be great to have two LEDs working while I am testing.

If I use the PICkit2 to do debugging, were is the address that the Bootloader jumps to when we are not invoking the bootloader so I can start the normal code?  I see the "asm" steps in base.h:
asm (".equ BLJUMPADDRESS, 0xABF8");
and there is a second instance in procMenuc. with:
asm volatile ("mov #BLJUMPADDRESS, w1 n"  //bootloader location
                    "goto w1 n");

Is this where the BootLoader starts?  or is there where it exits to the normal application?
Thanks for all the help.  Hopefully I can return something to this great community when I get my pre-condition analyzer working in the next week or so.
  tjcooper

Re: Compiling v6.0 source

Reply #6
Hi TJ,

I split this off to the development forum. I'm glad you finally got it.

VREG is wired to the 3.3volt power supply. You can manipulate it by flipping the power regulators on and off, but be careful it is an open drain configuration (input=on, ground=off).

If you use pickit2 for debugging I think you just need to compile for debug and upload. I don't do anything special to run the code under debug with the current bootloader. Maybe you need to remove the custom .gld file, but I don't think that is needed.
Got a question? Please ask in the forum for the fastest answers.

Re: Compiling v6.0 source

Reply #7
Ian,
I now see the split that you have done.  Could you look at end of the Upgrade FAQ thread to see my question on how to restore the Bootloader 4.4 once I started to use PicKit2 which apparently has removed the bootloader.  Is there a thread somewhere that describes how to use a PIC programmer to re-install the Bootloader?  Much thanks.

Oh, since the program to test I2C for an address, then a register value, and finally a returned byte from the slave is working, is this something I should share with the community?  It should work OK with the BootLoader 4.4 with developers making up their own I2C qualification script.  It works just fine on an I2C slave that runs at 400KHz with only 1 microsec between READs and WRITEs.
  tjcooper

Re: Compiling v6.0 source

Reply #8
Hi TJ,

Yes, the bootloader is erased when you program with a programmer. Just program the bootloader HEX to put it back. Here's a look at programming the Bus Pirate bootloader:
http://dangerousprototypes.com/docs/Pro ... programmer

Sure, all contributions are welcome. I'll stick it in SVN for you.
Got a question? Please ask in the forum for the fastest answers.