Papilio Pro Beginner Tips


EJK

Recommended Posts

Hi,

 

I just got started with Papilio Pro last week (side note: Great work with the papilio family and wings.. Im really excited about the board's potential). The Pro was my first entry to the papilio line. 

 

I was mostly able to figure out how to get the board running and programming. But, many of the instructions/downloads on the papilio website are either outdated or directed towards Papilio One, so getting started took about 4 hours longer than I expected. I thought I'd put together a list of links and instructions for problems I encountered along the way so that perhaps others starting with the Papilio Pro could have something up-to-date (well, as of April 2013, that is):

 

 

1. Windows FTDI Drivers: I had some real trouble getting the Papilio recognized as both a USB and a virtual COM port. For my problem, the device was ALWAYS recognized on Windows-- even when I did not have the Gadget Factory drivers installed. And it never showed a virtual COM port. Troubleshooting suggests using a different cable, or editing the device properties

 

Apparently in my situation, the Papilio was recognized as an FTDI device first and was not using the Gadget Factory drivers. My solution: Download the FTDI CDM Uninstaller.

Using FTDI's USBView utility, find the Device Vendor ID and Product ID. Use the CDM Uninstaller to uninstall the FTDI drivers for the Papilio. After plugging and replugging, Windows recognized a virtual COM port. I could also connect through putty and see the default ASCII table output which was apparently the factory default program.

 

 

2. Getting Started Bitfile: http://papilio.cc/index.php?n=Papilio.GettingStarted It appears as though the getting started website (as of April 5 2013) does not include the getting started bit file for Papilio Pro. In my beginner state, I assumed this website would have the materials I needed, so I fumbled around trying to use the Papilio One 500K bitfile. After a while, I realized it certainly doesnt make sense to try to use the Papilio One bitfile, especially since the Papilio Pro uses a completely different FPGA. I dont think I've found a replacement for the "Getting Started" bitfile for the LX9 yet. 

 

 

3. Papilio Loader: As with the bitfiles, the Papilio Loader GUI on the Getting Started Page is out of date (it downloads v1.7). According to a forum discussion around December 2012, the Papilio Loader was modified to support the Papilio Pro. Download the Papilio Loader GUI specifically from the Downloads webpage (this should be version 2.1 or later): http://forum.gadgetfactory.net/index.php?/files/category/2-papilio-fpga/

 

 

4. ZPUino Core and Loader: I think the official ZPUino download page is a little out of date for Papilio Pro. It looks like the papilio website ZPUino getting started guide is out of date too- It uses an old version of the IDE and does not include links for the Papilio Pro bitfiles. Instead a forum post indicates the RetroCade installer works with the Papilio Pro. 

 

So, to get the ZPUino to work, download the Retrocade Synth Windows Installer from the Download Page. Use the bitfile ZPUIno_SOC/zpuino-1.0-PapilioPro-S6LX9-RetroCade-1.0.bit to program the Pro. The installer should also include a version of the Arduino GUI which includes a board option for ZPUino on Papilio Pro (LX9).

 

 

5. Intro to FPGA Book: With a functioning Papilio Loader and a ZPUino core/ GUI, I was basically good to go with the Intro to FPGA E-book. I also installed the Xilinx toolchain as instructed. No issues there. I'm looking forward to generating and programming with my own bitfiles shortly. It would, however, be nice to have an updated Xilinx webpack quickstart page: http://papilio.cc/index.php?n=Papilio.XilinxISEWebpackQuickStart.

 

EDIT: I installed the wrong Xilinx tools at first. The default link inside the Intro to FPGA E-book now leads to the Xilinx Vivado suite, which doesnt support the Spartan 3 or Spartan 6 series. Instead, make sure to download and install the ISE Design Suite

 

 

6. Papilio Arcade: I also tried the papilio arcade wing. Just make sure to download the correct LX9 bit files from the github :) https://github.com/GadgetFactory/Papilio-Arcade

 

 

