Skip to content

flightaware/Bitlash-2.0-RC3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitlash Release Notes
June 4, 2011 -br

----------

2.0 RC3d Release Notes -- June 4, 2011

Quick Start for SD Card Support:
	- Download and install Bitlash 2.0 RC3d from http://bitlash.net
	- Download and install SD Card library from http://beta-lib.googlecode.com/files/SdFatBeta20110604.zip
	- Restart Arduino 0022, open examples->bitlash->bitlashsd and upload to your Arduino

Quick Start without SD Card Support:
	- Download and install Bitlash 2.0 RC3d from http://bitlash.net
	- Edit libraries/bitlash/src/bitlash-instream.c to turn off the SDFILE define
		at or near line 32, make this:
			#define SDFILE
		look like this:
			//#define SDFILE
	- If you are using a Mega2560, edit SdFat/../SdFatConfig.h @ line 85, make this change:
		#define MEGA_SOFT_SPI 1
	- Restart Arduino 0022, open examples->bitlash->bitlashdemo and upload to your Arduino

Summary for this version:

	- Runs scripts from SDCard file systems
	- Has a language worth running from a file
	- String arguments!
		printf("%d:%d:%d\n",h,m,s)
	- Can write SDFILE from script, too:
		fprintf("logfile.dat","%d:%d:%d\n",h,m,s)

- Tested on and requires Arduino 0022

- This version runs scripts from SDCARD as well as EEPROM
	- Tested on Sparkfun OpenLog 1.0 and Adafruit Datalogger Shield hardware

- bitlashsd sd card demo REQUIRES SDFat Beta 20110604 available from:
	- download link: http://beta-lib.googlecode.com/files/SdFatBeta20110604.zip

	- to install, copy the "SDFat" library from the SDFatBeta distribution
		into the Arduino/libraries directory and restart Arduino
		
	- open the "bitlashsd" example and upload

	- to disable SDFILE support:
		- turn off the SDFAT define in bitlash-instream.c
		- open and upload the bitlashdemo example


- BUGFIX: 0xb broken by 0b1000!
	print 0xbbbbbbbb
	0

- BUGFIX: MAX_USER_FUNCTIONS error allowed only n-1 functions
	- bumped MAX_USER_FUNCTIONS to 8

- BUGFIX: bloader.py was not well-synchronized at the start of a file upload
	as a result it could lose the first several lines of a file
	it now syncs correctly with the command prompt on the arduino

- string arguments
	- printing strings with :s
- unary & operator
- unary * operator
- // comments

- doCommand()
	- is re-entrant
	- returns numvar (-1L on error)

- printf("format string\n", "foo", "bar",3)
	- format specifiers %s %d %u %x %c %b %% work as per C printf()
	- BUG/FEAT: width specifier is not handled for numeric printing
		- %4s works but %4d or anything else doesn't
	- see also fprintf() below for printing to file on sd card

- EXAMPLE: commands supported in the bitlashsd sd card demo

	dir
	exists("filename") 
	del("filename") 
	create("filename", "first line\nsecondline\n")
	append("filename", "another line\n")
	type("filename") 
	cd("dirname")
	md("dirname")
	fprintf("filename", "format string %s%d\n", "foo", millis);

- scripts on sd card

	- put your multi-line script on an SD card and run it from the command line
		- example: bitlashcode/memdump
		- example: bitlashcode/vars

	- //comments work (comment to end of line)

	- functions are looked up in this priority / order:
		- internal function table
		- user C function table (addBitlashFunction(...))
		- Bitlash functions in EEPROM
		- Bitlash functions in files on SD card

	- beware name conflicts: a script on SD card can't override a function in EEPROM

	- BUG: the run command only works with EEPROM functions
		- it does not work with file functions
		- for now, to use run with a file function, use this workaround:
			- make a small EEPROM function to call your file function
			- run the the EEPROM function

	- startup and prompt functions on sd card are honored, if they exist

	- you can upload files using bitlashcode/bloader.py
		- python bloader.py memdump md
			... uploads memdump as "md"


