Trouble getting started with 64 bit Linux (Ubuntu 13.10)


stuartr

Recommended Posts

I'm a Noob with a Papilio Pro, LogicStart MegaWing and have had some success and great fun following the Intro to Spartan FPGA book - so thank you.

 

I'd like to have a go with ZAP IDE / ZPUino but I'm falling at the first hurdle - getting the IDE running on Linux - specifically Ubuntu 13.10

 

It seems that I'm attempting to use 32bit code on my 64bit architecture.

stu@glenmoray:~/Downloads/papilio-zap-ide$ sudo ./zap[sudo] password for stu:Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.OpenJDK 64-Bit Server VM warning: You have loaded library /home/stu/Downloads/papilio-zap-ide/lib/librxtxSerial.so which might have disabled stack guard. The VM will try to fix the stack guard now.It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.java.lang.UnsatisfiedLinkError: /home/stu/Downloads/papilio-zap-ide/lib/librxtxSerial.so: /home/stu/Downloads/papilio-zap-ide/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriverException in thread "main" java.lang.UnsatisfiedLinkError: /home/stu/Downloads/papilio-zap-ide/lib/librxtxSerial.so: /home/stu/Downloads/papilio-zap-ide/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)    at java.lang.ClassLoader$NativeLibrary.load(Native Method)    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)

Recognising this, if I'm correct, and having the knowledge to do something about it are different things for me (and I suspect other beginners). 

 

Previous posts about Ubuntu 13.04 have suggested:

sudo apt-get install ia32-libs

but this doesn't work on Ubuntu 13.10.

 

Could anyone help me get over the hurdle of installing the simple IDE for the simple Soft processor - feeling very thick.

 

Stu

Link to comment
Share on other sites

Jack,

 

Success thank you.  I can now launch ZAP IDE.  However, in following your quickstart guide (having already sorted some linux permissions stuff) I get the following errors when I get to the 'Burn Bootloader' stage.

/home/stu/Downloads/papilio-zap-ide/hardware/tools/papilio/papilio_loader/bin/papilio-prog.exe: 1: /home/stu/Downloads/papilio-zap-ide/hardware/tools/papilio/papilio_loader/bin/papilio-prog.exe: MZ@: not found/home/stu/Downloads/papilio-zap-ide/hardware/tools/papilio/papilio_loader/bin/papilio-prog.exe: 2: /home/stu/Downloads/papilio-zap-ide/hardware/tools/papilio/papilio_loader/bin/papilio-prog.exe: Syntax error: ")" unexpected

Any thoughts?

 

Stu

Link to comment
Share on other sites

Thanks Jack - still having a few teething problems.

 

New version installed - including copying in the 64bit rxtx files. Following the quickstart guide for ZPUino gets as far as burning the bootloader which just comes up with 'Error while burning bootloader.' in the orange bar (no other output is visible). I've tried swapping between the serial ports to confirm I'd not got the wrong one - but it made no difference. As your comment in the revision.txt said that AVR8 was now working I tried that as well. It failed once because of a lack of a 'libsrecord(0)' (from memory) which I've now installed, but only get as far as:

 

