Brand new OLS (boot)loader tool - Windows and Linux

A cheap logic analyzer. Get one for $50, including worldwide shipping. A collaboration between the Gadget Factory and Dangerous Prototypes.

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby tayken » Tue Feb 01, 2011 10:39 am

I'm using the same system (Ubuntu 10.04 LTS). I installed libusb-1.0-0-dev package, that can solve your problem.
User avatar
tayken
Developer
Developer
 
Posts: 1502
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby markus_b » Tue Feb 01, 2011 1:02 pm

Yes, you are right, installing libusb-1.0-0-dev in addition to libusb-dev solves the problem. It looks like these share the same name, but are two different beasts. What a mess !

Thanks Markus
User avatar
markus_b
Full Member
Full Member
 
Posts: 116
Joined: Mon May 17, 2010 5:24 am
Location: Switzerland

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby robots » Tue Feb 01, 2011 1:12 pm

it is ment for libusb-1.0 I am not sure about ubuntu and it's library versions. I should probably update the makefile to make it less system specific.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby markus_b » Tue Feb 01, 2011 3:52 pm

There is no point to change the Makefile, you need the 'libusb-1.0-0' library and not the 'libusb' library. These two are two distinct different entities. Thats why I qualify this as mess.

But you could mention in the readme that the 'libusb-1.0-0' library is needed and that 'libusb' is something different which is not sufficient.
User avatar
markus_b
Full Member
Full Member
 
Posts: 116
Joined: Mon May 17, 2010 5:24 am
Location: Switzerland

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby robots » Tue Feb 01, 2011 4:01 pm

On gentoo it's libusb. The library its self is libusb-1.0. But let's not get into package naming discussion.

I will add autotools configure, that will check everything. I just need to learn how to.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby markus_b » Tue Feb 01, 2011 5:31 pm

Don't worry, a few words about the libraries needed in the README will suffice.

Now, for me the compile problem is solved, thanks.

Unfortunately, I'm still unable to use ols-fwloader correctly. At the moment I'm struggling with very basic functions (and probably understanding).

I have my OLS since last summer and have no idea what the version of the boot loader, the PIC firmware and the FPGA bitstream is. I'm not even sure if I name there items correctly and if the list is exhaustive. So I have plenty of questions:

1) If I run: ols-fwloader -f BOOT -n -V -w PIC_firmware/OLSv1-firmware-v2.1.hex
I suppose this will fetch the PIC firmware and compare it to the file named, this way I can check if I'm at a certain firmware level. There seems to be no way to determine directly at which firmware level I'm at.

2) There seems to be contradictions in the help information: If I run 'ols-fwloader -f BOOT -n' I get the error message 'Missing port' (the -P <port> is missing) even though the '-n' flag is in the 'BOOT only' and the '-P' flag is in the 'APP only' options. I would assume the two options are mutually exclusive.

3) I don't quite understand the notions 'BOOT' and 'APP'. I'm inclined to think 'BOOT' is the PIC firmware (*not* the boot loader) and 'APP' is the fpga bitstream. Is that correct ?

4) I suppose I have to place the OLS into 'update mode' (ACT and PWR leds lit) before launching 'ols-fwloader'. I don't quite understand the '-n' 'enter bootloader first' option. Does this option allows me to run the 'ols-fwloader' without the OLS being placed in 'update mode' ?

5) Last, but not least, when I run the command 'ols-fwloader -f BOOT -V -w PIC_firmware/OLSv1-firmware-v2.1.hex'
I get the error 'Device not found' (independent of the OLS being in 'update mode' or not). I can access it using the Java sump client with no problem, though...

Sorry to bother with that many questions, but I'm a bit lost in (OLS-) space. I suppose most of the answers to this should go into the wiki page mentioned earlier in this thread.

Markus
User avatar
markus_b
Full Member
Full Member
 
Posts: 116
Joined: Mon May 17, 2010 5:24 am
Location: Switzerland

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby ian » Wed Feb 02, 2011 1:53 am

I can help with some of these:

1) If I run: ols-fwloader -f BOOT -n -V -w PIC_firmware/OLSv1-firmware-v2.1.hex
I suppose this will fetch the PIC firmware and compare it to the file named, this way I can check if I'm at a certain firmware level. There seems to be no way to determine directly at which firmware level I'm at.

In ROM update mode the program will read and report the bootloader, PIC firmware, and hardware version. There is no way to tell the FPGA version without reading the bitstream and verifying it against a known source.

4) I suppose I have to place the OLS into 'update mode' (ACT and PWR leds lit) before launching 'ols-fwloader'. I don't quite understand the '-n' 'enter bootloader first' option. Does this option allows me to run the 'ols-fwloader' without the OLS being placed in 'update mode' ?


No. The bootloader is entered by placing a jumper between PGC and PGD - OR - an application can send a command and jump to the bootloader from ROM update mode. -n sends the command and jumps to bootloader mode after updating the ROM.

