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.

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

Postby dogsbody » Sat Jan 08, 2011 7:35 pm

[-- Edit Jan 9th - Added source code], [-- Edit Jan 10th - Added github repository], [-- Edit Feb 6th - Added support for programming PIC firmware], [ -- Edit Feb 8th - Added flexibility for PIC firmware variations & now detects if OLS already in bootloader mode when starting.], [ -- Edit Feb 9th - Removed complaint about 8 byte difference in 2.6 firmware. Fixed stupid build problem with 2.01], [ -- Edit Mar 14th - Fixed Logic Sniffer detection for Windows Vista & 7.]
[ -- Edit May 14th, 2012 - Updated Flash ROM Table.]

Hi,
Since I've been busy on fpga tweaking I decided to make myself a
polished Windows GUI OLS loader. 

I've attached screen images & a ZIP with the EXE.  Supports HEX,
MCS (same as HEX), BIN (binary), -and- Xilinx native BIT files.

It can update either the FPGA ROM file, or the PIC firmware. Simply pick the
image file, and olswinloader handles the rest. No knobs, or extra checkbox
required!

Source is available below and on Github: https://github.com/ied/olswinloader

Enjoy! 
-- IED
Attachments
ols_winloader_v2.04.zip
(107.21 KiB) Downloaded 852 times
ols_winloader_src_v2.04.zip
(113.42 KiB) Downloaded 481 times
olswinloader1.JPG
olswinloader2.JPG
Last edited by dogsbody on Mon May 14, 2012 1:50 pm, edited 10 times in total.
-- debugging hardware at 2am is a bad idea...
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 image loader...

Postby ian » Sun Jan 09, 2011 3:28 am

Very nice! I really like the auto port detect, it is such a pain to go to the device manager every time to see what port is being used. Ill use this app for sure.

There are a couple new rom additions for the v1.04 boards that are not in svn yet, ill try to get them committed or post the data here.

Ols-loader was made by robots from pirate-loader made by pppd. There is no stated license, but i think we can ( and do) consider it gpl.
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: New Windows OLS FPGA image loader...

Postby robots » Sun Jan 09, 2011 4:52 am

Let's make it GPL :-) I should probably patch the source to include the GPL statement and other stuff. (one day i will)
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: New Windows OLS FPGA image loader...

Postby dogsbody » Sun Jan 09, 2011 9:39 pm

ian wrote:There are a couple new rom additions for the v1.04 boards...


No problem.  If it's ok, a short post here would probably be easier.  I made some changes to the original code, to return error codes instead printing error messages.

Also, I've attached source now (in first message).  It includes a revised ols_loader that uses the new plumbing if your interested. 

Cheers!
-- IED
Last edited by dogsbody on Mon Jan 10, 2011 2:31 am, edited 1 time in total.
-- debugging hardware at 2am is a bad idea...
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 image loader...

Postby ian » Mon Jan 10, 2011 2:20 am

Code: Select all
const struct pump_flash_t PUMP_Flash[] = {
   {
      "\x1f\x24\x00\x00",
      264, // size of page
      2048, // number of pages
      "ATMEL AT45DB041D"
   },
   {
      "\x1f\x23\x00\x00",
      264, // size of page
      1024, // number of pages
      "ATMEL AT45DB021D"
   },
    {
      "\xef\x30\x13\x00",
      256, // size of page
      1024, // number of pages
      "WINBOND W25X40"
   },
    {
      "\xef\x30\x12\x00",
      256, // size of page
      1024, // number of pages
      "WINBOND W25X20"
   },
};


Thanks for the update. Here's the ROM struct.
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: New Windows OLS FPGA image loader...

Postby dogsbody » Mon Jan 10, 2011 2:33 am

ian wrote:Thanks for the update. Here's the ROM struct.


Got it.  Easy update.  Quick question...  Since the "WINBOND W25x40" is a 4MBit device , shouldn't it have 2048 pages? 
-- IED
-- debugging hardware at 2am is a bad idea...
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 image loader...

Postby ian » Mon Jan 10, 2011 2:37 am

Probably :) The OLS only uses the first 2MBIT and I don;t think the app does anything with that value (beside range check?), so it shouldn't cause issues, but I updated it in the source anyways.
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: New Windows OLS FPGA image loader...

Postby dogsbody » Mon Jan 10, 2011 3:31 am

The loader is now updated with the latest flash rom support.  :)
-- IED
-- debugging hardware at 2am is a bad idea...
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 image loader...

Postby robots » Mon Jan 10, 2011 3:45 am

You should make it part of some Source tracking system, like git, svn .... It gets really annoying managing the source in forum :-)
I personally suggest git (github, gitorious, unless you have your own).
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: New Windows OLS FPGA image loader...

Postby dogsbody » Mon Jan 10, 2011 4:47 am

We'll that was fun...  Never created a public repository before.  First time for everything I guess. 
Anyway, here you go:

https://github.com/ied/olswinloader

-- IED
Last edited by dogsbody on Tue Feb 08, 2011 4:49 am, edited 1 time in total.
-- debugging hardware at 2am is a bad idea...
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 image loader...

Postby robots » Mon Jan 10, 2011 4:52 am

You will appreciate it when it comes to patches :-)
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: New Windows OLS FPGA image loader...

Postby dogsbody » Sun Feb 06, 2011 7:05 am

I've updated my Windows GUI OLS loader to support programming PIC firmware. There are no extra knobs or buttons needed.

Just select an image file, and the loader knows where to put it. Small files for the PIC, big files for the FPGA.

Cudos to robots for discovering the trick to fast PIC updates. See first post for images & source code.

Enjoy!
-- IED
Attachments
ols_winloader_v2.0.zip
(105.5 KiB) Downloaded 498 times
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 3:24 am

This utility is ridiculously handy! I LOVE it!

I added a copy to the list of update utilities.
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 4:42 am

Glad you like it!

Unfortunately I just found it didn't like the new 2.6 PIC firmware. Doh. The firmware was 8 bytes too small, and the loader too hyper-sensitive. So I've added a little flexibility there. Now it complains, but will continue.

Also, the image loader now detects a Logic Sniffer in HID mode from the start. Just in case the Logic Sniffer hiccuped, or doesn't have valid firmware, etc...

I apologize to anyone snafu-ed by this. If you short the PGC/PGD pins & hit the reset button, you'll kick the OLS into bootloader mode. Remove the short & the 2.01 loader will see & update it then.
-- IED
Last edited by dogsbody on Wed Feb 09, 2011 6:36 am, edited 4 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 ian » Tue Feb 08, 2011 4:44 am

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.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Next

Return to Open Bench Logic Sniffer