Running cp script
+ echo Running cp script
+ cp -R /home/stu/Downloads/zap-ide/hardware/tools/papilio/bitstreams /home/stu/Downloads/zap-ide/hardware/tools/papilio/bscan_spi.bit /home/stu/Downloads/zap-ide/hardware/tools/papilio/bscan_spi_lx9.bit /home/stu/Downloads/zap-ide/hardware/tools/papilio/bscan_spi_xc3s100e.bit /home/stu/Downloads/zap-ide/hardware/tools/papilio/bscan_spi_xc3s250e.bit /home/stu/Downloads/zap-ide/hardware/tools/papilio/bscan_spi_xc3s500e.bit /home/stu/Downloads/zap-ide/hardware/tools/papilio/butterfly_prog.exe /home/stu/Downloads/zap-ide/hardware/tools/papilio/cp /home/stu/Downloads/zap-ide/hardware/tools/papilio/cp.exe /home/stu/Downloads/zap-ide/hardware/tools/papilio/cygattr-1.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/cyggcc_s-1.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/cygiconv-2.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/cygintl-8.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/cygsigsegv-2.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/cygwin1.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/data2mem /home/stu/Downloads/zap-ide/hardware/tools/papilio/data2mem.exe /home/stu/Downloads/zap-ide/hardware/tools/papilio/devlist.txt /home/stu/Downloads/zap-ide/hardware/tools/papilio/ftd2xx.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/ftd2xx.lib /home/stu/Downloads/zap-ide/hardware/tools/papilio/gawk /home/stu/Downloads/zap-ide/hardware/tools/papilio/gawk.exe /home/stu/Downloads/zap-ide/hardware/tools/papilio/Impactout.cmd /home/stu/Downloads/zap-ide/hardware/tools/papilio/inpout32.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/jtag_0_9_1415.exe /home/stu/Downloads/zap-ide/hardware/tools/papilio/libsrecord.so.0 /home/stu/Downloads/zap-ide/hardware/tools/papilio/license.txt /home/stu/Downloads/zap-ide/hardware/tools/papilio/lin32 /home/stu/Downloads/zap-ide/hardware/tools/papilio/Makefile /home/stu/Downloads/zap-ide/hardware/tools/papilio/MANUFACTURERS /home/stu/Downloads/zap-ide/hardware/tools/papilio/Microsoft.VC80.CRT /home/stu/Downloads/zap-ide/hardware/tools/papilio/msys-1.0.dll /home/stu/Downloads/zap-ide/hardware/tools/papilio/papilio_loader /home/stu/Downloads/zap-ide/hardware/tools/papilio/papilio-prog /home/stu/Downloads/zap-ide/hardware/tools/papilio/papilio-prog.exe /home/stu/Downloads/zap-ide/hardware/tools/papilio/README /home/stu/Downloads/zap-ide/hardware/tools/papilio/reset.svf /home/stu/Downloads/zap-ide/hardware/tools/papilio/sh.exe /home/stu/Downloads/zap-ide/hardware/tools/papilio/srec_cat /home/stu/Downloads/zap-ide/hardware/tools/papilio/srec_cat.exe /home/stu/Downloads/zap-ide/hardware/tools/papilio/STD_1149_1_1990 /home/stu/Downloads/zap-ide/hardware/tools/papilio/STD_1149_1_1994 /home/stu/Downloads/zap-ide/hardware/tools/papilio/STD_1149_1_2001 /home/stu/Downloads/zap-ide/hardware/tools/papilio/STD_1532_2001 /home/stu/Downloads/zap-ide/hardware/tools/papilio/STD_1532_2002 /home/stu/Downloads/zap-ide/hardware/tools/papilio/xc3s250e_vq100.bsd /home/stu/Downloads/zap-ide/hardware/tools/papilio/xc3s500e_vq100.bsd /tmp/build4897060346801689254.tmp
Executing  /home/stu/Downloads/zap-ide/hardware/tools/avr/bin/avr-size -A /tmp/build4897060346801689254.tmp/Papilio_QuickStart.cpp.hex
Binary sketch size: 3,076 bytes (of a 16,384 byte maximum) - 18% used
make: Entering directory `/tmp/build4897060346801689254.tmp'

Converting Intel hex file to Verilog Mem format:
./srec_cat Papilio_QuickStart.cpp.hex -Intel -Byte_Swap 2  -Data_Only -o tmp.mem -vmem 8
srec_cat: the standard input may only be named once on the command line
make: *** [hex] Error 1
make: Leaving directory `/tmp/build4897060346801689254.tmp'
processing.app.debug.RunnerException: the selected serial port make: Leaving directory `/tmp/build4897060346801689254.tmp'
 does not exist or your board is not connected
    at processing.app.debug.BasicUploader.uploadUsingPreferences(BasicUploader.java:159)
    at processing.app.Sketch.upload(Sketch.java:1678)
    at processing.app.Sketch.exportApplet(Sketch.java:1620)
    at processing.app.Sketch.exportApplet(Sketch.java:1592)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2607)
    at java.lang.Thread.run(Thread.java:744)



Again I tried both possible USB options.  I also booted up Xilinx and papilio-prog'd a bit file which worked correctly.

 

Sorry that this wasn't better news and that I ran out of knowledge well before the point of being useful.

 

Stu
 

Link to comment
Share on other sites

Hmmm, not sure what is going on with the AVR8 there... What linux distro are you using?

 

Let's focus on ZPUino first. First of all, that ZPUino Quickstart guide is already outdated. I've been putting so much development into the ZAP IDE and Papilio Schematic Library that the documentation is not caught up. Loading the bit file using the "Burn Bootloader" menu item is no longer the way to go. I"ve made things much, much easier by including the correct bit file with each project. In the comment section for each project there should be a link to the bit file for the type of board you have. Click on that bit file and it should load the necessary bit file for you. Can you verify if that works?

 

Thanks,
Jack.

Link to comment
Share on other sites

I was about to start with ZAP/ZPUino/etc too (still working on the IntroToFPGA "course")

 

After some troubles (mostly due to having never used Arduino, and some missing documentation too i guess) it is now working.

Clicking on the "Click to program bit file" appeared to do something. Then it took me some time to figure out that loading the program required me to click on the "right arrow" somewhere. :) So now my logicstart megawing is show all kinds of activity which it never did before.

 

The only problem for me now is that i have to run zap as root.... but some configuration files in /etc/ should hopefully solve this.

 

One thing i had to do was rename lib/librxtxSerial64.so to librxtxSerial.so

 

Other than that is seems to run fine, even a change made in the program was compiled / uploaded just fine.

 

Many thanks!

 

(My configuration: Slackware 14.0 x86_64, with 32 bit libraries installed (which are not used.. afaik), Papilio-Pro with MegaWing_LogicStart)

Link to comment
Share on other sites

Martin, 

 

Please look at the ftdi_user.sh file in the latest (3.2.0) linux release. It will give you necessary permissions to run as a user instead of root. Glad it is working for you and sorry it was a hassle, we keep working bit by bit to get it to a point where it will be easier.

 

Once you get it running as a user you can go to the preferences and set the path for ISE and adobe acrobat reader and then the links for view and edit schematic will work.

 

Thanks!

Jack.

Link to comment
Share on other sites

Jack - success, thank you - after some fiddling.

 

It took a download of a 32 bit libftdi to get the boot loader to work.  Then it was just to recognise that the serial port dropped out (needing re-asignment in the Tools menu) before uploading the file. After that I'm now the proud owner of a monitor showing multicoloured Hello Worlds.  After all that shock and awe, I'm off for a little lie down.

 

Stu

Link to comment
Share on other sites

That's a really good question.  Some thoughts (generic and specific):

 

Enthusiasm: First and foremost a thank you for your continued enthusiasm - it shines through. Quick answers to what must seem like dull questions help people keep momentum.

 

KISS: The simpler the better.  I think that the Arduino and Raspberry Pi models are great examples.  A small amount of cash and a couple of button clicks and anyone from a child to an adult can get results. I think that it's the hard work that goes into making the first few steps as simple as possible which make all the difference.  To that end, I think that time spent making this as accessible as possible is time well spent.  For Linux, the closer you (and Xilinx) could get to using packages to install this software the better.  Even having 32 and 64 bit versions would be helpful.  The Quickstart guide can never be too simple but it must be absolutely correct.  At the moment it leads people in the wrong direction. Even the filing system structure changes which seem to have happened after the tutorials were written caused me confusion. This is why the Intro to Spartan FPGA ebook is very good - step by step and absolutely no assumed knowledge.

 

Signposting: I'd like to be lead by the hand through this a bit more - big picture stuff. Having finished the ebook, I still have little idea, and am totally intimidated, by the Xilinx ISE (not your fault, I know).  Where next? I really like the idea of ZAP IDE and the schematic stuff (I've just installed this) but where do I find out about the programming side of ZPUino? The more simple examples - with walk/talk throughs the better.

 

ZAP IDE: I don't quite understand how the ZAPIDE and the Xilinx IDE are going to work together?  I assume that the bootloading step is a shortcut to uploading a bit file which in the future I'll end up doing from within the Xilinx environment. I think I'd rather press a button which toggles me into Xilinx if that's what I'll be doing in the future - I won't always have a link to help me.  I was slightly confused by the way the examples were organised (probably as a result of the quickstart guide) - it took me a while to figure out which of the Papilio Schematic Library, basics or the ZPUino ones were best to start with.

 

Basically, I'm super impressed with what you're doing, where you're going, think you're up against a complexity problem caused by Xilinx and that any guides should be super simple and super accurate to allow dull people like me to follow in your wake. If I can help - just ask.

 

Stu

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.