Skip to main content
Topic: New Windows OLS FPGA (& PIC firmware!) image loader... (Read 67455 times) previous topic - next topic

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

Reply #15
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
-- debugging hardware at 2am is a bad idea...

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

Reply #16
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).
Got a question? Please ask in the forum for the fastest answers.

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

Reply #17
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. :-)

[s:]Anyway 2.01 should be plenty robust now.[/s:]
-- IED
-- debugging hardware at 2am is a bad idea...

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

Reply #18
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).
Got a question? Please ask in the forum for the fastest answers.

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

Reply #19
[quote author="ian"]I'll add address evaluation to the bootloader.[/quote]
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
-- debugging hardware at 2am is a bad idea...

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

Reply #20
Updated.
Got a question? Please ask in the forum for the fastest answers.

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

Reply #21
[quote author="dogsbody"][quote author="ian"]I'll add address evaluation to the bootloader.[/quote]
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[/quote]

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

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

Reply #22
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
-- debugging hardware at 2am is a bad idea...

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

Reply #23
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

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

Reply #24
Cooked brains.  A perfect explanation for my 2.01 fiasco!  Cheers! :-)
-- IED
-- debugging hardware at 2am is a bad idea...

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

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

Jack.

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

Reply #26
I split the winbond read discussion to here:
viewtopic.php?f=23&t=1901&p=18273#p18273
Got a question? Please ask in the forum for the fastest answers.

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

Reply #27
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)!

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

Reply #28
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
-- debugging hardware at 2am is a bad idea...

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

Reply #29
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.