Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36

Thread: HOWTO: Piklab in Ubuntu - an easy way

  1. #1
    Join Date
    Dec 2005
    Location
    Cluj-Napoca, Romania
    Beans
    1,080

    HOWTO: Piklab in Ubuntu - an easy way

    Hi! I saw a couple of threads around asking about spftware for engineers. And I was lucky enough to discover how to install Piklab in a very simple way. Piklab is a neat software for working with Microchip's PIC and dsPic microcontrollers. It's based here:

    http://piklab.sourceforge.net/

    So... the easy way (compiling it under Ubuntu is rather complicated, since it is created for KDE and compilation needs many dev packages, which for me were just too many to install) is to just alien-ate an rpm and then make the necessary adjustments. But... enough blah-blah.

    1. Download the binary rpm from
    http://puzzle.dl.sourceforge.net/sou...-1mdk.i586.rpm

    2. Go to the download directory.
    Code:
    cd <directory where you downloaded the package>
    3. (Only where needed) Install alien, to convert rpm to deb
    Code:
    sudo apt-get install alien
    4. Alien-ate the rpm:
    Code:
    sudo alien piklab-0.3.2-1mdk.i586.rpm
    5.Install the resulting deb package:
    Code:
    sudo dpkg -i piklab_0.3.2-2_i386.deb
    6. Now this was about installing the package, but it ain't over yet. It needs a couple of dependencies which it won't show at install-time. So...

    Code:
    sudo apt-get install gputils libpcre3
    (If you have ANY kde app installed it is quite likely you will also have libpcre, so maybe you want to check it out before installing, although I think apt-get skips it anyway if it is already installed and goes on to the missing packages).

    7. And last step... Make Piklab find libraries it needs

    Code:
     sudo ln -s /usr/lib/libpcreposix.so.3.12.0 /usr/lib/libpcreposix.so.0
     sudo ln -s /usr/lib/libpcre.so.3.12.0 /usr/lib/libpcre.so.0
    8. That's it! Now, just run

    Code:
    piklab
    and you're good to go. Oh! It also needs libusb, but it's highly unlikely you don't have it installed, since even hal depends on it.

    I must admit I didn't get the chance to really try it out yet, because my hardware setup isn't done yet, for working with dsPic. But maybe someone will tell me how that works out before I get to test it.

    Info: This installation wasn't made on a clean install of Ubuntu (I am using Breezy now, but this should apply to other versions too) so there might be packages on my system which piklab uses without my knowing about it. If you run into any problems please post them here. If you have a solution, all the better, otherwise we can find one together and then improve the howto.

    I am open to any kind of feedback and/or suggestions.

    Enjoy!

    EDIT may 6th 2006: some corrections. Thanks egghead3 for pointing them out!
    Last edited by louis_nichols; August 10th, 2007 at 07:42 AM. Reason: Updated symlinks to latest version of the libfiles.

  2. #2
    Join Date
    Apr 2005
    Beans
    24

    Re: HOWTO: Piklab in Ubuntu - an easy way

    This looks interesting. Have you tried to get any of the c compilers to work, notably the sdcc or the PIC30 toolchain?

    edit: in step 4 you have to run alien as fakeroot or sudo, also step 5 should be apt-get install, not update. It seem to be working, thought i dont have a hardware environment at the moment to really test it out. Thanks, I had never heard of this program and would much rather program on linux. Have you ever done anything with avr microcontrollers?
    Last edited by egghead3; May 6th, 2006 at 12:14 AM.

  3. #3
    Join Date
    Dec 2005
    Location
    Cluj-Napoca, Romania
    Beans
    1,080

    Re: HOWTO: Piklab in Ubuntu - an easy way

    Quote Originally Posted by egghead3
    This looks interesting. Have you tried to get any of the c compilers to work, notably the sdcc or the PIC30 toolchain?
    I gave up trying after a pretty short while, because some things I couldn't control changed so the need for piklab is gone in my case

    Quote Originally Posted by egghead3
    edit: in step 4 you have to run alien as fakeroot or sudo, also step 5 should be apt-get install, not update.
    thanks for the heads-up! corrected it.

    Quote Originally Posted by egghead3
    It seem to be working, thought i dont have a hardware environment at the moment to really test it out. Thanks, I had never heard of this program and would much rather program on linux.
    You're wellcome! It should continue to run without issues.

    Quote Originally Posted by egghead3
    Have you ever done anything with avr microcontrollers?
    You mean in terms of build-environment under Linux? No, I never tried. For that, I've used the Atmel AVR Studio and, even more, Bascom AVR. If you're talking in a general sense, then yes, I've made some projects with avr's as projects for the uni. They are what they use to introduce us to microcontrolers and the like. They are indeed pretty fit for this job, too.

  4. #4
    Join Date
    Dec 2005
    Beans
    33

    Re: HOWTO: Piklab in Ubuntu - an easy way

    Hey, thanks for the great how-to. I was nearing the point of fetching the KDE libs and compiling this. Anyway, everything worked fine until I ran piklab for the first time, I received this error:

    Code:
    piklab: error while loading shared libraries: libktexteditor.so.0: cannot open shared object file: No such file or directory
    I checked if it could be solved by a quick symlink, but I didn't even see anything named libktexteditor* in /lib/usr or in the ubuntu repositories. Could anyone tell me what package(s) I need to fetch to solve this issue? Thank you very much.

  5. #5
    Join Date
    Dec 2005
    Location
    Cluj-Napoca, Romania
    Beans
    1,080

    Re: HOWTO: Piklab in Ubuntu - an easy way

    Quote Originally Posted by torf
    Hey, thanks for the great how-to. I was nearing the point of fetching the KDE libs and compiling this. Anyway, everything worked fine until I ran piklab for the first time, I received this error:

    Code:
    piklab: error while loading shared libraries: libktexteditor.so.0: cannot open shared object file: No such file or directory
    I checked if it could be solved by a quick symlink, but I didn't even see anything named libktexteditor* in /lib/usr or in the ubuntu repositories. Could anyone tell me what package(s) I need to fetch to solve this issue? Thank you very much.
    This should sort you out

  6. #6
    Join Date
    Dec 2005
    Beans
    33

    Re: HOWTO: Piklab in Ubuntu - an easy way

    Ah, a handy site feature! Thank you very much for a quick and helpful reply. I installed kdelibs4c2 and all of the dependencies, and now have a happy, fuctioning piklab. Now onto some coding! Thanks again.

  7. #7
    Join Date
    Dec 2005
    Beans
    33

    Re: HOWTO: Piklab in Ubuntu - an easy way

    It appears I spoke too soon... I'm using PICkit2 with a 16F690 and am having trouble communicating with the device.

    It is detected, as shown in dmesg:
    Code:
    hiddev96: USB HID v0.01 Device [Microchip Technology Inc. PICkit 2 Microcontroller Programmer] on usb-0000:00:1d.1-2
    I have set up the program to use my kit with the correct chip, but receive the following error when I try to connect to the device:
    Code:
    Connecting Pickit2 on USB Port with device 16F690...
    USB Port: Error resetting USB device.
    Thinking this could be some sort of permissions issue, I tried again using sudo, yielding a different error message:
    Code:
    Connecting Pickit2 on USB Port with device 16F690...
    USB Port: Error setting USB configuration.
    I first thought it may be a libusb issue, but I had it installed (libusb 00.01.08 ) as well as libusb-dev and libhid0. No luck there. I was thinking of trying the hotplug fix as shown in the support section of the Piklab Homepage. Any ideas?

    Thank you for your time, it's much appreciated.
    Last edited by torf; May 6th, 2006 at 06:19 AM.

  8. #8
    Join Date
    Dec 2005
    Location
    Cluj-Napoca, Romania
    Beans
    1,080

    Re: HOWTO: Piklab in Ubuntu - an easy way

    Sorry! That really requires knowledge beyond mine. I've actually installed dapper recently and didn't install piklab anymore, cause the reason for it disappeared.

    I think the best way is to follow any advice on their page, perhaps even contact the developers. I looked on their page and they don't have a forum, but sourceforge has a feature for discussion lists so maybe the've set up one of those. Perhaps report a bug on their tracker...

  9. #9
    Join Date
    Dec 2005
    Beans
    33

    Re: HOWTO: Piklab in Ubuntu - an easy way

    I've contacted one of the developers, and we've shot a few emails back and forth, no solutions yet, I'm awaiting his next response. I've tried the hotplug script (*Note* I don't have an /etc/hotplug/usb.usermap so I edited the /etc/hotplug/usb.handmap which seemed to be in the same format -- could this be a problem?) without success. I've also tried loading and unloading usbhid without success. At this point I'm taking any suggestions or advice.

    Here are the modules I have loaded:
    Module Size Used by
    nvram 8200 0
    rfcomm 34972 0
    l2cap 22404 5 rfcomm
    bluetooth 43012 4 rfcomm,l2cap
    speedstep_centrino 7380 1
    cpufreq_userspace 4444 1
    cpufreq_stats 5124 0
    freq_table 4484 2 speedstep_centrino,cpufreq_stats
    cpufreq_powersave 1920 0
    cpufreq_ondemand 5916 0
    cpufreq_conservative 6820 0
    pcmcia 24584 2
    i915 17920 1
    drm 58004 2 i915
    video 16004 0
    tc1100_wmi 6916 0
    sony_acpi 5516 0
    pcc_acpi 11392 0
    ibm_acpi 17908 0
    hotkey 9508 0
    dev_acpi 11396 0
    i2c_acpi_ec 5760 0
    i2c_core 19728 1 i2c_acpi_ec
    button 6672 0
    battery 9604 0
    container 4608 0
    ac 4996 0
    ipv6 217408 6
    af_packet 20232 2
    irtty_sir 7808 0
    sir_dev 17324 1 irtty_sir
    irda 159804 2 irtty_sir,sir_dev
    crc_ccitt 2176 1 irda
    floppy 52692 0
    rtc 11832 0
    pcspkr 3652 0
    ipw2200 92680 0
    firmware_class 9472 1 ipw2200
    ieee80211 27012 1 ipw2200
    ieee80211_crypt 5636 2 ipw2200,ieee80211
    yenta_socket 22540 1
    rsrc_nonstatic 12032 1 yenta_socket
    pcmcia_core 44932 3 pcmcia,yenta_socket,rsrc_nonstatic
    snd_intel8x0 30144 1
    snd_ac97_codec 72188 1 snd_intel8x0
    snd_pcm_oss 46368 0
    snd_mixer_oss 16128 1 snd_pcm_oss
    snd_pcm 78344 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
    snd_timer 21764 1 snd_pcm
    snd 48644 8 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_ oss,snd_pcm,snd_timer
    soundcore 9184 1 snd
    snd_page_alloc 10120 2 snd_intel8x0,snd_pcm
    tpm_atmel 5504 0
    tpm_nsc 6528 0
    tpm 9504 2 tpm_atmel,tpm_nsc
    hw_random 5268 0
    shpchp 80612 0
    pci_hotplug 24628 1 shpchp
    intel_agp 21276 1
    agpgart 32328 3 drm,intel_agp
    dm_mod 50364 1
    joydev 9280 0
    tsdev 7616 0
    evdev 9088 1
    psmouse 26116 0
    mousedev 10912 1
    parport_pc 31812 1
    lp 11460 0
    parport 32072 2 parport_pc,lp
    md 40656 0
    ext3 115976 1
    jbd 48536 1 ext3
    thermal 13192 0
    processor 23100 2 speedstep_centrino,thermal
    fan 4740 0
    usbhid 30688 0
    e100 32768 0
    mii 5248 1 e100
    ehci_hcd 29448 0
    uhci_hcd 28048 0
    usbcore 104316 4 usbhid,ehci_hcd,uhci_hcd
    ide_cd 36996 0
    cdrom 33952 1 ide_cd
    ide_disk 16128 3
    ide_generic 1664 0
    piix 9476 1
    ide_core 125268 4 ide_cd,ide_disk,ide_generic,piix
    unix 24624 624
    vesafb 8088 0
    capability 5000 0
    commoncap 6784 1 capability
    vga16fb 12232 1
    vgastate 8320 1 vga16fb
    softcursor 2432 2 vesafb,vga16fb
    cfbimgblt 2944 2 vesafb,vga16fb
    cfbfillrect 3840 2 vesafb,vga16fb
    cfbcopyarea 4480 2 vesafb,vga16fb
    fbcon 34176 72
    tileblit 2560 1 fbcon
    font 8448 1 fbcon
    bitblit 5248 1 fbcon

  10. #10
    Join Date
    Dec 2005
    Location
    Cluj-Napoca, Romania
    Beans
    1,080

    Re: HOWTO: Piklab in Ubuntu - an easy way

    Try posting it in a new thread in the forums. This is definitely an issue that goes beyond the particularities of piklab, so someone with more experience might have a solution.

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •