Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:08 30 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : FreeBASIC alternative

     Page 1 of 2    
Author Message
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 01:51am 08 Mar 2014
Copy link to clipboard 
Print this post

PureBasic is a great cross platform compiler but... it costs you money. Many of us use JustBasic but it works on Windows only and it has a lot of restrictions: interpreted code, impossibility to use DLLs, etc.

There was always FreeBasic alternative (more than a QBasic clone) but you had to work a little more to have a working graphical interface for your programs. From last year (2013), thanks to D.J.Peters, FreeBasic got a good wrapper to FLTK (Fast Light Toolkit) for both Windows and Linux. See if you like it here (the thread have a lot of images and examples).

I recommend you to get only the .zip archive as the other one have some problems (read the thread).
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 02:14am 08 Mar 2014
Copy link to clipboard 
Print this post

Another excellent advantage of starting using it, is that it have a lot of similarities with Great Cow Basic for microcontroller (the same language) and you can use Geany as a IDE for both (but it may be a problem unless you set the "Compile" button to start the FreeBasic compiler, and "Build" button to start the Great Cow Basic compiler, because both use the same file extension and Geany will use FreeBasic grammar for both).

BTW, Great Cow Basic is a FreeBasic project Edited by vasi 2014-03-09
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 04:41am 08 Mar 2014
Copy link to clipboard 
Print this post

You set the building commands like this



Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 10:07am 08 Mar 2014
Copy link to clipboard 
Print this post

I've found the best IDE for Great Cow Basic is the SYN@GCB by Frank Steinberg.
Its based on the SYNWRITE by Alexy T.

I modified GCB@SYN to include some Arduino style buttons and added PICkit2 programming to my version at my site GreatCowBasic.com .

PICkit 2 gives you one click compile, program and then access to the PICkit 2 UART tool and Logic Analyzer.
You can also install the low cost Real PIC Simulator and the links are already setup.

Real PIC Simulator allows you to debug your project with simulated hardware and step through the assembly code and run to breakpoints.
Or import the assembly file into MPLAB and simulate there.

Real PIC Simulator is $29 but the rest is free.



Real PIC Simulator Screen Shot

GCB@Syn (and also carried over to my modified version) features:

- no installation, intended to work OUT OF THE BOX. Just start the IDE.exe in the root folder
- complete GreatCowBasic compiler
- AVRdude and Avrdude-GUI
- Terminal by Br@y++
- SynWrite editor
- PICpgm & WinPicPgm programmming software. Support for PicPgms configuration (pgmifcfg.xml) for additional programmers, see http://www.franksteinberg.de/#Mikrocontroller
- syntax highlighting
- code folding
- sub/function list
- autocomplete
- context sensitive help (F1)
- multifile tabs
- bookmarks
- doubleclick on compilererrors leads to sourcecode-line
- oneclick assemble/compile/flash microcontroller (F5, F6, F7, F8)
- programmer-software for AVR and PIC preinstalled
- programmer-software configurable via batchfiles
- compiler calls configurable via batchfiles
- simple PicKit2 support by adding pk2cmd from Microchip ( I add this for you).
www.elproducts.com
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 10:21am 08 Mar 2014
Copy link to clipboard 
Print this post

You did an excellent job, I tested it before and is great. I guess is only for Windows...
Geany provide only basic functionality but works on Linux and is a cross platform IDE. With Geany I do also JALv2 projects. It can be also used for AVR but I prefer Eclipse for that.
We always had very good tools under Windows - Linux was the problem when it was about PIC development but now we have many good choices.

Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 11:34am 08 Mar 2014
Copy link to clipboard 
Print this post

  vasi said   You did an excellent job, I tested it before and is great. I guess is only for Windows...

Thanks, and yes, windows only.

I prefer Mac but I wanted to make the easiest path possible for the beginner and GCB@SYN plus PICkit 2 fit perfectly. And since GCB is windows only I stuck with this.
Someone can pick up a remanufactured Windows PC for under $100 here in the USA so having a dedicated GCB computer doesn't seem like a big deal even for a Linux or Mac user.
www.elproducts.com
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 11:58am 08 Mar 2014
Copy link to clipboard 
Print this post

When you say
  elproducts said  ...And since GCB is windows only I stuck with this.

you are referring only at the IDE, right?
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 06:00pm 08 Mar 2014
Copy link to clipboard 
Print this post

  vasi said   When you say
  elproducts said  ...And since GCB is windows only I stuck with this.

you are referring only at the IDE, right?


As far as I know, GCB runs on windows only unless you use a virtual install like wine or parallels.

Why do you know of a pure Linux or Mac GCB?
www.elproducts.com
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 08:35pm 08 Mar 2014
Copy link to clipboard 
Print this post

Anyone tried QB64? It's free.

http://www.qb64.net/
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 09:35pm 08 Mar 2014
Copy link to clipboard 
Print this post

Hey Guys,

Vasi, EL, thanks for this thread. I'm hearing about so much great stuff I never knew was out there. After I get a couple uMite projects under my belt I want to try the GCB. I have one 28 pin uMite project well under way, testing it with each beta version.