I havent looked at the AVR8 softcore processor. This is on my list to test with the Papilio Pro, along with some other fun things (SoC editor is on the horizon too). Like I said, Im a big fan of the board. Overall, it looks to be a really great FPGA. I do want to see the usability/ learning curve get to the Arduino level, and it helps to have a good getting started procedure for all boards. Hopefully this helps another beginner in the same situation. Thanks for all the work so far!

 

EJ

  • Like 2
Link to comment
Share on other sites

EJ,

 

Thank you for this helpful writeup, I'm going to make it a sticky post.

 

It has become very clear that we need to make documentation a priority. I've put all new projects on hold and we have had meetings the past three days to figure out how to make our documentation better serve the community. Updating everything for Papilio Pro support is going to be easy, the bigger problem we have is organizing things to make it easier to find and creating a top level index. The other issue kicking around is that I want to start writing an eBook for the Papilio SOC schematic editor solution which will include more documentation for the AVR8 and ZPUino. I want this ebook to be in web page form but also easily translate to a PDF. There are a bunch of variables that I'm trying to make sense of and come up with a solution for. I spent all weekend researching documentation solutions that will let us continue to grow with better documentation and I think I'm narrowing in but I still need a couple more days to work out the infrastructure. Once I get the infrastructure nailed I'm going to really dive into updating the existing documentation and then expanding on what we have.

 

Please hang with us, we are putting serious time into this problem and intend to do some spring cleaning in regards to our documentation.

 

Thanks,
Jack.

Link to comment
Share on other sites

I got my Pro last night yipee! 

 

The above post section "1. Windows FTDI Drivers:" worked for me. It appears my Pro came with a firmware installed, as I see the LED1 blinking at about a 1 second rate, and the RX LED is also blinking. Following the above, I got putty to connect a port as 9600/8/n/1 and I see a bunch of stuff coming out of it. 

 

I had to change the CDM uninstaller product ID to 0x6010 it was originally 6001. After this change, when I hit "add", it showed a device was attached. which I then removed. To find the 6010 I didn't see the ID under device manager, in my case WIN7 64x is virtual under Ubuntu, so I used a terminal and lsusb to find the below. 

 

Bus 004 Device 029: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
 
After removal, it grabbed different drivers. I also think that if I had installed the loader before I connected the USB it would have grabbed the correct drivers from the start. However I got eager and plugged it in then though, now what. So if you install the program first, you probably won't have to do the uninstaller thing. In either case, you will probably have to do the VCP thing.
 
I then checked the VCP (?Virtual Com Port?) option and re-plugged the USB. After it came up again, it registered as a mouse with a com port. However putty couldn't connect. So I again re-plugged it and then putty could connect. Setting putty for the com port, I got a bunch of this stuff
 
123, dec: 123, hex: 7B, oct: 173, bin: 1111011
124, dec: 124, hex: 7C, oct: 174, bin: 1111100
125, dec: 125, hex: 7D, oct: 175, bin: 1111101
 
I see I have loader 2.1, so I'm golden there. 
 
What I wonder now, before I try to upload something, can I download the firmware that's in this? Such that if / when I break it, I can re-install this firmware. 
 
Also Hamsters book is great, it also worked quite well for me. About the only significant question I've had so far is a question about the speed setting when creating a new project. I had -3 and -2 as options. I assumed -3 was slightly slower and perhaps more reliable, so I guessed the default -3 was what I wanted. I have also taken some snap shots of config screens and such as I followed the book. I plan to send those screen captures his way once I verify these variations work.

For now, it's off to the salt mine, will get to play a bit more when in about 10 hours. Yipee!
Link to comment
Share on other sites

I buggered it but it appears I have found the correct bit file. Or at least this one seems to react the same as what was in it. Blinking the LED and communications over putty. My goal was to verify the file, however I buggered it, and overwrote it with an incorrect bit file. When I first opened the programmer, I choose to scan and verify, however when I choose the bit file, it auto-selected write to flash, which I didn't notice. Oops. I programmed it with the below and it appears to be doing something again. 

 

