New Windows OLS FPGA (& PIC firmware!) image loader...

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

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby dogsbody » Tue Feb 08, 2011 4:51 am

I know. It won't erase, write (or even verify) the first 2K, or last 1K byte. Lotsa margin.

All previous firmwares I tried were 16K exactly, so I sorta assumed it would always be that way...
-- IED
User avatar
dogsbody
Full Member
Full Member
 
Posts: 181
Joined: Wed Jan 05, 2011 3:17 am
Location: San Jose, California

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby ian » Tue Feb 08, 2011 4:53 am

Got ya, thank you. I exported this one without the config bits, maybe I forgot a time or two previously (that's not great...but I guess we know the apps are all protecting the bootloader well).
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby dogsbody » Tue Feb 08, 2011 5:07 am

Yup. Only time I've ever walloped the config bits is with my PICKit. 16Mhz image on a first-run 20Mhz board (with no bootloader) didn't work so well. This was back when I was first getting my head around everything.

Though I'm not so sure fw_update protects anything. It thinks the program area size is 0x6000. Maybe the bootloader is doing the protecting?

I only put in the check in the first place, because I figured if a firmware -was- corrupted, it'd be highly... inconvenient. :-)

Anyway 2.01 should be plenty robust now.
-- IED
Last edited by dogsbody on Wed Mar 02, 2011 3:36 pm, edited 1 time in total.
User avatar
dogsbody
Full Member
Full Member
 
Posts: 181
Joined: Wed Jan 05, 2011 3:17 am
Location: San Jose, California

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby ian » Tue Feb 08, 2011 5:16 am

There isn't currently any bootloader based protection. I'll add address evaluation to the bootloader. I'm much more comfortable on the uC than desktop programming, I barely got fw_update to compile and put in a few minor mods against the 18f2550 version (though I can compile robot's version in mingw ok).
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby dogsbody » Tue Feb 08, 2011 5:35 pm

ian wrote:I'll add address evaluation to the bootloader.

Definitely a good idea.

btw, belated thanks for the posting in "OLS files and utilities"! Can you edit it have the 2.01 release? I'd like to avoid burning anyone who tries updating to 2.6 firmware... :-(

Thanks!
-- IED
User avatar
dogsbody
Full Member
Full Member
 
Posts: 181
Joined: Wed Jan 05, 2011 3:17 am
Location: San Jose, California

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby ian » Wed Feb 09, 2011 2:17 am

Updated.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby kandos » Wed Feb 09, 2011 5:26 am

dogsbody wrote:
ian wrote:I'll add address evaluation to the bootloader.

Definitely a good idea.

btw, belated thanks for the posting in "OLS files and utilities"! Can you edit it have the 2.01 release? I'd like to avoid burning anyone who tries updating to 2.6 firmware... :-(

Thanks!
-- IED


Unfortunately i got burnt yesterday before i saw this (oh well that will teach me for jumping in to quickly) and i did see the warning in the winloader dialog box but went ahead anyway as i do have a pickit2 and thought it wouldn't be much of a problem to reflash the bootloader if i had to .

I had upgraded to meta4 core and then went to upgrade pic to v2.6 and it crashed and appeared to break the bootloader so i got out my pickit2 soldered a header on the board and flashed this bootloader OLSv1-DUMP-FW21BL2-16MHz and that appeared to work as now OLS is working again.

There is still a problem however, i now can no longer update the pic with any version of fw_update or either version of ols_winloader.With fw_update it tells me device not found and ols_winloader v2.01 states that the file i am trying to burn is 8 bytes too small and if i proceed anyway i get error reading file failed file to large for fpga flash rom.V2.0 just says error writing pic firmware. Windows is seeing it as a comm port with vid 04d8 & pid fc92 .It is also possible to flash any version of the firmware using pickit2 and they work.

Ian mentioned
"Careful, those last 8 bytes are the config words, we need to protect that page because the firmware ships without them, and there are both 20mhz and 16mhz crystal OLSes."
Could this be the problem , i really am not sure because i thought that the config bytes are set in the code i.e in the hex file i burnt.

My board is marked v1.01 with 16mhz crystal.

Any ideas how to solve this
Thanks
Nick
kandos
Newbie
Newbie
 
Posts: 17
Joined: Tue Dec 14, 2010 2:15 am
Location: Sydney

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby dogsbody » Wed Feb 09, 2011 6:14 am

