David Taylor

Either no ZPUino, or board mismatch when trying to upload sketches

Recommended Posts

Hi,

 

I have a Papilio One 250k, and am having trouble loading sketches onto it.

 

When I plug it in I get two COM ports, 25 and 26. 26 seems to be the one to use in DesignLab as that is where serial messages appear.

 

If I use the Papilio Loader to put on the file Quickstart-Papilio_One_250K-v1.5.bit, I am told:

Cannot get programmer version, abortingCould not contact ZPUino embedded programmer.The more common reasons for this are:a) You are not specifying the correct port. The port currently selected is 'COM26'b) The board FPGA is not programmed with a valid ZPUino bitfile.c) The board is properly not powered.Please review all of above, if problem persists please contact support.

If I load the files zpuino-1.0-PapilioOne-S3E250.bit or zpuino-1.0-PapilioOne-S3E250-Vanilla-1.0.bit, I am told:

Board: GadgetFactory Papilio One 250 @ 96000000 Hz (0xa4020e00)Board mismatch!!!.Board is:      0xa4020e00 'GadgetFactory Papilio One 250'Sketch is for: 0xa5020e00 'Unknown board'

I have selected the board 'Papilio One (250K) - ZPUino, and I've tried a couple of different USB cables.


I had to add a new board to the text file D:\DesignLab-1.0.5\hardware\zpuino\zpu20\boards.txt by copying the existing 250k board and changing the name and all instances of the id.

 

I tried buring a bootloader via Tools | Burn Bootloader, but that gives a null pointer exception in the log window.

 

The new board definition finally worked after I put the zpuino-1.0-PapilioOne-S3E250-Vanilla-1.0.bit file back on. But it only works if the serial device isn't used by the sketch - that's why the quickstart bit file doesn't allow me to load new sketches. It's busy writing the ascii stuff and the IDE doesn't seem to be able to get a word in. When I remove the serial code and just flash LEDs I can update the sketch.

 

Should I be able to upload sketches when the serial port is in use by the current sketch?

 

Regards,

David.

Share this post


Link to post
Share on other sites

Hello David,

 

With DesignLab every sketch has a FPGA circuit that is associated with it. So before you load a sketch you need to load the circuit that belongs to that sketch to the FPGA board. Here is a guide showing how it works:

http://gadgetfactory.net/learn/2015/04/03/designlab-using-the-ide-for-the-first-time/

 

The "Load Circuit to FPGA" step is what you are missing.

 

The other piece of information here is that DesignLab moved to ZPUino 2.0, most of the bit files floating around use ZPUino 1.0. So it will not work to load an old bit file that you find and then load a sketch to it. You are better off loading the circuit that is associated with a sketch, or if you are getting a sketch off the internet without a circuit attached then follow this guide to associate the ZPUino_Vanilla circuit with the sketch.

http://gadgetfactory.net/learn/2015/04/03/designlab-hello-world/

 

Also, there are lots of tutorials at http://learn.gadgetfactory.net to help you out.

 

Thanks!

Jack.

Share this post


Link to post
Share on other sites

Thanks for the quick reply Jack.

 

The sad thing is I'd watched all those videos you point to, and knew about writing circuits, and stll didn't get it.

 

The last thing I tried last night was basically starting from a blank ZPUino circuit and adding the 7seg wishbone peripheral, then copied/pasted your example code just changing the wishbone slot to the one I'd used. Writing the circuit and uploading the sketch worked so I think I'm getting there.

 

Something else that is still very confusing is the mass of wings, megawings, and shields. If an example uses a VGA or sound wing, say, I have no idea how to adapt it to use my logic megawing or the computing shield I have for the DUO. Do I edit the circuit and replace the stuff on the right-hand-side with the logic megawing or computing shield footprint (as appropriate) and remake the connections or something?

 

Also, to be sure I get the relationship with DesignLab - DesignLab sketches can only be used if the ZPUino soft processor is in the FPGA, because that is what the compiled code runs on and the sketch uploader communicates with, right? To use something without the ZPUino I need to work in the Xilinx tools and not use any c++ sketch code.

 

Anyway, the Papilio stuff is very cool, nice job.

 

Regards,

David.

Share this post


Link to post
Share on other sites

Hello David,

 

 

 

Something else that is still very confusing is the mass of wings, megawings, and shields. If an example uses a VGA or sound wing, say, I have no idea how to adapt it to use my logic megawing or the computing shield I have for the DUO. Do I edit the circuit and replace the stuff on the right-hand-side with the logic megawing or computing shield footprint (as appropriate) and remake the connections or something?

 

You can always adapt a circuit to use the LogicStart Shield or Computing Shield instead of a Wing by replacing the stuff on the right hand side. But, often it can be easier then that - there is usually a pre-made circuit that you can use instead. 

 

Let's look at an example:

 

If we open the Audio_Modfile_Simple example we see that the Audio_Wing circuit is associated with the sketch:

#define circuit Audio_Wing

If we click the "View Circuit" icon we see the following circuit:

post-29509-0-44680400-1431531384_thumb.p

 

You can see that we have three audio chips connected to an audiomixer that then connect to the Audio Wing.

 

If we want to change to using this same sketch with the Computing Shield instead we can change the circuit to this:

#define circuit Computing_Shield

When we click the "View Circuit" icon we see the following circuit:

post-29509-0-41806400-1431531387_thumb.p

 

In this case we can see that the same three audio chips are connected to the audio mixer and then to the audio pins of the computing shield. So we can simply change that line of code to use the Computing_Shield circuit instead of the Audio_Wing circuit. We then press the "Load Circuit" icon to load the Computing_Shield circuit to the Papilio board and we should then be able to use the same sketch on the computing shield.

 

So there is an easy way to switch that doesn't require rebuilding a circuit, but I have not made it very easy to know this information. I think what is needed is a list and explanation of the circuits that are available. I'm going to work on adding this information to the Table of Contents so you can easily discover what pre-existing circuits there are available for you to use.

 

Jack. 

Share this post


Link to post
Share on other sites

Hi David,

I also recently tried to use a bootloader, I have been able to correctly operate my zpuino until not and I’m not sure why it just wouldn’t work with a boot-loader. I have burned it in flash and the flashing was successful. However, it gives a null exception at boot which it shouldn’t. Maybe the boot sectors hasn’t been flashed correctly. Have you looked into this issue, if you, could you give me some pointers.  

 

Regards,
Sohaib J.

 

Share this post


Link to post
Share on other sites

Hello Sohaib J,

 

The bootloader is the old way of doing things. With DesignLab pressing the "Load Circuit" icon does the same thing that load bootloader used to do.

 

Thanks,

Jack.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now