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

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #15
-n does wait 1 second for the device and then tries to connect. 1 second is long enough for linux. I RTFM and Sleep in windows does sleep in ms not s.
- I have not tested veryfy with .hex, i need to set the buffer to 0xff for it to work.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #16
i have reuploded new binary, can you check the problems now ? 

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #17
Thanks for the update. I tried it again with slightly improved results:

*First fw update jumped to bootloader OK, seems to program OK (OLS keeps working), verify fail
*Second fw update failed jump to bootloader. I did a couple tests: it will work if it has just been plugged in. It always fails if I press reset and hold update to enter ROM update mode. It does not seem to wait a full second, but I'm not timing it or anything.
*Bitstream update completes ok, but the device never loads, so I guess it was mangled in some way.

Test screenshots attached. I created a test rig for your prog, so if you have other updates I can test them quickly and easily from now on.
Got a question? Please ask in the forum for the fastest answers.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #18
I am having difficulties communicating with OLS in my setup (Windows + Vmplayer = disaster :( ). The FW update works fine, but serial port communication is broken. I have increased the timeout to 2seconds (1 second was too little).  The verification should be fixed as well, it should only verify the application and not fuses.

I have uploaded new version that has "-d" parameter, It will print where the differences are in verification. You will probably want to output into a file like "ols-fwloader xxxxx > file.txt"

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #19
I have tested it on windows (actuall laptop with windows) and it seems to work correctly.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #20
Nice job, the firmware works great no matter what I do to it.

Does the bitstream loader also default to BIN? I used a .hex first and the FPGA didn't load. Then I noticed the page count and did it again with a .bit and it worked ok.
Got a question? Please ask in the forum for the fastest answers.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #21
Both default to BIN, I can make it hex for firmware and Bin for bitstream.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #22
It's probably best to be consistent and keep them both bit or HEX. I would suggest HEX as the default because it requires the least processing for firmware and bitstream releases.
Got a question? Please ask in the forum for the fastest answers.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #23
I have changed default type to HEX, and attached are compiles for linux and windows.

More trials are welcome :-)

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #24
I've got a post queued too.
Got a question? Please ask in the forum for the fastest answers.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #25
The combined tool ols-fwloader (2nd post above) works fine for me in BIOS mode but not in APP mode:
I'm using a working board which I can use in the OLS client

$ dmesg
cdc_acm 6-2:1.0: ttyACM0: USB ACM device
$ ll /dev/ttyACM0
crw-rw-rw- 1 root dialout 166, 0 Jan 19 17:00 /dev/ttyACM0

% TRIG led is on

$ ./ols-fwloader -f APP -P /dev/ttyACM0 -R -r dump.hex
Found OLS HW: 0, FW: 0.0, Boot: 0
Error - unknown flash type (00 00 00 00)
Unable to read Flash ID
Unable to open OLS

% now the ARM led is ON and if I'm running it again it waits 5 seconds and then displays:

$ ./ols-fwloader -f APP -P /dev/ttyACM0 -R -r dump.hex
Error reading OLS id
Unable to read ID
Unable to open OLS

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #26
Quote
Error - unknown flash type (00 00 00 00)

This means you are not in update mode. I should probably add check for that.

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #27
What update mode ?

In PIC update firmware mode with the jumper on all is fine

$ sudo ./ols-fwloader -f BOOT -V -w OLSv1-firmware-v2.1.hex
Bootloader version 0.2.2
Bootloader version 0.2.2
Checking flash ... (0x0800 - 0x3c00)
Verified OK! :)

In this mode the update happens directly over the USB VID/PID device

Run it a second time gives
$ sudo ./ols-fwloader -f BOOT -V -w OLSv1-firmware-v2.1.hex
Com timeout

A third time works again

Now if I remove the jumper to enumerate the ACM0 port I get the errors from the previous post.

The example you give in the help screen doesn't work at all; it just prints the help again
Write FPGA bitstream:
 ols-fwloader -f APP -W -w bitstream.hex

How am I supposed to use the upgrader in APP mode?

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #28
jumper is for bootloader entry. Update mode is entered by pressing update button and reseting/starting the device. The led next to power led should be lit and solid. In this mode you can access the SPI flashrom for bitstream update.

 

Re: Brand new OLS bootloader tool - Windows and Linux

Reply #29
My mistake, I completely forgot about that button trick since the last time I did it.

$ ./ols-fwloader -f APP -P /dev/ttyACM0 -R -r dump.hex
Found OLS HW: 1, FW: 2.1, Boot: 1
Found flash: ATMEL AT45DB041D
Reading flash

Now it works; You should maybe mention it as an error message.
Also please update the example for the APP mode because it's easier to paste the command with the mouse.