Skip to main content
Topic: Brand new OLS (boot)loader tool - Windows and Linux (Read 123456 times) previous topic - next topic

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #45
I downloaded on 28th, so I guess this is the last version, from https://github.com/robots/ols-fwloader

Re: Re: Brand new OLS bootloader tool - Windows and Linux

Reply #46
Sorry, forgot to do the branch switching. Never used git before :)

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #47
Here is the result:

Code: [Select]
tayken@tayken-eee:~/Downloads/robots-ols-fwloader-b58e7dd$ ./ols-fwloader -f BOOT -n -P /dev/OLS -V -W -w ../ols-firm/OLSv1-firmware-v2.1.hex 
Found OLS HW: 1, FW: 2.1, Boot: 1
Found flash: ATMEL AT45DB041D
OLS switched to bootloader mode
Bootloader version 0.2.2
Bootloader version 0.2.2
Reading file '../ols-firm/OLSv1-firmware-v2.1.hex'
Erasing flash ...
Writing flash ... (0x0800 - 0x3c00)
Protecting bootloader - skip @0x3be0
Checking flash ... (0x0800 - 0x3c00)
Verified OK! :)

Re: Re: Brand new OLS bootloader tool - Windows and Linux

Reply #48
I have merged the branches into master, so less confusion happens :) will remove the old branch once i figgure out how-to ...

Re: Re: Brand new OLS bootloader tool - Windows and Linux

Reply #49
Is the FPGA update implemented in this? I tried it as in the help menu but couldn't succeed.

Re: Re: Brand new OLS bootloader tool - Windows and Linux

Reply #50
It is.

-P /dev/ttyACM0 -f APP -W -V -w file_to_write.hex (-t BIN if it is binary file)

Re: Re: Brand new OLS bootloader tool - Windows and Linux

Reply #51
Gives "Unknown file type" error with: ./ols-fwloader -f BOOT -n -P /dev/OLS -V -W -t ../2.12TestRelease/2.12/Logic_Sniffer_dynamic_depth.bit (and also same with .mcs file)

Re: Re: Brand new OLS bootloader tool - Windows and Linux

Reply #52
it shoud be

./ols-fwloader -f app -n -P /dev/OLS -V -W -w ../2.12TestRelease/2.12/Logic_Sniffer_dynamic_depth.bit -t BIN

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #53
Also tried that, no success:

Code: [Select]
tayken@tayken-eee:~/Downloads/robots-ols-fwloader-b58e7dd$ ./ols-fwloader -f app -n -P /dev/OLS -V -W -w ../2.12TestRelease/2.12/Logic_Sniffer_dynamic_depth.bit -t bin
Found OLS HW: 1, FW: 2.1, Boot: 1
Found flash: ATMEL AT45DB041D
OLS switched to bootloader mode
Reading file '../2.12TestRelease/2.12/Logic_Sniffer_dynamic_depth.bit'
Erasing flash ...
Cannot erase unknown flash

Re: Re: Brand new OLS bootloader tool - Windows and Linux

Reply #54
ok i see the problem now. "-n" parameter should not be there. I have fixed the source to disregard it when not using bootloader.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #55
That solved my problem!

Code: [Select]
tayken@tayken-eee:~/Downloads/robots-ols-fwloader-b58e7dd$ ./ols-fwloader -f app -P /dev/OLS -V -W -w ../2.12TestRelease/2.12/Logic_Sniffer_dynamic_depth.bit -t bin
Found OLS HW: 1, FW: 2.1, Boot: 1
Found flash: ATMEL AT45DB041D
Reading file '../2.12TestRelease/2.12/Logic_Sniffer_dynamic_depth.bit'
Erasing flash ...
Chip erase ... done :)
Will write 642 pages
.....................
Checking flash ...
.....................
Verify OK

Very cool robots!  Also did some minor editing to the main.c file, starting from line 62, changed it into:

Code: [Select]
	printf("nn");
printf("Write PIC firmware with verification, enter bootloader first:n");
printf(" ols-fwloader -f BOOT -n -P /dev/ttyACM0 -V -W -w firmware.hex  n");
printf("Write FPGA bitstream:n");
printf(" ols-fwloader -f APP -P /dev/ttyACM0 -V -W -w bitstream.bit -t BINn");
printf("n");

So that I don't have to remember what to write each time I run the program. :)

Re: Re: Brand new OLS bootloader tool - Windows and Linux

Reply #56
I have made similar change :-) thanx

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

Reply #57
Nice work, it seems like the app has stabilized. I started a page for it on the wiki with the current links:
http://dangerousprototypes.com/docs/Log ... pplication

I will add links to final compiles and examples when available.
Got a question? Please ask in the forum for the fastest answers.

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

Reply #58
here is executable of the latest git version. I have compiled it for linux, and crosscompiled for win32. I hope it works :)

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

Reply #59
I tried to compile it from source, but am not successful. It looks like it needs an include file 'libusb.h', which is missing on my system (Ubuntu 10.4 LTS). I have libusb-dev installed and it provides a 'usb.h' file instead. But even if I change 'ols-boot.h' to include 'usb.h' instead of 'libusb.h' I get the same compile error.

So it looks to me ols-loader has another prerequisite than libusb-dev.

Code: [Select]
$ make
gcc  -I/usr/include/libusb-1.0  -c main.c
In file included from main.c:13:
ols-boot.h:11:20: error: libusb.h: No such file or directory
In file included from main.c:13:
ols-boot.h:35: error: expected specifier-qualifier-list before ‘libusb_context’
make: *** [main.o] Error 1
Markus
Markus