basic vs C memory availability

Questions about the BASICtools and MakeItC
Post Reply
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

basic vs C memory availability

Post by olzeke51 »

Hi all,
New guy here. Have searched 'advantage', armbasic vs makeitc, trying to figure out
which is better (more program space/ram!?) to program in. I realize that basic is
compiled so it would have a smaller footprint [than interp] - but does it load unneeded functions?
OOPS - a second question.

quick links are okay - saves retyping the info.

Thanks, Gary aka. olzeke51

Posts: 1039
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA

Re: basic vs C memory availability

Post by basicchip »

For the most part it is probably about a wash between BASIC and C. C would have an advantage if you don't use floating point as C has the ability to not link in libraries that are not used, and there is overhead in BASIC to handle download of code. The C compiler does better optimization than BASIC so that is also a factor.

So in a SuperPRO BASIC reserves 32K of the 256K space for BASIC firmware, but only uses 12K of that, it may grow to 16K if we add the SD file support. That other 16K could be used in BASIC to write to Flash. At the other end the BASICchip uses 12K of Flash for firmware leaving 20K for user code.

As for RAM there is probably less difference, BASIC reserves 256 byte buffers for all UARTs whether they are used or not.

We are working on a board that uses an LPC4330 with an external quad-SPI serial Flash, and there you will have 8M of Flash space.

I think it really becomes more important as to which language you feel comfortable in, and also who will be maintaining the code in the long run. More than one customer uses BASIC just because their customers are more comfortable maintaining and reading BASIC.

Post Reply