----------

2.0 RC2 -- 06 March 2011

This release fixes a bug in RC1 which broke function definition in some cases.

Please report bugs to bill@bitlash.net


1. BUG: Function definition was broken if the line contained ; or additionalcommands


If the command defining the function was the last thing on a line, RC1 worked correctly:

	function hello {print "Hello, world!"}		<-- worked

If there were characters after the closing } of the function definition, the bug
caused the function text to be mismeasured and spurious text would be appended to
the function definition, causing it to fail in use:

	> function hello { print "Hello, world!"};	<-- this is legal but it triggered bug in RC1
	saved
	> ls
	function hello { print "Hello, world"}};	<-- BUG: extra } saved at the end

The function text is measured more accurately in RC2.

Users are encouraged to upgrade to fix this bug.  

Existing functions may need to be fixed, as well.  Make sure the {} balance.


2. Defining a function within a function fails.  That's ok, for now.

Noting a behavior that may change in a future release: an attempt to define a function
from within a function will fail silently or worse.  Don't do that.

	function foo {function bar{print "bar"};bar};	<-- don't do this!
	> foo
	saved
	> ls
	function foo {function bar{print "bar"};bar};
	function bar {};	<-- sorry, doesn't work in 2.0
	> bar
	> 

This isn't new: Bitlash 1.1 has the same internal implementation limitation, but 
it was nearly impossible for a human to get the backslash-quote combinations right 
to attempt the test.


2.0 RC1 -- 05 Feb 2011

- Syntax overhaul: the Bitlash 2.0 language is considerably different,
	and old macros will need to be updated to run in v2

	if (expression) { stmt;...;stmt;} else {stmt;...;stmt;}
	while (expression) { stmt; }
	switch (expression) { stmt0; stmt1; ... stmtN; }
	function hello {print "Hello, world!";}

- Macros are now Functions, they take arguments and can return a value
	arg(0) is the count of args you got
	arg(1..n) are the args
	return expression; to return a value; zero is assumed
	User Functions in C use this same scheme now

- Function (/macro) definition syntax has changed:
	function printmyargs {i=0; while ++i<arg(0) {print arg(i);}}

- New Functions
	bc: bitclear
	bs: bitset
	br: bitread
	bw: bitwrite

- New API calls
	setOutputHandler() api allows capture of serial output
	doCharacter() api allows char-at-a-time input to Bitlash

- New Examples
	- Bitlash web and telnet server

- Small Beans
	Input buffer is 140 characters, up from 80.  twitter is the new Hollerith
	Binary constants of the form 0b01010101 are supported

1.1 -- 04 Feb 2010
- User Functions (addBitlashFunction)

1.0 -- 17 Jan 2010
- Fixed filenames in the examples/ folder to remove '-'
- Updated copyright date in signon banner
- Doc set update: see http://bitlash.net

1.0rc2 -- 22 Jun 2009
- Fixed bug which botched handling of escaped characters in string constants.

1.0rc1 -- 01 Jun 2009
- See http://bitlash.net for updates

0.9 -- 23 Nov 2008

- License updated to LGPL 2.1 
- Added functions: 
	- beep(pin, freq, duration)
	- shiftout()
- SOFTWARE_SERIAL_RX: build-time configurable software serial rx on pins D0-D7
	- to support Ethernet integration
- Adafruit XPort Direct Ethernet integration works pretty well
- Sanguino integration
	- Compile for Sanguino Does The Right Thing re: serial ports
	- (there are some serial port interrupt issues pending)

0.8 -- 31 Oct 2008

- SOFTWARE_TX:
	- baud(pin, baud)
	- print #pin:expr
...

About

BitlashSD Beta: run script from SD card

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 70.4%
  • Java 24.0%
  • Python 4.6%
  • C++ 1.0%