Bitlash for MSP430
Overview
Bitlash is an interpreted language shell and embedded programming environment for the Arduino. Originally Bitlash is written by Bill Roy and is released under the MIT Open Source license. See Bitlash home page for more details.
I have ported Bitlash code for the Texas Instruments MSP430 series MCUs. The project depends on Energia framework. The code is kept compatible with Arduino. So far supported chips are MSP430G2553, MSP430F5529 and MSP430FR5739. Potentially Bitlash can run on any MSP430 MCU with at least 16kB of flash or FRAM for the code and 512 bytes (better 1kB) of RAM.
Download and install
The source is available from GitHub repository (switch to branch "msp430_github" after clone). Or use direct download link.
Energia IDE or Code Composer Studio 6 is required to build Bitlash.
Getting started
- Get sources and place them into your sketchbook/libraries/bitlash folder.
- Find Examples/bitlash/bitlashdemo sketch and open it with your IDE.
- Compile and upload the sketch to your board.
- Connect to the serial port at 9600 baud using terminal emulator.
- Try simple bitlash demo snippets for your board (See Device specific features)
- Read the online Bitlash documentation or Bitlash User’s Guide (in pdf)
Device specific features
MSP430G2553
16kB flash, 512B RAM
Since MSP430G2553 doesn't contain EEPROM user functions are stored in Information Memory Segments of the flash (SEGMENT_D, SEGMENT_C, SEGMENT_B).
Due to extremely low memory all the features are very limited:
- Only eight 16-bit variables - a to h
- Up to 2 background tasks
- Input buffer - 60 characters
- Compiled-in user functions are disabled.
- Expression evaluation stack size - 16
- Free memory left - about 90 bytes
- 192 bytes of flash for user functions
- Impossible to delete individual user functions (only "rm *" allowed)
Example (Blink red LED):
bitlash here! v2.0 (c) 2013 Bill Roy -type HELP- 94 bytes free > function blinkRed {d2=!d2;} saved > pinmode(2,1); run blinkRed,500 >
MSP430FR5739
16kB FRAM, 1kB RAM
Since MSP430FR5739 doesn't contain EEPROM user functions are stored in the upper area of FRAM. The FRAM is capable of rewriting individual bytes so it's possible to delete individual user functions.
The MSP430FR5739 build has the following features:
- Twelve 32-bit variables - a to l
- Up to 4 background tasks
- Free memory left - about 220 bytes
- Input buffer - 120 characters
- Compiled-in user functions are enabled.
- Expression evaluation stack size - 64
- 384 bytes of FRAM for user functions
- Possible to delete individual user functions
Example (Blink 4 blue LEDs at once):
bitlash here! v2.0 (c) 2013 Bill Roy -type HELP- 222 bytes free > function blink4 {a=7;while(a<=10){b=!dr(a);dw(a,b);a++}} saved > pinmode(7,1); pinmode(8,1); pinmode(9,1); pinmode(10,1); > run blink4,500 >
MSP430F5529
128kB flash, 8kB RAM
Since MSP430F5529 doesn't contain EEPROM user functions are stored in Information Memory Segments of the flash (SEGMENT_D, SEGMENT_C, SEGMENT_B). Thanks to huge amount of RAM the flash cache is implemented to allow deleting of individual user functions.
The MSP430F5529 build has the following features:
- 26 32-bit variables - a to z
- Up to 10 background tasks
- Free memory left - about 6700 bytes
- Input buffer - 120 characters
- Compiled-in user functions are enabled.
- Expression evaluation stack size - 64
- 384 bytes of FRAM for user functions
- Possible to delete individual user functions
Example (Blink red and green LEDs alternately):
bitlash here! v2.0 (c) 2013 Bill Roy -type HELP- 6766 bytes free > function blink {a=!a; d43=a; d44=!a;} saved > pinmode(43,1); pinmode(44,1); run blink,500 >
References
Add new comment