/blah/Test-Plans-master\Papilio_Pro_Verification\bin\QuickStart-Zpuino-1.0-PapilioPro-S6LX9-RetroCade-1.04.bit

 

I see what EJK means about out-dated web pages. I grabbed version 1.3 at first, however the below is part of 1.4. 

 

Now it's time to play with some of my own stuff. Lets see how well I can bugger it :)

Link to comment
Share on other sites

Yes, sorry about the outdated web pages, I'm setting a goal of at least one hour each morning spent on updating documentation before I do anything else.

 

Jack.

 

Thanks for your improvements on documentation! Its really showing already. Im a big fan of the Getting Started guide and the Xilinx Webpack walkthrough. 

Link to comment
Share on other sites

Also Hamsters book is great, it also worked quite well for me. About the only significant question I've had so far is a question about the speed setting when creating a new project. I had -3 and -2 as options. I assumed -3 was slightly slower and perhaps more reliable, so I guessed the default -3 was what I wanted. I have also taken some snap shots of config screens and such as I followed the book. I plan to send those screen captures his way once I verify these variations work.

 

 

 

Are you referring to the speed on the FPGA selection? That's the speed grade of the particular FPGA you are using and is used to compute the timing information when you compile the project. It will be printed on the FPGA chip itself. For beginner projects it shouldn't really matter though, it's not likely you will be doing anything right off the bat that really pushes the speed limits of the FPGA.

Link to comment
Share on other sites

To me speed grades are really confusing - in practice they are just the set of parameters that the device is guaranteed to meet, allowing the tools to ensure that you have a reliable design.

 

 

For example the time required from a clock ticking to the output being available on the output of a Configurable Logic Block (CLB)
 
Grade -3   = 0.45 ns
Grade -3N = 0.53 ns
Grade -2   = 0.53 ns
Grade -1L = 0.74 ns

 

