Menu

rpi and gcb

2021-05-13
2022-03-21
1 2 3 > >> (Page 1 of 3)
  • stan cartwright

    stan cartwright - 2021-05-13

    I just bought a rpi 400 because for the price it seemed better than a rpi4 4MB and the 2MB rpi4 is out of stock everywhere.
    Anyway I like and recommend it for £60 odd.
    I use twister os and it's imho the best rpi os I've used. One click to download arduino ide or cura...working versions.
    I know there's a linux gcb but not easy to get working with rpi from my experience. What a pity.
    The rpi 400 shows potential as a cheap desktop...ok a used pc would be same price but compared to a Dell Pentium5 4GB the rpi is faster and has 4K hdmi and 2 usb3 and gig ethernet and very low power use.
    I think rpi's will be more popular and wish gcb was an easy install option, even if it just made a hex file and sort flashing it yourself.

     
  • mmotte

    mmotte - 2021-05-14

    Stan,
    I have loaded GCB on 3 different Linux/ubuntu systems over the last several years. The last was Mint a couple years ago when you was beating your head and thrashing about. It works.
    I remember you could not find an IDE. I used the Gedit (also called "Text editor")that comes with Ubuntu. It has the ability to run "external Tools" and by using the example scripts you can write your own to GCB compile and end up with the .hex file. It has highlighting. It doesn't run the pin configuator but you only use the UNO any how. It doesn't have terminal but there are terminal programs in Linux.
    Yes, I only used it with PICkit2 and used the PICcmd script to program. How much more do you need?
    arduino has a hex loader in Linux ,I think?, but do not know because I have never used it.
    And Evan has:
    PickitPlus for the Pi ....PICCMD-Pi

    Sounds like you have a project to work on! You could write a tutorial on installing it into PI.

    One question , Why did you not choose Raspian for the OS?

    GL
    Mike

     
    • stan cartwright

      stan cartwright - 2021-05-14

      Well mmote.ok call you Mike. Er ... raspios looks carp. I like Twister os, which seems to be built on rpios debian arm v7 64bit not 32bit but when I try to get Twister os working from usb it don't...and I have set it up fine with eeprom upgrades and vcgm shows it's usb boot priority. Doing my head. Rpi 400 does boot fro usb stick but it's sooooo slow...useless.
      Anyway gcb for other than windows and easy install is the dream but only to put another feather in gcb's cap

       
  • stan cartwright

    stan cartwright - 2021-05-14

    Where as rpi was gpio pins it is now a good cheap media player.
    I got a 1TB usb hdd plugged into the tv and its got top/bottom borders but plug the drive into rpi 400 and vlc plays full screen, strange but the pi is now my media player.
    For sound it's hdmi from rpi to tv, then sdif optical lead from tv to box that converts to stero audio. This goes into a valve amp using 2 triode with leds underneath to make them glow then to a stereo amp and speakers.
    does the valve preamp give a different tone to digital audio?

     
  • stan cartwright

    stan cartwright - 2021-05-14

    I never got gcb to work on rpi...but then I never got freebasic to work either.

     
  • mmotte

    mmotte - 2021-05-14

    Stan,
    I have not come across Twister until now.
    I am trying to do some Radio Astronomy and came across astroChart which is a site for building a receiver for atomic Hydrogen in the universe. I bought the suggested PI IIIb and tried to load the suggested "Mate". Mate almost worked but ran soooo slow. I put Raspian on and it runs great. It run a RTL SDR dongle for the receiving.
    I am building antenna servos for azimuth and elevation. I came across hall effect magnetic encoder chips which convert circular rotation to absolute angle, 360 deg= 16738 units and it comes out as SSI protocol. GCB to the rescue! I have it working on the proto board right now.

    Yea glowing valves! I have a few old transmitter tubes I have wanted to make lamps out of.

    73
    Mike

     
  • stan cartwright

    stan cartwright - 2021-05-14

    Mike.It's like you get some kit and when you try it are impressed. I got rpi 1,2,and 3 but this is Much faster.
    Rpi 4/400 is supposed to boot off usb flash insted of the sd card and I got it working but it was SOOOOOO SLOW. bit of a drag no usb booting but sd card is fast.
    I used
    sudo apt update
    sudo apt full-upgrade
    sudo rpi-update

    reboot Raspberry Pi

    sudo reboot

    install latest bootloader

    sudo rpi-eeprom-update -d -a

    launch this tool for final configurations

    sudo raspi-config
    to use the latest eprom and choose boot order.

    ok not really gcb related but sort of is...like connect uno to rpi.

     
  • stan cartwright

    stan cartwright - 2021-05-14

    the rpi 400 is aimed at a new cheap desktop machine and twister os is not only better looking than rpios, it works better for media. connect a usb drive, it shows/ click the icon and it opens all files. click any file and it plays it in one of 4 players. very nice for media and not much frame loss. that's if you got a 4K tv otherwise need to lower res and icon size ie 42" tv

     
  • stan cartwright

    stan cartwright - 2021-05-18

    I'm still learning rpi 400. I overclocked to 2100mhz , no force turbo and works but show clock speed icon jumps to 22000???
    I luv this rpi. Could it be integrated to a gcb circuit?
    I have this under my main 40" tv as it's wired as a pentium 5 pc was. Both have 4 GB ram but the rpi pisses all over the pc for performance and graphics...it's got 2 hdmi 4K...not a vga .
    Trouble is it's linux and gcb flies best on windows.
    Still, if you want a new toy, get a rpi 400.
    Apart from having to learn python the rpi 400 is an excellent media player for any drives.
    I use a 2TB usb and all films and music are playable withe the players installed in twister os.
    looks like win 10...cos I chose the win 10 lite theme...could be imac theme....urghh

     
  • mmotte

    mmotte - 2021-05-19

    Stan,
    I had a few minutes(90 minutes) and i installed FBC and GCB last night into a Raspberry Pi IIIB. FBC worked fine after I remembered that the GCB install script has to be run from the correct directory. And this time I remembered what the unpack PW was. I got a success message that GCB compiled but it wouldn't run. I think I missed to use the second part of the install.sh script, which I just remembered now and I ran out of time.

    i will Work on it another day.
    73
    BR
    Mike W9YS

     
  • stan cartwright

    stan cartwright - 2021-05-19

    I tried to install Freebasic on rpi3 but when you compile print "hello world" it complains about missing libcurses. Freebasic on a rpi with piwiring to use the gpio pins would be more useful than learning python... which although interpreted , runs fast and seems easy... like you don't need to dim vars before use.
    Any info on your sources for rpi/arm7 freebasic would be useful.
    I'm happy with the windows version of gcb as it seems more made for windows and works nice but gcb on a rpi ,if it has to be built with fb seems a challenge.
    Sorry if not the place to say I like the rpi400 but as I said it seems smoother than an old pc.

     
  • stan cartwright

    stan cartwright - 2021-05-19

    My thoughts were an uno connected to a rpi and the rpi does the graphic display.

     
  • mmotte

    mmotte - 2021-05-20

    Stan,
    I had a few more minutes at the Raspberry pi IIIB and I was right that I had not run the second part of the install.sh script. There are two parts and they must run from terminal in the "/GreatCowBASIC/sources/linuxbuild" directory . The first one is "install.sh build" and the second one is "install.sh install"

    Then you can test by typing "gcbasic //version"
    or just "gcbasic" and it gives the options.

    first you may need to add it to the $PATH variable so it can be found. This is in the instructions somewhere.The "gcbasic" executable is in the "/opt/GCBASIC" directory.

    The attached jpg file shows that gcbasic compiled the
    "first-start-sample.gcb" but I messed up and didn't put in the option to assemble to make the .hex file. the .asm and .html were made.

    Just one more step to put the "GCBcompile" Tool in the Gedit text editor.

    1
    2
    3
    4
    #!/bin/sh
    
    
    /opt/GCBASIC/gcbasic -NP /K:A /A:GCASM $GEDIT_CURRENT_DOCUMENT_PATH  | grep -v -w "Message" | grep -v -w "Warning"
    

    Then it will make the hex file.

    I was disappointed that it is an old GCBasic 9806 6/12/2019 but will do all that I need to do.

    Also now I will need to add PKcmd to program a PIC chip and maybe look up arduino programmer to do your old UNO. Maybe I need the PKcmd from Pickitplus to run on the PI?

    That's all for now. The install on Raspberry has gone OK, hours in stead of days like the last time I installed on Mint.

    73
    Mike

     
  • stan cartwright

    stan cartwright - 2021-05-20

    Thanks for the gcb / rpi installation info. Not as easy as win version.
    My problem is getting FB to work with rpi. A search says you need FB to build a newer FB...??
    How come most linux apps for rpi are just gui mouse select or terminal apt get...
    but not FB it seems. I appreciate some one has to convert it to rpi from a main linux distro
    but rpi being quite popular thought it would be sorted by now.
    I tried ubuntu mate on rpi 400 but couldn't get into it. Rpios is so old looking but supported.
    TwisterOs is different? ie compatibility. I don't know but I like the os even though bloated with like 5 media players. Loads of useful stuff installed.
    Getting it to boot from usb drive worked but it was very slow compared to sd card.
    also blue tooth doesn't work. It's not seeming the dream anymore.

     
  • mmotte

    mmotte - 2021-05-20

    FB installed lickity split. I down loaded the one for arm Raspberry pi 32 FreeBasic 1.07.3. First you have to unarchive it and then run the install.sh . I am running rasperian not twister.

    I am trying to install avrdude ?

     
  • stan cartwright

    stan cartwright - 2021-05-21

    TwisterOs has Arduino IDE in installable apps and lots of other arduino stuff like command line stuff under add/remove programs.
    avrdude on rpiOS has many links... https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins/installation was first I found.
    I'm checking out arm Raspberry pi 32 FreeBasic 1.07.3.
    never sure what to do with install.sh on any app. Do I make it executable by anyone?
    let you know if it installs and compiles without missing libcurses.
    cheers.

     
  • mmotte

    mmotte - 2021-05-21

    1) download the FB archive
    2) unarchive it into a new directory with a name you can find
    3) with you window file browser look in that directory and find install.sh
    4) right click on the install.sh file icon
    5) point to properties which is at the bottom of the menu
    6) point to permissions at the top of the window
    7) Execute should have a check mark already to allow executing file as program ( if not check it)
    8) close windows you opened
    9) Open console
    10) type cd \ which takes you to home directory
    11) type ls which lists the files and directories ... you could type dir but it don't have the color highlighting . You should see the FreeBASIC... directory in the list
    12) type cd Free* which takes you to the FreeBASIC...... directory . Note you only need enough chars to be unique name and the * fills out the rest!
    13) type ls which shows the files in the directory and install.sh is green = executable
    14) type sudo install.sh sudo is super operator which in windows is "run as admin"
    15) should install fbc
    16) type fbc and the options should roll by which means it is working

     
  • stan cartwright

    stan cartwright - 2021-05-21

    Thanks Mike for the detailed fb rpi install info. I messed up somewhere with install.sh...I'm good at that. Please check the vid , it will show my errors better than words. https://www.youtube.com/watch?v=Yp3yp-_KBiE

    ps. thanks again for posting the info. nice people on gcb forum

     

    Last edit: stan cartwright 2021-05-21
  • mmotte

    mmotte - 2021-05-21

    stan
    You skipped over steps 10 thru 13
    You were not in the FreeBASIC... directory when you executed the install.sh script
    It told you that it couldn't find it because you were in the wrong town.

     
  • stan cartwright

    stan cartwright - 2021-05-21

    It's cool you helping. I'm not a linux user so it's like win command prompt. Got this.
    It's in documents/ freebasic/fbarm expanded.
    I did all this on a rpi so screen capture is different to win

     
  • stan cartwright

    stan cartwright - 2021-05-21

    The install.sh file for FB is there but I can't get it to run.
    This is why I don't use linux. This basic function is a pain so what chance of the rest of linux which is basically text based..rhetorical.
    I still like rpis...just they're not educational...who would want to introduce computers to newcomers using linux?
    windows users can get by without the command prompt but linux users need the terminal to do anything. Even rpios has wheezy,jessie and buster different ways of downloading apps like the new sound drivers. rpi400 bluetooth sound doesn't play. Try to sort that out :)

     
  • mmotte

    mmotte - 2021-05-21

    Looks like you made it to the right directory!

    The instructions are in the readme.txt next to the install.sh

    Looks like I forgot the -i , so try sudo ./install.sh -i

    Or try it without sudo?

    Linux (if FreeBASIC is not available through your package manager):
    Download and extract the latest FreeBASIC-x.xx.x-linux.tar.gz. Open a
    terminal and cd into the extracted FreeBASIC-x.xx.x-linux directory, and
    run sudo ./install.sh -i to copy the FB setup into /usr/local.
    To compile FB programs, please install the following packages (names may
    vary depending on your Linux distribution):
    Debian/Ubuntu:
    gcc libncurses5-dev libffi-dev libgl1-mesa-dev
    libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev
    Fedora:
    gcc ncurses-devel ncurses-compat-libs libffi-devel mesa-libGL-devel
    libX11-devel libXext-devel libXrender-devel libXrandr-devel
    libXpm-devel
    If you want to use the 32bit version of FB on a 64bit system, it is
    necessary to have the gcc 32bit multilib support and 32bit versions
    of the libraries installed.
    Debian/Ubuntu:
    gcc-multilib lib32ncurses5-dev libx11-dev:i386 libxext-dev:i386
    libxrender-dev:i386 libxrandr-dev:i386 libxpm-dev:i386

      Now you can use fbc to compile FB programs (*.bas files) into executables.
      For example:
        $ cd FreeBASIC-x.xx.x-linux/examples
        $ fbc hello.bas
      This should have created the hello program. You can run it by entering:
        $ ./hello
    
     
  • stan cartwright

    stan cartwright - 2021-05-22

    @mmotte, Thanks for the reply. I'll see what I can do. It's not easy peasy.
    I got a new toy for rpi today, wasn't expecting it until next Thursday.
    It's a box that passes thru hdmi from rpi 400 and gives audio out to phonos or optical plug, which I was using with my tv to amp.....which has a 2 triode valve preamp....smooths out poor pcm audio and looks cool.
    Odd rpi setup with 2TB usb hdd and usb3 powered hub.
    This post was done on the rpi and it saw the camera ok. Works ok...twisterOS that is.

     
  • stan cartwright

    stan cartwright - 2021-05-23

    I got this far with fbc in /usr/local/bin
    Now how to install all the correct lib files.
    fbc seems to be in 2 places.

     

    Last edit: stan cartwright 2021-05-23
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.