Is GCB still under development or still being revised, is there a GCB forum ?? I like the idea of compiled basic on the smaller 8 bit PIC micros. I have used the 8 pin PIC12F683, 14 pin PIC16F688 and 20 pin PIC16F690 in past projects - will GCB work on those micros ?? So far I have used the ICD3/PicKit2(Cana Kit)/PicKit3 and the old MPLAB IDE with assembler on projects, can I use those tools with GCB ?? Will GCB work on with 18F series PIC's ?? Windows only platform works well for me.

With summer coming and much time used up on the farm and in the fields and garden I'm afraid it may be next fall before I get time to really explore GCB properly, but I will keep up with things on TBS and maybe other forums.

Thanks,

Lou
Microcontrollers - the other white meat
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 02:20am 09 Mar 2014
Copy link to clipboard 
Print this post

GCB is constantly being updated but really slowly cause it's basically one main guy Hugh Considine who created it back in college and still working on it. There are members of the forum who contribute as well including me when I can. The code is completely open source.

All the parts you listed and more are supported including 18F.

The list of parts is on the main GCB site along with a link to the forum.
GCB website

Yes, you can use those tools. GCB produces a pure assembly file so you can create an MPLAB project and load the GCB .asm file and run it like any assembly program. The BASIC commands can be passed through as comments so you can see what BASIC command is being implemented.
It's really handy for debugging.
www.elproducts.com
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 02:55am 09 Mar 2014
Copy link to clipboard 
Print this post

If you want to program in C64 on the road, check out this free BASIC for iPhone/ipad. It's really well done.

Commodore 64 BASIC for iPad
www.elproducts.com
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 04:25am 09 Mar 2014
Copy link to clipboard 
Print this post

  elproducts said  
As far as I know, GCB runs on windows only unless you use a virtual install like wine or parallels.

Why do you know of a pure Linux or Mac GCB?


@elproducts, you have to go to the roots and start from the fact that GCB is a FreeBASIC project. And from the fact that you have access to the sources. And from the fact that GCB does not depend on a special OS to run.

Now, lets see if FreeBASIC is available only for Windows... of course is also available for Linux and for DOS. That means it will compile GCB at least for Linux. GCB will only use standard access to files and folders, will create files and will launch other applications - nothing unusual that will pose obstacles. That being said, yes, I use it natively on Linux, using Geany as IDE. That was the second meaning (apart of having a good PC programming alternative in FreeBASIC) of my post.

Now, here is an archive with screenshots from my Linux Desktop (it looks a little like Mac OS X). BTW, unfortunately, we don't have FreeBASIC for MAC

2014-03-09_142132_gcb-linux-screenshots.zip

- one of the images presents gcbasic.bas source inside Geany IDE and in console you will see a FreeBASIC report about a successful compilation;
- another image will show you the content of gcbasic folder (with blue color are the folders and with green is the elf executable of GCB);
- the last image will show you in the same Geany IDE a GCB source for PIC18F46K22, successfully compiled.

I can show you much more but you can try for yourself.

P.S. : GPUTILS, which is the open source counterpart of Microchip assembler, is also cross-platform (I guess is also available for Mac).
P.P.S. : So, I use Geany IDE for three useful things:
- editing and compiling FreeBASIC sources;
- editing and compiling GCBasic sources (I have also pk2cmd to program the PICs);
- editing and compiling JALv2 sources (which does not require any extra program to generate the .hex files).
Everything linux native.Edited by vasi 2014-03-10
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 06:40am 09 Mar 2014
Copy link to clipboard 
Print this post

Thanks EL,

I know you guided me to GCB before... Going to do more poking around.

Lou
Microcontrollers - the other white meat
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 11:13am 09 Mar 2014
Copy link to clipboard 
Print this post

Excellent summary Vasi.
I don't have any issues using windows but I know Hugh was working on Linux version. You've proven it can be done.
You should post this on GCB forum for other Linux users.
www.elproducts.com
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 11:15am 09 Mar 2014
Copy link to clipboard 
Print this post

  Lou said   Thanks EL,

I know you guided me to GCB before... Going to do more poking around.

Lou


It was recently updated and now has improved online help file and supported device list.
www.elproducts.com
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 03:51pm 16 Jun 2014
Copy link to clipboard 
Print this post

Me and my illness: to try always new linux distributions. Side effects? I always forget to save something, and many times is about an important project or a new set of photos made by my wife. This time I tried the last 64bit Fedora and Android x86. Went back to Ubuntu but this time, it was Lubuntu as it is very light for a laptop (after you do all the tweaks).

Unfortunately, FreeBasic is 32bit only and is not working from the first try on 64bit capable systems. Sometimes you get it right, sometimes you struggle until you succeed or give up and change the distro - or move back to Windows. I finally succeeded on Lubuntu after compiling ncurses library from sources (the dynamic library is broken by default) and compiled Great Cow Basic and some examples using FLTK library.

The final conclusion is: Beginners who want to use both FreeBasic (with FLTK or any available GUI) and Great Cow Basic must do it under Windows because there is already an executable. Or, if you have a 32 bit machine, then there are no problems. If you have a 64bit PC, then be prepared for the worse, even if you installed a 32bit Linux on it.