2.0 would erase the firmware, and balk on the latest firmware 8-byte difference. Real helpful that (my bug, not the firmware). v2.01 should have fixed it, and my local copy worked fine. However... I just downloaded the image on the site to double-check and it doesn't match my local copy. What the heck?! Somehow a non-final image got in there. Argh!!

I've uploaded 2.02, which -is- correct. Also stops complaining about the 8 byte difference now.

fyi, the bootloader & config bits were never touched. Just a question of getting firmware downloaded. The 2.0/2.01 releases would work fine with earlier firmware. fw_update should have worked also.

Nick, use your PICKIT to install the bootloader -only-. If you install firmware using PICKIT, you won't have a bootloader anymore. Once the bootloader is installed, plug the Logic Sniffer into your PC. Short the PGC/PGD pins & hit the reset button. Will appear as a HID device. If it doesn't appear, verify the bootloader matches the oscillator on your board. There are 16Mhz & 20Mhz versions.

Now either fw_update or olswinloader will see it, and be able load firmware. I've thoroughly tested 2.02. With & without firmware it'll work. Even aborted in the middle of an update, and it'll recover. Worst you'll need to do is short the PGC/PGD pins.

Ian & everyone, I'm so very sorry about this headache...
-- IED
Attachments
ols_winloader_v2.02.zip
(105.94 KiB) Downloaded 359 times
ols_winloader_src_v2.02.zip
(108.92 KiB) Downloaded 365 times
Last edited by dogsbody on Wed Feb 09, 2011 1:37 pm, edited 2 times in total.
User avatar
dogsbody
Full Member
Full Member
 
Posts: 181
Joined: Wed Jan 05, 2011 3:17 am
Location: San Jose, California

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby kandos » Wed Feb 09, 2011 6:46 am

Thanks dogsbody for the quick reply just tried it and everything now works fine.I really do not know what happened originally but i should have realised that burning just the firmware with the pickit2 would erase the bootloader,my only excuse is it was a long hot day at work and the A/C had broken down so i think my brain was a bit cooked.Anyway thanks again for your help and contribution to the site.
Nick
kandos
Newbie
Newbie
 
Posts: 17
Joined: Tue Dec 14, 2010 2:15 am
Location: Sydney

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby dogsbody » Wed Feb 09, 2011 6:47 am

Cooked brains. A perfect explanation for my 2.01 fiasco! Cheers! :-)
-- IED
User avatar
dogsbody
Full Member
Full Member
 
Posts: 181
Joined: Wed Jan 05, 2011 3:17 am
Location: San Jose, California

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby jack.gassett » Wed Feb 09, 2011 12:45 pm

Awesome, I'll include this in the Windows installer once we are ready to move beyond the test release to a full release.

Jack.
jack.gassett
Developer
Developer
 
Posts: 319
Joined: Tue Nov 17, 2009 12:47 pm

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby ian » Mon Feb 21, 2011 8:05 am

I split the winbond read discussion to here:
viewtopic.php?f=23&t=1901&p=18273#p18273
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby Rubu » Wed Mar 02, 2011 3:25 pm

This makes updating so easy and fast, great!
Found one minor 'bug' though, in the screenshot, it shows the OLS as "COMx (Logic Sniffer CDC-232)"
But for me it says "COMx (Port_#0001.Hub_#0005)".
So instead of displaying the bus reported device description (Logic Sniffer CDC-232, It does send that through just fine) it displays the location information.
Not really a problem as updating went fine, but if I would've had more COMports connected it would've been a hassle.
Other than that, great work (on the verilog core, too)!
Rubu
Jr. Member
Jr. Member
 
Posts: 88
Joined: Wed Oct 20, 2010 12:38 pm
Location: Netherlands

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby dogsbody » Wed Mar 02, 2011 3:33 pm

Doh. What OS version are you running? (ie: XP, Vista, Win7, etc...)

The description comes from Windows, but I may need a better USB database parser. Thanks for the report!
-- IED
User avatar
dogsbody
Full Member
Full Member
 
Posts: 181
Joined: Wed Jan 05, 2011 3:17 am
Location: San Jose, California

Re: New Windows OLS FPGA (& PIC firmware!) image loader...

Postby Rubu » Wed Mar 02, 2011 4:12 pm

Sorry, just realized I forgot to post what windows version too! I'm on Win7 64Bit.
Gave it a quick check on WinXP and that worked fine.
Rubu
Jr. Member
Jr. Member
 
Posts: 88
Joined: Wed Oct 20, 2010 12:38 pm
Location: Netherlands

PreviousNext

Return to Open Bench Logic Sniffer

cron