pbp and linux


Closed Thread
Results 1 to 32 of 32

Thread: pbp and linux

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Posts
    41

    Default pbp and linux

    I was just curious how many people out there use linux and what IDE they use.

    Im working on a project that adds onto gedit's language settings to allow pbp to be used and compiled from.

    Just getting opinions from everyone bc I know wine can be used to run pbp and the compilers from in linux, but mcs cant be used bc of the way it's coded, it cant handle passing stuff to the actual compiler. Ive seen that alot of the programmers out there that are used have command line programming software, so the only thing needed to be worked on is the pbp file handling in linux.

    just getting everyone's opinion and as soon as I finish this, Ill upload the lang file and how to set everything up.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    I use gEdit with the highlight mode set to VB.net. Use WINE like you said but set up a *.bat file for the compiling.
    Click on the link in my signature and then the Linux and PBP tab for a little more detail on how I do it.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    Well, I know alot of things dont highlight correctly with the vb.net, so I was working on this. here's what I have done so far, just save it to /usr/shared/gtksourceview-2.0/language-specs/ and restart gedit, then all .pbp and .bas files should open with the correct one. I had to put it in the zip file because the forum wouldnt let me upload the .lang file by itself

    also I was thinking of using the external tools package to be able to compile everything and program the chips from within gedit.

    pbp.lang.zip
    Last edited by Chirpy; - 6th December 2012 at 06:38.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    I will give your mod a try.

    Just curious, what distro are you running?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    Im using ubuntu 10.04 still, not too fond of the gnome 3 interface.

  6. #6
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    ok, got gEdit fully working with integrated compiling! here's how I did it:

    First, I installed gEdit's external tools using "sudo apt-get install gedit-plugins",
    Then added the pbp.lang file to /usr/shared/gtksourceview-2.0/language-specs/
    You need to close out of all gEdit windows at this time and restart it to get the new language to show up.
    Finally, I went to gEdit and went to Tools/Manage External Tools, and created an entry called Compile PBP code, and added this into the codebox at the right:

    #!/bin/sh
    wine c:/pbp/pbpw -e -s -ac:/Program Files/Microchip/MPASM Suite/MPASMWIN -p12f675 $GEDIT_CURRENT_DOCUMENT_NAME
    var=$GEDIT_CURRENT_DOCUMENT_NAME
    var2=${var%???}
    outasm=$var2"ASM"
    wine c:/Program\ Files/Microchip/MPASM\ Suite/mpasmwin /e /l $outasm
    Then finally clicked on the save option in the external tools manager and clicked "current document". Click close out of the external tools options and when your ready to compile your code, just go to tools/external tools/Compile PBP code, and it'll compile everything just right.

    Just make sure you change the -12f675 to whatever PIC your using tho and it should work flawlessly. Here's the file again to keep everything organized:

    pbp.lang.zip

    Ps. mackrackit, using this requires no more premade batch files :P
    Last edited by Chirpy; - 6th December 2012 at 09:09.

  7. #7
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    sorry ahead of time for the spam posts, but Ive found one issue with the batch file method and my gedit method. when I got to compile a program, if it has configuration switches in it, it'll throw an error, Ive tried it with both my method and the batch method on your site, even used the blinky example to test it. if the pbp or bas file doesnt have that in it, or it's commented out, it'll compile fine.

    any ideas why?
    I tried using mpasm 8.51a, 8.84, and 8.88, and they all do the same.

    nvm, saw the ; part on your site after searching around a little
    Last edited by Chirpy; - 6th December 2012 at 13:59.

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    I will guess that you are getting an "overwriting previous address content" error message.
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Post #1 and post #5
    You need to comment the *.inc file for the chip in the PBP directory.
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    yea, already got it solved, saw it on your site earlier.

    also, in mplabs, I seem to remember something that placed the configs into your asm file, but I cant remember what it was for the life of me.
    I was just wanting to do that to get all of the fuses, but it's no biggie, I can just look through the mpasm suite folder's *.inc files

    but anyways, the mods and such to gedit seem to work as they're supposed to.

  10. #10
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    ok, I think Ive gotten everything coded correctly and such, I have 2 different programmers, the pikit2 and the k150 programmers, and got both programming on linux and from within gEdit. here's the code to add in to qedit's external tools for the k150:
    #!/bin/sh
    pic="16f628a"
    wine c:/pbp/pbpw -e -s -ac:/Program Files/Microchip/MPASM Suite/MPASMWIN -p$pic $GEDIT_CURRENT_DOCUMENT_NAME
    var=$GEDIT_CURRENT_DOCUMENT_NAME
    var2=${var%???}
    outasm=$var2"ASM"
    wine c:/Program\ Files/Microchip/MPASM\ Suite/mpasmwin /q /e /l $outasm
    outhex=${var2}"HEX"
    picpro.py -p /dev/ttyUSB0 --pic_type=$pic -i $outhex
    I was tired and just copied tetsujin's python programmer software to the main bin dir using "sudo cp *.* /usr/local/bin" from within the programmer's folder, then I could call it as a normal program by just typing picpro.py. here's the link for those people that use the K150 also:
    also, for some reason, when the programmer is waiting for the chip inside qEdit, it shows a warning inside the shell output box, but everything works fine, just ignore it and put your chip in, and it'll work fine.

    http://sourceforge.net/projects/tets...rogrammer/0.2/

    then I added pickit2 by installing the official pk2cmd from microchip's site, and did this mod to the system:
    http://gatemaze.blogspot.com/2009/06...er-ubuntu.html
    This allows you to run pickit2 as a normal user, which is what we want.
    And added this code to the external tools dialog in qEdit:
    #!/bin/sh
    pic="16f628a"
    wine c:/pbp/pbpw -e -s -ac:/Program Files/Microchip/MPASM Suite/MPASMWIN -p$pic $GEDIT_CURRENT_DOCUMENT_NAME
    var=$GEDIT_CURRENT_DOCUMENT_NAME
    var2=${var%???}
    outasm=$var2"ASM"
    wine c:/Program\ Files/Microchip/MPASM\ Suite/mpasmwin /q /e /l $outasm
    outhex=${var2}"HEX"
    pk2cmd -P$pic -F$outhex -M -R
    add the existing post's code into it as "Compile PBP code" and you'll be able to use qEdit as a full ide with built in compiling and direct downloading of the code/hex from within the text editor.
    Last edited by Chirpy; - 7th December 2012 at 03:23.

  11. #11
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Post Re: pbp and linux

    I updated the pbp.lang file, here's the updated version, which should recognize all pbp and bas files as picbasic pro. Just put it in /usr/share/gtksourceview-2.0/language-specs/
    pbp.lang.zip

    also, I know alot of people out there that's just starting out still use the jdm programmers, so here's something for you too using picprog:
    #!/bin/sh
    comport="/dev/ttyS0"
    pic="16f628a"
    wine c:/pbp/pbpw -e -s -ac:/Program Files/Microchip/MPASM Suite/MPASMWIN -p$pic $GEDIT_CURRENT_DOCUMENT_NAME
    var=$GEDIT_CURRENT_DOCUMENT_NAME
    var2=${var%???}
    outasm=$var2"ASM"
    wine c:/Program\ Files/Microchip/MPASM\ Suite/mpasmwin /q /e /l $outasm
    outhex=${var2}"HEX"
    picprog --erase --burn --input $outhex --device $pic --p $comport
    Have fun and hope this helps some people that uses linux.
    also, I'd like to see your input on this macrackit btw, see what can be improved or added, I know it'd be nice to add a chip selector in the main program, but not sure how to do that atm.
    Last edited by Chirpy; - 7th December 2012 at 04:52.

  12. #12
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    for those that are curious about what Ive been working on actually does, this is two screenshots of the mods to gEdit.

    Name:  Screenshot-2.png