(from http://www.xilinx.com/support/documentation/data_sheets/ds162.pdf)

 

A bitstream for a -2 device will work on a -3 device, but even the simplest design implemented at for -3 device can in theory fail on a -2.

 

The placement of resource and routing is timing aware, and the tools ensure that the design's timing meets the devices requirements. The tools stop at good enough - all it needs is 0.001 ns slack and timing is met.

 

If you want that bit file to work on a -2 grade you need an at least an extra 0.08 ns for the slower output time, and another 0.05 ns for the slower set-up time, and another 0.05 for each level of logic in the path - it soon adds up!

Link to comment
Share on other sites

  • 1 month later...

I too had problems with no virtual serial port device showing up.  Using the FTDI uninstaller app, uninstalling the papilio loader app, and reinstalling with multiple attempts and multiple variations didn't improve anything.  Oddly, even after removing the FTDI drivers (but keeping the loader script in place), I was able to load the starter bitfile without complaint.  Hmm.

 

Oh, my system: 64b windows 7, up to date with patches

 

Anyway, when I would plug in the papilio pro board, windows would show a little notification on the toolbar that it was installing drivers.  I could quickly click it to get more details, but it would rapidly show that it had downloaded and installed drivers off the web, apparently replacing the ones that the loader app installer had installed.  It took a few rounds of uninstalling and reinstalling, but finally I was able to open the dialog and tell windows to skip looking for drivers.  Finally I had a virtual COM8 port, and putty showed that it was receiving a listing of the ASCII table.

Link to comment
Share on other sites

james -- device manager didn't show anything in my case: it showed no LPT/COM ports, and no complaints about unconfigured devices.  Using the microsoft usbview.exe utility, I didn't see anything corresponding to the papilio board either.  Strange that there is such a wide variety of results.  It is also mystifying that windows 7 presumptuously acts like it knows best and didn't offer me a chance to pick my own drivers instead of just rushing to immediately install whatever it determined (incorrectly) is best.  Finally, does anybody know what version of the drivers windows 7 is installing that they don't work with the board?  I would assume they are attempting to install drivers supplied by FTDI, so it is surprising that they are broken.

Link to comment
Share on other sites

Mine didn't show anything obvious either. It was a rather nondescript FTDI device listed under Universal Serial Bus controllers. I think the varying results are largely due to whether or not the user has had other FTDI USB serial devices connected at some point and how they were set up. FTDI is one of two main vendors of USB to serial chips so they're very common. There is an EEPROM within or that can be connected to most of them which can be programmed with unique details.

Link to comment
Share on other sites

  • 9 months later...

Really sad to see that OSX is such a second class citizen, there are not clear instructions or working applications to work with this board in OSX.

 

 

Blame Xilinx for that, it's hardly the Papilio guy's fault that Xilinx ISE doesn't have an OS X version.

 

I can sort of understand why though, historically the Mac has been aimed towards artsy types, photo editing, video production, that sort of thing. Engineering and CAD, FPGA development has generally been done on PCs at the lower end and Unix workstations on the higher end. FPGAs were until recently, very heavy duty stuff involving expensive development tools and a notoriously steep learning curve and consequently not much of a hobbyist side. It stands to reason that there is probably a very low demand for Mac versions of the software, particularly on the professional side which is where the money is.

 

You can boot Linux or Windows on your Mac though so it's not a huge obstacle.

Link to comment
Share on other sites

Really sad to see that OSX is such a second class citizen, there are not clear instructions or working applications to work with this board in OSX.

 

Hey Jarrod,

 

Unfortunately Xilinx doesn't support OSX with their ISE software so it has indeed flown under the radar. I did hire an OSX guru to make an install package for the Papilio Loader so people could load bit files in OSX. There is an OSX tutorial at the learn website. The good news though is that my future plans do include greater support for OSX.

 

We are working on a new software package called Papilio DesignLab that is derived from the Arduino IDE. DesignLab is an effort to provide a schematic based environment to design and load circuits onto the Papilio FPGA. As such there will be many ready to load schematic based designs for the Papilio and the ability to quickly modify those schematics using Xilinx ISE Webpack. The good news for OSX is that since DesignLab is based on the Arduino IDE all of the examples, bit file loading, Logic Analyzer, Virtual Instrument capability will work just fine with OSX. The bad news is that OSX users will be unable to EDIT any of the schematics because there is no Xilinx ISE release. Its a sad limitation, but very soon OSX users will be able to do a lot more then previously.

 

Jack.

Link to comment
Share on other sites

You might try installing Windows or Linux in a virtual machine and use that for FPGA development. I haven't tried with the Papilio loader, but VirtualBox is free, cross platform, and has USB support that works well enough with some peripherals. It's handy to have around, lets you take snapshots and roll back, play around with different operating systems, etc. I use a WinXP VM as a sandbox to play around with software from questionable sources and evaluate various programs without polluting my host machine, when I'm done, just roll back to a clean image and any changes are gone. It's also a handy way to provide a guest machine for other people to use so they don't muck up anything on my PC. I have an external hard drive that I store my VM's on so I can plug it into any machine that has VirtualBox installed and boot up one of my own systems. With the vast resources offered by even mid range systems these days, the host OS choice is less relevant than ever.

Link to comment
Share on other sites

I really like the hardware, it is a nice development kit.

 

I was not referring to the Xilinx ISE software as a disappointment, that is just a fact of life, I knew about its limitations.

 

Of course the ISE software isn't native OSX. Never expected it to. Using it on a Windows VM isn't a problem, but it would once that is done I don't want to bother with Windows anymore.

 

Dealing with USB connectivity between host and VM is a complete PITA!

I was referring to being disappointed with the Papilio specific software loader and what not, that just doesn't work on OSX. Download it follow the vague instructions and you get mysterious errors. Installer is out of date and just doesn't work, and doesn't give useful reason why.

But if you have a native linux application, it should work on any other Unix as well. And yes OSX has been an official Unix since Leopard for like 9 years.

 

Dismissing OSX as being used by ignorant "artsy fartsy" people means you don't really know who uses them today or why they are have historically been used for high complexity applications like graphics and video and audio.

Personally I would look at using something like FuSE and enabling a "drag and drop" interface that "just worked".

 

I want to focus on getting my project done, not building tools that I need to can get my project done.



 

Link to comment
Share on other sites

I think you misunderstand what I'm saying. OS X is great, I know lots of people who use it for lots of things, and while it's not my primary machine, I've got a Mac as well. Historically speaking though Apple has catered towards graphic arts and multimedia stuff, while heavy duty engineering has historically been done on PC's and high end workstations. Visit any company doing CAD/CAM, hardware design, firmware, FPGA, etc and you'll find most of them are running either Windows or Linux because those are the platforms that have by far the greatest penetration in these fields so those are the platforms that get the support for these niche applications. It's not a matter of which OS is "better", indeed they're all similarly capable, but which one(s) support the tools one wants to use. If one is developing a very complex software package that sells in very small numbers, it's understandable that they would develop it for whatever OS that is on the vast majority of machines out there. FPGA has long been a very esoteric field, requiring a great deal of specialized knowledge and very expensive software, dwarving the cost of buying dedicated dev machines to run it. It is only relatively recently that the big players have released free hobbyist versions of their software and the technology has matured to the point where someone who doesn't make a career of FPGA development can reasonably play with these things, but it's still early in the game.

 

Without ISE, one is very limited in what can be done with a Xilinx FPGA. IMO setting up the tools is the easy part, learning how to implement your design in the FPGA to make it do what you want it to do is difficult. If you want something that's drag and drop and "just works", you may be disappointed, unless the project you have in mind is very simple or you are content with just loading designs that others have created. Since most people working with Xilinx FPGAs are going to need/want to use ISE sooner or later, it makes sense to focus limited resources on the OS's supported by ISE. If you think Windows is bad, just wait until you dig into ISE or any similar packages, like PCB CAD software, it's all fiddly, buggy half-baked stuff designed by and for engineers with a user interface borrowed from the 1990s. The operating system can be considered just another part of the development suite.

 

As for USB on VMs, maybe I'm just lucky but so far it's mostly either just worked or it hasn't. I was able to use a USB to serial adapter without any trouble. My SDR dongle works but drops samples. I haven't tried but I suspect the Papilio loader will work fine since it's an off the shelf USB to serial chip.

Link to comment
Share on other sites

I don't want "drag and drop" FPGA design, I want effortless loading of the .bit files onto the dev board.

 

I am not concerned with ISE, I was solely commenting on the deployment to the Papilio dev board.

I think they are on the right track making it simplier to deploy to the board. Just like the Arduino makes loading the code onto the board a non-issue.

It doesn't making writing the code or knowing what to write any simpler, but it removes the manual process that was involved with physically programming the microcontroller.

 

I specialize in process optimization and automation. I think deploying code should be unattended automation. I have been doing development since 1983, I have no delusions about FPGA development.

 

I think the process of getting the design onto the dev board/chip should be "effortless", just like every other tool that makes deployment effortless. I shouldn't have to memorize command line flags and /dev device ids and all that minutia to get something running on a piece of hardware.

Deploying stuff under windows isn't as smooth as it could be, but it at least works, same stuff on OSX just didn't work. That is disappointing.

Link to comment
Share on other sites

  • 1 month later...

I was glad to get my new Papilio Pro board running. There were a couple of bumps along the road. I outlined what I came across in this other thread on this forum here 

http://forum.gadgetfactory.net/index.php?/topic/1896-papilio-board-support-in-xilinx-tools-like-impactchipscope-etc/?hl=%2Bftdi+%2Bdriver

 

One of the items that I discussed there, it would help to mention in front of everything else that the FTDI drivers should be installed first - rather than letting Windows decide whatever driver it seemed fit to work. 

 

But all in all, keep up the great work with the products and the support.

Dan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.