Suggested boards for running uLisp?


#1

I’m currently evaluating the compatibility of AVR-based boards with uLisp, and have tested the Arduino Uno (and other ATmega328-based boards), Arduino Mega 2560, and Arduino Micro (and other ATmega32U4-based boards).

Can anyone suggest any other boards with the following features:

  • ATmega based
  • At least 2 Kbytes of RAM
  • Commercially available assembled (not just PCB)
  • Programmable from the Arduino IDE

Thanks!


#2

How about the Adafruit Pro Trinket or Adafruit Feather 32u4 Adalogger?


#3

The Adafruit Pro Trinket is based on the ATmega328, so it should be fine - similar to the Arduino Uno.

The Adafruit Feather 32u4 Adalogger is based on the ATmega32U4, and so far I haven’t managed to get ATmega32U4-based boards to work reliably because of a problem with the serial interface. Uploading programs from the Arduino IDE Serial Monitor to the board occasionally seems to cause the Arduino IDE to lock up. If anyone can shed any light on this I’d be interested.


#4

On my laptop the Guneunio Micro (ATmega32u4) seems to work!
followed the instructions on the using uLisp page and the LED is blinking away :)
As you said it’s an occasional problem only but maybe you cracked it with uLisp 1.3


#5

The problem I had was that, when entering programs from the Serial Monitor, occasionally the serial would lock up, and only force-quitting the Arduino IDE would recover.


#6

I’m surprised to see no mention of the Teensy++ 2.0 (pjrc.com) anywhere. It has 128k of flash and 8k of ram, much more breathing space than an atmega328, plus built-in USB. CPU is AT90USB1286.

Teensy models: http://www.pjrc.com/teensy/index.html

Going forward the ARM boards have much more resources and might be interesting targets.

I don’t use Arduinos at all but ulisp looked interesting, so I downloaded it and stripped all the Arduino-specific stuff from it and have it compiling under Linux, but not working yet (more hacking will be needed). It’s really impressive though that one can write useful Lisp programs with just a few hundred memory cells. Wow!


#7

Thank you for suggesting the Teensy++ 2.0. I hadn’t encountered the AT90USB1286 before, but it looks similar to the ATmega2560. If it’s supported by the Arduino IDE it should be possible to port uLisp to it.

I’ll be interested to hear what you have to change to get uLisp to compile under Linux.


#8

To compile under linux I just brutally ripped out all the arduino-specific code (I2C etc.), changed a few things like Serial.print to printf, strcpy_p to strcpy, etc. plus had to move a few declarations around. There are still a ton of compiler warning messages that I’ll try to look at, and the resulting binary exits with stack overflow as soon as I type anything to it. So I’ll try to fix it, and maybe parametrize the types to use specific word sizes like int16_t instead of int, etc. I know lots of ARM boards support the arduino api now, so it would be nice to have a version that works on both avr and arm.

The 16-bit MSP430 is another interesting possible target because of the cheap Launchpad boards, but it doesn’t implement the Arduino api that I know of.

Added: it looks like there are very cheap Arduino Mega (2560) clones available on places like Ali Express, making the Teensy++ somewhat less attractive unless the small size is needed.


#9

Yes; see the ones I’ve listed here:

http://www.ulisp.com/show?1D1S


#10

Here’s another cute little board: https://tinycircuits.com/collections/all/products/tinylily-mini-processor

It uses an Atmega328 and is a circular board just 14mm in diameter!


#11

It should definitely work on that.


#12

Would it be possible to put the source on github/bitbucket or something like that?
I’ve started to adapt ulisp for ARM (Adafruit Feather) but it feels a bit silly to do this without any chance of upstreaming the changes. (I plan to keep a single source that works for both archs)


#13

I’ve set up a repository here:

I look forward to your feedback!


#14

Hi there to all!

I think that MSP430 could be a good choice, using the Processing environment called Energia [http://energia.nu/], that is almost identical to Arduino IDE.
Probably it would be possible to recompile the whole thing on it with the necessary adjustments (I haven’t the deep knowledge that is mandatory about MSP430 chips to do this).
So, just a suggestion…


#15

Good suggestion - I’ll look into it.


#16

I’m looking forward to know something about it!
In the meantime, I’m currently using ulisp with my students on four old Arduino Diecimila (updated with 328) and two MEGA 2560. Everything is OK!
But my Lisp is fairly rusty, I tried to use (setq a 5) to produce a local variable, but it doesn’t work…


#17

Do you mean a global variable? Use defvar - see the language reference for more information.


#18

No, I mean a local variable: I yet used defvar to create a global variable, and everything is OK,but I liked to define a local one, and probably I don’t remember basic Lisp syntax correctly: sorry…I remebered (for that use) setq (that seems to work in CLISP 2.49).


#19

You can use let or let* to create and initialise local variables, then setq to change them.


#20

At the TI_Website I saw another interesting MSP430 Launchkit: MSP430FR5994 LaunchPad Development Kit
It has 256kB FRAM, 8kB RAM and a SD card slot. With this board really large project could be done; the images could be saved at the sd card freeing space for heap and stack (there may be 192k of free space for lisp programs giving ~40.000 cons cells).
It should be possible to write a simple file editor (maybe written in lisp?) and lisp-source-files could be saved on sd.
I think this would be a very good lisp-platform and with a keyboard and a graphic display it would be a great lisp-computer.
What do you think?