Go Down

Topic: Arduino BASIC compiler (Read 3850 times) previous topic - next topic

phenry

Aug 28, 2012, 04:23 pm Last Edit: Aug 28, 2012, 04:25 pm by phenry Reason: 1
Are there any interrest in an Arduino BASIC compiler? anybody interrested in a true optimizing structured BASIC compiler for Arduino?

We are working on such tool but we would like to know the community answer about that.

You can see description at http://www.microdevtools.com

wanderson

There are already a few options for those who want to program AVR's in basic, some open source.

http://microcontrollershop.com/product_info.php?products_id=352
http://www.fastavr.com/
http://code.google.com/p/dk-basic/
http://www.seanet.com/~karllunt/klbasic_main.html
http://www.jcwolfram.de/projekte/avr/chipbasic32/main.php


Given several options already exist some free other inexpensive, and yet you don't see many AVR projects that use them I don't think there is much of a market for a new version.
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

phenry

Those are all interpreters. What we are working on is a true compiler that generates native code (better code than GCC sometimes) !

wanderson

Sorry, but the first two links are to commercial compilers, both of which claim to produce fast optimized code. 

I have no dog in this hunt, but the questions you should ask yourself before continuing to put effort into what appears to be a commercial venture is what will your product offer that these don't.  And more importantly will that be enough to capture a big enough market to make the development costs worthwhile, particularly given the existence of free options (Arduino/GCC) for those chips and their accessibility to even beginners (the traditional market for basic)?
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

phenry

Hi wanderson,
thank you for your answers.
BASCOM is the only commercial product being actively supported. FastAVR is no more developed since 2006 at my knowlege.
As for my compiler, it will be FREE for arduino, completely freeware.
Later we will enhance it to add support for all AVR chips and we will sell it as commercial product, but arduino version will remain Freeware !

retrolefty


Those are all interpreters.
Actually the first two listed appear to be true Basic compilers, while the last three appear to be interpreters. Basic was originally designed as a interpreter only language, but many modern versions are true compilers.

What we are working on is a true compiler that generates native code (better code than GCC sometimes) !

What do you mean by 'better code than GCC sometimes? The Arduino IDE compiler is GCC, it's no better or worst then GCC, because it is GCC?
Lefty



phenry

@retrofly
Yes, ours is a true compiler.
Better than GCC I meant that our compiler generates better code than GCC does. Obtained program is more compact and make better use of registers than GCC compiler (used actually for Arduino).

wanderson


Hi wanderson,
thank you for your answers.
BASCOM is the only commercial product being actively supported. FastAVR is no more developed since 2006 at my knowlege.
As for my compiler, it will be FREE for arduino, completely freeware.
Later we will enhance it to add support for all AVR chips and we will sell it as commercial product, but arduino version will remain Freeware !


More power to you; however, since one such product ceased production, I doubt there will be enough of a market to pay for your development costs. much less make any kind of profit, particularly if you offer Arduino versions for free.  In my opinion, the Arduino market is the one most likely (and not very, IMO) to be interested in such a product.
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

retrolefty


@retrofly
Yes, ours is a true compiler.
Better than GCC I meant that our compiler generates better code than GCC does. Obtained program is more compact and make better use of registers than GCC compiler (used actually for Arduino).


Ah, I see, thought you were referring to the Arduino platform. Good luck with your offering.

I know that Basic is still popular for some, one only has to look at the Picaxe product line and forum to see that Basic+micro-controllers are still popular and very usable for some. The Basic Stamp product line is also still available, but it is rather long in the tooth these days. I used some Picaxe chips for a year or two and thought they were very easy to use and program. I changed to Arduino because I wanted to 'bite the bullet' and try and master C/C++, and while I'm certainly not a master I seem to be able to get done what I want.

Lefty

Graynomad

Honestly I think you'll be pushing sh1t up hill with a pointed stick getting existing embedded people to use BASIC.

Maybe those getting into the game (especially if they are coming from Picaxe et al) would be interested, but then you have the lack of existing Arduino-specific libraries and drivers to content with.

______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

robtillaart


For me BASIC is just another 3rd generation programming language. The question will not be if the code is faster but if it is fast enough and 99% of the time C is. If not assembly becomes the first option - or redesign the algorithm, use a faster board, not another language.

I think it would become more interesting if you came up with a "sensor actuator motor language" that could easily be used by younger children, e.g. for programming robots. Call it ROBO-BASIC. That would give it a focusgroup and a possible market in the form of schools.

Nevertheless building a compiler is a nice piece of work (even if it won't beat the GCC)

Finally a language like Python would also be interesting in some markets. Or a rule-language which consists (mainly) of  condition=>action  clauses
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

MichaelL65

Yes. I would be interested anyway. For some reason I have never really wrapped my mind around C as well as I have Basic. Heck, I can code in assembler better than I can in C!

MichaelMeissner

#12
Sep 20, 2012, 05:57 pm Last Edit: Sep 20, 2012, 06:02 pm by MichaelMeissner Reason: 1
Well the FreeBasic folk have had an option on their todo list to marry the FreeBasic front end to GCC since 2008, but I would imagine by now, it likely will never happen (http://en.wikipedia.org/wiki/FreeBASIC).

Of course you could always just roll up your sleeves and do a new implementation of a Basic front end for GCC.  It is certainly do-able, but it is a lot of work.  If you've never worked on the GCC project before, I would expect it to take at least a couple of months for an experienced compiler developer to be able to interface with the current GCC environment, obviously much longer if you are neither a GCC developer nor a compiler developer.  It's been about 30 years since I wrote a compiler front end, so I don't remember how long it takes to develop a simple first attempt at a front end.

Bear in mind, anything that uses GCC needs to be covered under the Gnu Public License (GPL), and that if ultimately you want the code to be a part of the GCC releases, you will need to donate the code to the Free Software Foundation.

Go Up