Views: 7089
Size:  101.1 KB

    Name:  Screenshot-3.png
Views: 7119
Size:  107.4 KB

    sorry again about the spam posts, and such large pictures.
    I'd like to get everyone's input on this to see what needs improved and such, or what needs changed.
    also, a little bug in the jdm programmer part, add "pic" just before the $pic on the bottom line so it shows pic$pic, then it'll work fine.
    Last edited by Chirpy; - 7th December 2012 at 11:06.

  13. #13
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    Thanks for sharing your work, I hope to make use of it soon.

    As for the new Ubuntu, have you looked into the Cinnamon desktop? I have been using it on my openSUSE box for some time now.
    Dave
    Always wear safety glasses while programming.

  14. #14
    Join Date
    Dec 2012
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    no, I havnt, I just prefer the look of gnome 2 tbh, always used it even if it was memory hungry, and rather just stick with it. I honestly hate the look of new OS's tbh, windows 8 is almost unusable for me, same with gnome 3.

    if you cant access everything without having to dig through a hundred screens and have to spend first 10 mins trying to figure out how to find the shutdown button, then they need to rethink the GUI interface. also, for linux, I prefer the look of gnome 2 rather than another kde lookalike of windows.

    even on my raspberry pi, I have the MATE interface on it.
    Last edited by Chirpy; - 7th December 2012 at 11:38.

  15. #15
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: pbp and linux

    This thread implies PBP is compatible with Linux.
    Is this truly the case? Am I missing something?
    If so future versions of FineLineIDE could be made compatible with Linux.

    Norm

Similar Threads

  1. Replies: 1
    Last Post: - 30th October 2012, 09:28
  2. Replies: 5
    Last Post: - 16th October 2012, 20:31
  3. Linux with PBP
    By sayzer in forum PBP Wish List
    Replies: 0
    Last Post: - 8th August 2006, 21:27
  4. LINUX IDE and PBP
    By mslaney in forum General
    Replies: 0
    Last Post: - 5th January 2005, 20:43
  5. Linux
    By mackrackit in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 5th February 2004, 21:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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