Dangerous Prototypes

Other projects => Open Bench Logic Sniffer => Topic started by: ian on June 09, 2010, 04:07:29 pm

Title: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on June 09, 2010, 04:07:29 pm
Please refer to the bootloader rescue article (http://http://dangerousprototypes.com/2010/06/15/open-logic-sniffer-bootloader-rescue/) for update instructions. The v1 Bus Pirate/Logic Sniffer bootloader rescue package is attached to this post.

The attached package contains:

    * Latest Bus Pirate PIC programmer utility
    * OLS Bootloader v1 (for preorder 1/20MHz OLS)
    * Latest firmware for OLS PIC (05/06) and bootloader app
    * Latest test bitstream (2.04) and loader program
    * New inf file for firmware 05/06

EDIT: attached 16MHz bootloader in case you need to rescue an OLS with that crystal.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: oh8hql on June 15, 2010, 01:23:36 pm
Bootloader install and firmware upgrade process went just fine for me with these instructions, thanks a lot!
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on June 15, 2010, 01:35:10 pm
Hi oh8hql - thanks for the report, I'm glad it went well.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: DrF on June 15, 2010, 05:56:26 pm
I think my repair process went fine followed thru all the steps, what should the device show as in Windows device manager?
As it just shows as "Com 12" on my system where as before it showed as "Logic Sniffer" as I had to assign the driver before I could run the load_rom.bat since it would not give a com port as it was.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on June 15, 2010, 06:01:27 pm
Hi DrF - that sounds right. The OLS just appears as a COM port (emulated USB serial port) in normal and ROM update modes. Thanks for the update.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: SolutPI on June 17, 2010, 05:21:57 pm
Open Logic Sniffer bootloader rescue package worked fine. Used Bus Pirate in upgrade, although PIC programmer present. The OLS now works fine. Channel 1 is now 1 not channel 16. Waveform also appears better .  Thanks,
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: Danny on June 17, 2010, 09:24:00 pm
Are there instructions available for checking bootloader presence from a linux host? If i understand correctly the bootloader uses a serial protocol, i guess it should be possible to use minicom to check for certain bootloader output? What would ik be looking for?

Regards, Danny.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on June 17, 2010, 09:54:11 pm
Hi Danny - The bootloader is USB HID, not serial. You can put it in update mode though and use the cross-platform pump-loader to read out the hardware, firmware, and bootloader version though. It's one of the first steps in the tutorial.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: Danny on June 18, 2010, 09:35:48 pm
Ian,

Thanks for the quick response [s:]but where would i find the cross-platform pump-loader?[/s:]

I found the pump-loader in the forum. This returns the following output:
Code: [Select]
root@laptop-danny:~/logicanalyzer/pump-loader# ./pump-loader -p:/dev/ttyACM0
PUMP loader
Opening serial port '/dev/ttyACM0' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.1, Boot: 1
Error - unknown flash type (ff ff ff ff)
root@laptop-danny:~/logicanalyzer/pump-loader#
So the bootloader seems allright buyt i'm a bit worried about the unknown flash type?
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on June 18, 2010, 09:49:50 pm
Hi Danny - Sorry about that. The linux and OSx pump-loader should be in the latest release package at the gadgetfactory download page:
http://www.gadgetfactory.net/gf/project ... ase_id=119 (http://www.gadgetfactory.net/gf/project/butterflylogic/frs/?action=FrsReleaseView&release_id=119)
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: Danny on June 18, 2010, 10:12:36 pm
I'm afraid that file only contains windows executables. I downloaded the svn version from gadgetfactory repos.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on June 19, 2010, 08:45:34 am
Sorry again - I can't actually find the Linux or OSX versions anywhere, in SVN or release packages. We need to get them in the SVN and make sure they go out with the next update package. I'm really sorry about the oversight.

I didn't see the edit in the previous post. You have the bootloader, but the unknown flash type is a problem. Can you confirm that it also reports flash 0xffffffff on Windows or with the pump-loader.pl Perl script? The Perl script appears to be here: http://www.gadgetfactory.net/gf/project ... M%2Fbin%2F (http://www.gadgetfactory.net/gf/project/butterflylogic/scmsvn/?action=browse&path=%2Ftrunk%2Fpackage%2FFPGA_ROM%2Fbin%2F)

We haven't seen this error in the wild yet. If the ROM is dead you'll probably need to return it to Seeed for a repair.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: Danny on June 19, 2010, 02:58:25 pm
Since my problem is a bit off topic i've started a new topic regarding the flash memory.
http://dangerousprototypes.com/forum/index.php?topic=659.0 (http://http://dangerousprototypes.com/forum/index.php?topic=659.0)
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: equinoxefr on June 22, 2010, 01:46:04 pm
Hi,


Rescue work's like a charm for me. Good job !

Regards

Pierre
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: feralfoo on June 24, 2010, 11:29:12 am
Heya,

I was having some trouble getting the OLS to show up on my PC after burning the boot loader and then performing the firmware upgrade. I managed to save things by re-burning the firmware with a PicKit 2, after which the OLS shows up on my PC as a COM port again.

Good job on the SPI upgrade!

Regards,

Christian
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: Gesk on November 09, 2010, 11:51:54 pm
Hello,
I'm stuck at point 5, my windows doesn't recognize it as a HID device but only as a malfunctionning USB device... And when I try to run the firmware update it says device not found...

I programmed the bootloader with a Bus Pirate and everything seemed fine.

edit: I've noticed the crystal on my pcb is 16 Mhz and the recovery version is 20Mhz... Is there a 16Mhz recovery version? Should this version work too?
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on November 10, 2010, 09:02:46 am
Hi Gesk,

The crystal speed difference is the problem. The 16MHz bootloader is attached.

As far as I know though, no 16MHz OLS shipped without a bootloader. What prompted your upgrade?
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: Gesk on November 10, 2010, 08:39:27 pm
Ok it's fine now thanks!

The reason why I didn't have the right bootloader anymore is that I ran the update .bat program installed with the .exe setup, and the fpga didn't update because the COM port disappeared at that point and reappeared just after. The pic firmware then updated well. I then ran the update process again, had the same problem with the fpga and then pressed cancel for the next step since I had already updated the firmware, but unfortunately the program didn't stop and tried to update it anyway, I didn't put the board in the right mode so it just erased the firmware, I think, and the COM connection was gone. At that point I thought nothing was working but I didn't try to simply reinstall the firmware, and because I had a bus pirate laying around I put the wrong bootloader in and got stuck :D
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: fenyvesi on November 17, 2010, 07:55:11 am
I was unable to refresh firmware when I realized that the bootloader is missing.

I tried to burn it with PICKIT2 without a success. The crystal is 20M. In the burning it says that:
    "Some configuration words not in hex file." If I accept the default values, it doesn't work. (3FF8:07A6, 3FFA:0F5D, 3FFC:09FF, 3FFE: 0104)

I suggest that the 2 last bytes are the dev id-s.

So how to configure it?

Thanks.
George
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on November 17, 2010, 08:06:12 am
Hi fenyvesi - what is the name of the bootloader file you tried to program?
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: fenyvesi on November 17, 2010, 08:27:13 am
OLSv1-bootloader-v1-20MHz.hex from the Rescue package.

In the meantime I tried with BusPirate, the result is the same. After burning there is no serial port.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on November 17, 2010, 08:47:32 am
Thanks fenyvesi,

After burning, did you connect the PGC and PGD pins before plugging in to USB? The ACT LED should light. It will enumerate as an HID device, not a serial port.
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: fenyvesi on November 17, 2010, 09:11:27 am
You won. I haven't tried it, because without it it doesn't recognized as serial port, I thought that it won't work. But after doing it there is a HID device. I am trying the fw upgrade.
Thanks a lot.
George
Title: Re: Bus Pirate OLS bootloader rescue v1 (updated)
Post by: ian on November 17, 2010, 09:35:21 am
Thanks for the update, I'm glad you got it. I'm sorry about the missing bootloader.

The complete update procedure is here:
http://dangerousprototypes.com/docs/Log ... _procedure (http://dangerousprototypes.com/docs/Logic_Sniffer_upgrade_procedure)

The latest firmware and bitstream are linked here:
http://dangerousprototypes.com/docs/Ope ... er#Updates (http://dangerousprototypes.com/docs/Open_Bench_Logic_Sniffer#Updates)