So I can't make a tutorial for linux, the problems depends on which disro you use. For the advanced people I don't care, they are prepared for anything and at the end they solve the problem.

Anyway, if you dare to try the latest SVN version of GCB, you can compile it only with FreeBasic v0.23 as bigger versions give some errors. I'm yet to find out if is worth the effort...

Compiling FLTK examples under 32bit Lubuntu 14.04 involves this command (using standalone FreeBasic v0.90.1):
[code]fbc -p /usr/lib/i386-linux-gnu -d FLTKSTATIC -Wl "/usr/lib/i386-linux-gnu/libXext.so.6 /usr/lib/i386-linux-gnu/libfontconfig.so.1" Drawing01.bas[/code]Edited by vasi 2014-06-18
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Goeytex
Regular Member

Joined: 12/05/2014
Location: United States
Posts: 74
Posted: 08:56am 17 Jun 2014
Copy link to clipboard 
Print this post

Elproducts posted:
[quote]I modified GCB@SYN to include some Arduino style buttons and added PICkit2 programming to my version at my site GreatCowBasic.com.[/quote]

I went to the site above and could not find your modified version. There is no obvious link for downloading anything. No download button ... nothing.

Why not consider making it easier to find? Or provide a direct link to your version.

I have what I believe to be the latest version installed, but there are several versions scatted about and I am not sure which is yours.

That being, earlier this morning I wrote short programs for both a PIC18F886 and 16F1829 using the DHT-11 Temperature/Humidity library and LCD library. In less than i hour I had it displaying Humidity/temp on a 16x 2 display.

I finally located the command line reference files for both PK2CMD & PK3CMD so I will try to write batch files for some extra features as well as incorporating the PICKIT3 into the IDE since quite a few of the newer PICs are not supported by PicKit2.

Compared to JAL, GCBASIC is much easier to get started with. JAL requires a lot of bit fiddling and is not much easier than learning C. However it is very powerful once you get up to speed. Now If GCB would add 32-bit floating point support, I would be very happy. Edited by Goeytex 2014-06-18
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 09:04am 17 Jun 2014
Copy link to clipboard 
Print this post

I guess is this one. The starter kit ... but not sure...
It says about Pickit2 included... that must be.
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 12:03pm 17 Jun 2014
Copy link to clipboard 
Print this post

  Goeytex said  
[quote]I modified GCB@SYN to include some Arduino style buttons and added PICkit2 programming to my version at my site GreatCowBasic.com.[/quote]

I went to the site above and could not find your modified version. There is no obvious link for downloading anything. No download button ... nothing.

Why not consider making it easier to find? Or provide a direct link to your version.


Elproducts posted:
Until recently it was incredibly difficult to find the latest version of GCB. Then with push from forum members and a lot of work by one user the website was updated and now the latest version is always under downloads at the main Great Cow Basic site.

http://gcbasic.sourceforge.net/

Go to the Download Page and you can get the raw .exe file or the recommended version of GCB@SYN which is the GCB compiler incorporated into the SYNWRITE IDE. The latest is the version dated xx/05/2014.

Before all this was sorted out, I created the GreatCowBasic.com site to hopefully explain things better, add some sample programs and create a simple place to download the GCB@SYN with the PICkit 2 command line installed plus my latest device file for the PICkit 2 that supports the latest 8-bit devices (no need for PICkit 3). I also added the Arduino style icons and used it with the CHIPINO module for easier hardware support.

Now that the GCB website, help file and GCB@SYN have been updated, my site is less of a benefit. And if you couldn't find the download, which is on the Getting Started page, then I guess it didn't help much.

  Goeytex said  
I have what I believe to be the latest version installed, but there are several versions scatted about and I am not sure which is yours.

That being, earlier this morning I wrote short programs for both a PIC18F886 and 16F1829 using the DHT-11 Temperature/Humidity library and LCD library. In less than i hour I had it displaying Humidity/temp on a 16x 2 display.


Elproducts posted:
The latest GCB@SYN is dated 11/05/2014. The version will show on the build screen during the compile.

  Goeytex said  
I finally located the command line reference files for both PK2CMD & PK3CMD so I will try to write batch files for some extra features as well as incorporating the PICKIT3 into the IDE since quite a few of the newer PICs are not supported by PicKit2.

Compared to JAL, GCBASIC is much easier to get started with. JAL requires a lot of bit fiddling and is not much easier than learning C. However it is very powerful once you get up to speed. Now If GCB would add 32-bit floating point support, I would be very happy.


Elproducts posted:
The latest GCB@SYN includes the IPE for PICkit 3.
My version includes the PICkit 2 Command line with an updated device file that supports most of the latest 8-bit PICs so no PICkit 3 needed. I'm working on updating my GCB CHIPINO version with the latest GCB@SYN 11/05/2014 and an my expanded PICkit 2 device file. I haven't released this combination GCB installer yet so I recommend getting the GCB@SYN at the official GCB site.

For my latest PICkit 2 device file visit my PICkit 2 page at:
http://www.elproducts.com/build-your-own-pickit-2.html
www.elproducts.com
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025