5) Last, but not least, when I run the command 'ols-fwloader -f BOOT -V -w PIC_firmware/OLSv1-firmware-v2.1.hex'
I get the error 'Device not found' (independent of the OLS being in 'update mode' or not). I can access it using the Java sump client with no problem, though...


If you do not use the app to jump from ROM to bootloader mode, then it will not be detected. Try using the -n option, or enter bootloader mode manually by connecting the PGC and PGD pins of the ICSP header and resetting. The OLS will enumerate as a HID device.

I highly recommend Logic Sniffer 101, it has an introduction to the different modes, how to enter them, and what they do:
http://dangerousprototypes.com/docs/Logic_Sniffer_101
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby markus_b » Wed Feb 02, 2011 3:36 am

Thanks Ian,

re-reading that page started to clear things up. Having a night of sleep in between helped too :-).

I've updated stuff on the wiki page at http://dangerousprototypes.com/docs/Log ... pplication

Can you re-read to verify that I did not say something wrong ?
User avatar
markus_b
Full Member
Full Member
 
Posts: 116
Joined: Mon May 17, 2010 5:24 am
Location: Switzerland

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby tayken » Wed Feb 02, 2011 3:54 am

I did some minor editing in the usage part, examples are now as in main.c file.
User avatar
tayken
Developer
Developer
 
Posts: 1502
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby ian » Wed Feb 02, 2011 4:01 am

Thanks markus,

The updates look great. The only thing I would add is that the new utility can do both operations at once - first update the bitstream, then jump to the bootloader and update the PIC firmware.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby robots » Wed Feb 02, 2011 4:18 am

tayken wrote:I did some minor editing in the usage part, examples are now as in main.c file.


Aand where do i find it ? :-)

ian wrote:Thanks markus,

The updates look great. The only thing I would add is that the new utility can do both operations at once - first update the bitstream, then jump to the bootloader and update the PIC firmware.


This will probably not happen to the tool. You can always write script that will run the 2 commands. :-)

One thing that would help, command in the firmware that would enter update mode. Something like triggering RTS line (on virtual com). This way you could really update, without users interaction.

3) I don't quite understand the notions 'BOOT' and 'APP'. I'm inclined to think 'BOOT' is the PIC firmware (*not* the boot loader) and 'APP' is the fpga bitstream. Is that correct ?


Boot means you want to talk to the bootloader. App means you want to talk to the application.

2) There seems to be contradictions in the help information: If I run 'ols-fwloader -f BOOT -n' I get the error message 'Missing port' (the -P <port> is missing) even though the '-n' flag is in the 'BOOT only' and the '-P' flag is in the 'APP only' options. I would assume the two options are mutually exclusive.


Yes if you look at it this way, it is a contradiction. But to enter bootloader from update mode, you need to be able to speak with the device. Switching to bootloader will make APP only switches useless.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby ian » Wed Feb 02, 2011 4:39 am

ian wrote:Thanks markus,

The updates look great. The only thing I would add is that the new utility can do both operations at once - first update the bitstream, then jump to the bootloader and update the PIC firmware.



This will probably not happen to the tool. You can always write script that will run the 2 commands. :-)



Sorry, I thought it did this already. I just meant to add it to the documentation.

I'll see about adding an easier jump from firmware to ROM update mode, that is a great idea.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby robots » Wed Feb 02, 2011 4:43 am

I forgot.

markus_b wrote:Don't worry, a few words about the libraries needed in the README will suffice.

Now, for me the compile problem is solved, thanks.


This it what is called Worksforme state. It may work for you, but will not work on other systems where the headers/libs are not in the same location. So autotools is the best choice.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby markus_b » Wed Feb 02, 2011 4:46 am

I still have questions :-).

The 'ols-fwloader' always uses serial port emulation to connect to either the APP loader (update FPGA firmware) or the BOOT loader (update PIC firmware). What is the use of the '-p pid' and '-v vid' flags ?

Could we change the error message, when you can not connect from 'Device not found' to 'Could not connect to device <vid>,<pid>: Is the OLS in update mode ?'.
User avatar
markus_b
Full Member
Full Member
 
Posts: 116
Joined: Mon May 17, 2010 5:24 am
Location: Switzerland

Re: Brand new OLS (boot)loader tool - Windows and Linux

Postby markus_b » Wed Feb 02, 2011 4:49 am

robots wrote:This it what is called Worksforme state. It may work for you, but will not work on other systems where the headers/libs are not in the same location. So autotools is the best choice.

Yes, a proper 'configure' script would be great. It does not address the confusion about the two (incompatible) libusb libraries (libusb and libusb-1.0) though. This is what I think should be addressed in the README.
User avatar
markus_b
Full Member
Full Member
 
Posts: 116
Joined: Mon May 17, 2010 5:24 am
Location: Switzerland

PreviousNext

Return to Open Bench Logic Sniffer