Menu

V0.94 Source Code

2015-04-21
2015-05-04
  • Paolo Iocco

    Paolo Iocco - 2015-04-21

    Hello,
    I think there's no GCBasic source code in your last hot release (v0.94, March 2015). I don't find the .bas file any more in the zip file.

    I need it to compile GCBasic under Lunux

    Best regards,
    Paolo

     
  • Anobium

    Anobium - 2015-04-21

    I did not include in the 0.94 release as I knew that we would be release 0.941 very soon.

    My recommendation. Await 0.941 this will be soon. This will fix the issues reported in 0.94. 0.941 will be soon.

    The majority of the 0.94 support files (includes etc) work under the previous release and all should be ok.

    If you drop me a personal message I will let you know when we are ready to release 0.941.

    Evan/Anobium

     
  • Paolo Iocco

    Paolo Iocco - 2015-04-21

    I can wait, in the manwhile I can try the Windows version: at the moment I have a lot to do ;-)

    Thank you!
    Paolo

     
  • Hugh Considine

    Hugh Considine - 2015-04-21

    If you're happy to try out code that is still being worked on, you can also try checking out the source from SVN and building that. The newest source for GCBASIC is all in https://sourceforge.net/p/gcbasic/code/HEAD/tree/GCBASIC/trunk/

    The code in SVN should be ok to use. It fixes some problems, but might create some new ones. If you try it and have any problems, let us know. If you want to work with things that we've tried a bit more first, that's fine too - as Evan said, we should have a new release out soon!

     
  • Anobium

    Anobium - 2015-04-22

    Great.

    Are you willing to produce a Youtube video of this good work?

     
  • Paolo Iocco

    Paolo Iocco - 2015-04-22

    a video perhaps not, but a description of the easy steps, gladly :-)
    They should be no distro-specific, in any case it works perfect under Linux Ubuntu

    1) Install FreeBasic:
    http://www.freebasic.net/wiki/CompilerInstalling

    2) Download the GreatCowBasic package (with source code):
    e.g. from the link above, https://sourceforge.net/p/gcbasic/code/HEAD/tree/GCBASIC/trunk/

    3) Unpack the GreatCowBasic:
    e.g. in /usr/share/GCBasic

    4) move to the fresh unpacked directory:
    cd /usr/share/GCBasic

    5) Compile the GreatCowBasic:
    fbc -exx -v -arch 586 gcbasic.bas

    6) If no error occurs, you're now ready to run the GCBasic compiler with the command:
    gcbasic

    7) Enjoy it! :-)

     

    Last edit: Paolo Iocco 2015-04-22
  • Chuck Hellebuyck

    Could this run on a Raspberry PI running Ubuntu or similar?

     
  • Hugh Considine

    Hugh Considine - 2015-04-23

    Maybe! http://www.freebasic.net/forum/viewtopic.php?f=5&t=21433

    Paolo, or anyone else who knows a bit more about Linux than me, any comments? I'd like to try it, but don't have anything ARM based myself.

     
  • Paolo Iocco

    Paolo Iocco - 2015-04-23

    I too, I don't have anything ARM based myself

    As long as FreeBasic runs on a Raspberry PI, and as long as GreatCow Basic is in FreeBasic it should be easily feasible.

    By compiling you target a console application, without graphics or special libraries. That makes me optimistic :-)

    it's a pity that I cannot test. I'd give you the definitive answer

     

    Last edit: Paolo Iocco 2015-04-23
  • Frank

    Frank - 2015-04-23

    I've used the version of Freebasic referenced in Hugh's post to compile GCBasic in Raspbian and it seemed to work ok. It took about 5 minutes to compile a GCBasic executable from source on a Pi B+. There was one missing dependency that needed to be installed beforehand - might have been ncurses. I've got it written down at home.

    For a simple GCBasic program it took about 20 seconds to compile and assemble so you have to be moderately patient. It would probably work faster on a Pi 2.

    Its also possible to compile the Pickit 2 command line utility on the Pi if there is interest in that?

     
  • lhatch

    lhatch - 2015-04-23

    Frank is right, apt-get install libncurses5-dev is required after the ./install.sh -i for Freebasic

    I will pull GCBASIC from the .../truck when home and see if I can compile it. No V2, but lots of B and B+ Pis, should work the same on them all of them other than the A maybe with less RAM

     
  • lhatch

    lhatch - 2015-04-24

    I loaded fbc on a RaspPi and pulled from the trunk gcbasic.bas and the 4 .bi files. Tried to compile with all 3 versions (fb fblite and qb) and no luck. It is like variables are not declared. So I am missing something. Below is straight fbc. Will keep digging tonight. Maybe CR/LF on files or something (will open and re-save).

    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(426) error 41: Variable not declared, ICC in 'ICC = 1: gcINC(1, 1) = ShortName(FI)'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(426) error 41: Variable not declared, gcINC in 'ICC = 1: gcINC(1, 1) = ShortName(FI)'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(435) error 71: Array not dimensioned, before '(' in 'IF VBS = 1 THEN PRINT SPC(10); gcINC(T, 1);'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(436) error 71: Array not dimensioned, before '(' in 'IF Dir(gcINC(T, 1)) = "" THEN'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(439) error 71: Array not dimensioned, before '(' in 'Replace Temp, FI, gcINC(T, 1)'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(447) error 71: Array not dimensioned, before '(' in 'OPEN gcINC(T, 1) FOR INPUT AS #1'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(465) error 71: Array not dimensioned, before '(' in 'IF UCase(gcINC(PD, 1)) = UCase(Temp) THEN CE = 1: EXIT FOR'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(465) error 3: Expected End-of-Line, found '=' in 'IF UCase(gcINC(PD, 1)) = UCase(Temp) THEN CE = 1: EXIT FOR'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(475) error 71: Array not dimensioned, before '(' in 'gcINC(ICC, 1) = Temp'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(505) error 71: Array not dimensioned, before '(' in 'IF UCase(gcINC(PD, 1)) = UCase(DataSource) THEN CE = 1: EXIT FOR'
    /home/pi/freebasic/fbc-0.91.0-pi-debian/preprocessor.bi(505) error 128: Too many errors, exiting

     
  • Paolo Iocco

    Paolo Iocco - 2015-04-27

    Hello lhatch,
    I thing it's a fbc-version issue: with fbc 0.93 and fbc 1.02 for Linux I can compile with no warnings an no errors. The source code should be then ok.

    I remember I gor similar errors wit a previous version of fbc, but it was a long time ago..

     
  • lhatch

    lhatch - 2015-04-29

    I just loaded 1.02 and same errors? Any other ideas what it might be?

     
    • Frank

      Frank - 2015-05-02

      Hi lhatch,

      Did you get GCBasic to compile on the Pi? I just tried it with the code from trunk and it compiled without error. Here are the steps in case you can spot something different or for others to try.

      1. Download Freebasic - fbc-0.91.0-pi-raspbian.tar.gz from here
      2. Extract the Freebasic archive on the RPi to maintain file permissions
      3. cd into the Freebasic directory and install with -
        sudo ./install.sh -i
      4. Install ncurses5-dev (and libusb-dev for Pickit 2 support) using -
        sudo apt-get update
        sudo apt-get install libncurses5-dev libusb-dev
      5. Get GCBasic from trunk using Download Snapshot button and extract
      6. cd to the newly created Great Cow Basic directory
      7. Compile using -
        fbc -exx -v gcbasic.bas

      The rest is for Pickit 2 support.

      1. Download PK2CMD source from this forum post and extract
      2. Download a recent PIC device file - maybe from this elproducts page and copy it into the pk2cmd/pk2cmd directory
      3. Rename the device file as PK2DeviceFile.dat
      4. cd to the pk2cmd/pk2cmd directory - compile and install pk2cmd using
        make linux
        sudo make install
      5. Add a path to the .bashrc file in the home directory using
        sudo nano .bashrc
      6. In nano add these 2 lines to the bottom of the file so that pk2cmd can find the device file
        PATH=$PATH:/usr/share/pk2
        export PATH
       

      Last edit: Frank 2015-05-02
  • lhatch

    lhatch - 2015-05-04

    Thanks for the help Frank,

    Turns out I kept getting bad trunk pulls. I had all the libs, bi, etc, think it was missing something from a folder.

    I downloaded the GCB@syn.zip and used the greatcowbasic folder and all is good. Might put the pkit2 on there for fun.

     

Log in to post a comment.