eelcor Posted July 3, 2012 Report Share Posted July 3, 2012 Hi everybody, Somehow I have the feeling that the combination of the Raspberry Pi and the Papilio One is a match made in heaven . So I started to compile the papilio loader application on the raspberry pi. Although I am able to compile the source, the resulting executable doesn't work properly (only getting the help page). Are there specific things I should take into account when compiling this application for ARM? Kind regards, Eelco Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 3, 2012 Report Share Posted July 3, 2012 Hey! Awesome! I just got my raspberry pi a couple days ago but haven't had a chance to do much with it. Thank you for getting the ball rolling, I'm definitely thinking about ways to make them work together. The biggest thing I'm waiting for is JVM support, it would be great to have the Arduino IDE run on the Pi. My initial thoughts on why it might not be working is the libftdi library. Did you have any problems getting that on the pi? Were you able to do an: apt-get libftdi-dev This is very interesting. I tried to fire up my Pi last night but I ran out of time before I was able to get a picture. Jack. Link to comment Share on other sites More sharing options...
eelcor Posted July 3, 2012 Author Report Share Posted July 3, 2012 Hi Jack, Exactly my thoughts! You can indeed apt-get install the libftdi-dev (and libusb-dev) package and it will be recognized during the ./configure. The resulting binary however, doesn't do anything more than displaying the help information. Somehow I have the feeling that there is a problem with the device enumeration. The Papilio-Programmer script can be used easily with some minor modifications (such as removing ./ before gawk and cat). It shouldn't be much of a problem to port it, when we are able to access the ftdi driver. I am really looking forward to using my Raspberry Pi with the papilio. And I can recommend just using the vanilla Debian distribution of 19042012. Adding ncurses-dev, libreadline, gawk and dialog should satisfy requirements (am I missing some libraries?). And how do you like the Raspberry Pi? Done some experiments with it? Kind regards, Eelco Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 3, 2012 Report Share Posted July 3, 2012 I just started digging into why it's not booting up, I think I will need to track down a better SD card. No impressions yet, just your usual getting started curve to deal with. Overall I think it's an awesome board that I want to pair with the Papilio to make cool projects with! I might have to wait till after the 4th when I can buy a new SD card to get it running though. Unless a SD card I have laying around will work... Jack. Link to comment Share on other sites More sharing options...
eelcor Posted July 3, 2012 Author Report Share Posted July 3, 2012 Hi Jack, Check out the compatibility list before buying a new sd card. My experience is that more expensive is not always better. My 8gb sandisk ultra card doesn't work at all while my cheap emtec 16gb card works flawlessly. Compared to the beagleboard, the raspberry pi is more complete out of the box. On the beagleboard I never managed to get both DSP and GPU working, while with the raspberry pi I got everything (including wireless) up and running in half an hour. Good luck! If you have any questions feel free to ask! Kind regards, Eelco Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 3, 2012 Report Share Posted July 3, 2012 Great, thank you for the info! I just tried 3 more cards and no luck. I'm going to have to go to the store with the supported list it looks like. Probably not til after 4th of July BBQ though. Keep us posted on any progress, I found one article about problems with libftdi on ARM, not sure if it is applicable. http://libftdi.141977.n3.nabble.com/Trouble-with-libftdi-on-ARM-td2100417.html Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 4, 2012 Report Share Posted July 4, 2012 Ok, I couldn't help myself, I went out and bought a working SD card and now I have the Pi booting. It looks great, it blows my mind that we finally have an affordable linux solution! Anyway, what I'm seeing is that when I do a: tail -f /var/log/messages and I plug in the Papilio, the usb 1-1.3 module detects it and attaches it to ttyUSB0 and then ttyUSB1, then right away there is a USB disconnect sent and ftdi_sio disconnects both serial ports. So this is promising, it looks like everything is in place but it is being disconnected, I suspect there is not enough power for the Papilio... It's bed time here, but I think the next step is to try and power the Papilio from the power jack and then plug into usb to see what happens... Jack. Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 4, 2012 Report Share Posted July 4, 2012 This describes the exact problem: http://arduino.cc/forum/index.php?topic=25734.0;wap2 They recommend removing brltty package, but it is not installed for raspberry pi. Unless I'm missing something. Jack. Link to comment Share on other sites More sharing options...
eelcor Posted July 4, 2012 Author Report Share Posted July 4, 2012 Hi Jack, I know the nagging feeling when you just want to see something working. It already cost me a lot of bedtime during my life, first with lego/fischertechnik, with computers and now with FPGA's and embedded systems. What card did you get? A cheap one? I also noticed that the papilio gets recognized. Did you use some windows specific addressing of devices. It would be nice to specify the device in the commandline of papilio-prog. Still thinking of the practical side of the combination papilio/raspberry pi, but the idea to have something that can be reconfigured manually blows my mind ;-) Kind regards, Eelco Link to comment Share on other sites More sharing options...
eelcor Posted July 4, 2012 Author Report Share Posted July 4, 2012 Hi Jack, I will look if I can find the same logging and see if the britty package has been installed. Kind regards, Eelco Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 4, 2012 Report Share Posted July 4, 2012 What card did you get? A cheap one? I was in a hurry and ended up at a place where the only compatible card was $35! Which is just about what I paid for the Raspberry Pi! That's more then I wanted to pay for a card but sometimes you just don't have the time to find a good deal... Did you use some windows specific addressing of devices. I don't want to take credit for others work. papilio-prog is a fork of the xc3seprog project on sourceforge, so I did not personally write it. There is ifdef statements that determine if the app is being compiled for windows or linux, so there should not be any windows specific stuff in there. At this point I think the problem is at the linux level, something to do with the raspberry pi debian distro. I was thinking of trying a different distro to see if there is any difference. Oh, and I would not rule out power issues yet... Sadly, we are hosting a 4th of July BBQ today so I will get no more time to look at it today. But I will check messages so please keep me posted. Jack. Link to comment Share on other sites More sharing options...
eelcor Posted July 4, 2012 Author Report Share Posted July 4, 2012 Hi Jack, You should really enjoy the barbecue! Did you encounter the same problems as I? I was able to compile the binary, but when running I only got the help screen. I have a powered hub somewhere here, I can check for power issues. Is there any way to do some raw device level communication with the board? Kind regards, Eelco Link to comment Share on other sites More sharing options...
eelcor Posted July 4, 2012 Author Report Share Posted July 4, 2012 Hi Jack, Just tried with the powered hub and it stays connected. I will check without hub as well. How can I check raw communications? Kind regards, Eelco Link to comment Share on other sites More sharing options...
eelcor Posted July 4, 2012 Author Report Share Posted July 4, 2012 Jack, I have a stable connection, but somehow I seem to be unable to compile the papilio-prog correctly. Did you manage to compile it? Kind regards, Eelco Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 5, 2012 Report Share Posted July 5, 2012 Ok, I copied you and connected the Papilio to the pi using a powered usb bus and now the papilio stays connected! So good progress. But when I compile and try to run the papilio-prog app I see the same thing, always gives the help section. So I installed ddd, edited the Makefile to remove the code optimizations, and fired up papilio-prog in ddd. What I saw was not really what I was expecting... It looks like the getopt function is not working correctly! I put a -jv in as the arguments and I see that the getopt routine was handling the -v and the -j options, but then instead of returning that there are no more arguments it keeps processing into garbage memory space... Since the next argument it gets is garbage it just displays the help and exits. I commented out the whole argument processing section and manually configured a verbose with detectchain, compiled and ran it. Voila, it detected the papilio jtag chain and returned the correct part number... So now we just need to figure out what is going on with getopt... Jack. Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 5, 2012 Report Share Posted July 5, 2012 Well, If you modify butterfly.cpp and replace the getopt line with the following: while (((c = getopt (argc, argv, "hb:f:s:jvcCr")) != -1) && (c != 255)) Everything seems to work... But I think we need to get to the bottom of why getopt is returning a 255 instead of a -1... I was able to program the Quickstart bitfile using JTAG and SPI flash from the raspberry pi! Jack. Link to comment Share on other sites More sharing options...
eelcor Posted July 6, 2012 Author Report Share Posted July 6, 2012 Jack, It works for me too! I am now able to run papilio-prog and I am going to try programming the papilio. JTAG chain scanning works like a charm! For the getopt issue, i think it's time to get to the raspberry pi forum and see what others have encountered. I am now looking forward to hook some GPIO pins from the raspberry to the papilio ;-) Now let's find a suitable project idea to demonstrate the power of Raspberry Pi combined with the flexibility and programmability of the papilio! Regards, Eelco Link to comment Share on other sites More sharing options...
eelcor Posted July 6, 2012 Author Report Share Posted July 6, 2012 Jack, Now I have some problems with disconnections. What device does papilio-prog talk to? /dev/ttyUSB0 or /dev/ttyUSB1. /dev/ttyUSB0 disconnects while USB1 stays connected. I think it has something to do with the hub I use, I will try another one. Regards, Eelco Link to comment Share on other sites More sharing options...
eelcor Posted July 6, 2012 Author Report Share Posted July 6, 2012 Jack, Forget my last post. I forgot to remove some lines to test the program without getopt. And now it works. I also was able to program the device! Now let's see what we can do ;-) Kind regards, Eelco Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 6, 2012 Report Share Posted July 6, 2012 I just checked in a fix up on github. Alvie pointed out that we just need to make the c variable an int instead of a char. I'm downloading the wheezy beta image now and will be trying everything on that now. Jack. Link to comment Share on other sites More sharing options...
eelcor Posted July 6, 2012 Author Report Share Posted July 6, 2012 Great, I also bought a new SD card for experimentation. The wheezy beta seems to be an excellent experiment. I am going to sleep right now. Be back in the morning ;-) Regards, Eelco Link to comment Share on other sites More sharing options...
eelcor Posted July 7, 2012 Author Report Share Posted July 7, 2012 Okay, I am currently trying to recompile gcc for ZPUino and unfortunately it throws an error about an unrecognized command "no". I am not sure whether it's a typo or a valid command. We should be able to compile the toolchain. Kind regards, Eelco Link to comment Share on other sites More sharing options...
Jack Gassett Posted July 25, 2012 Report Share Posted July 25, 2012 I think I remember Alvie telling me a couple days ago that he got the ZPUino toolchain working on the PI. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.