[gambit-list] Porting to "small" machines -- target requirements?

Marc Feeley feeley at iro.umontreal.ca
Thu Oct 7 10:56:30 EDT 2010


On 2010-10-07, at 5:33 AM, Marco Benelli wrote:

> ----- Original Message ----
>> From: Marc Feeley <feeley at iro.umontreal.ca>
>> 
>> To my knowledge recent  versions of Gambit have been compiled on the following 
>> embedded  systems:
>> 
>> - Nintendo DS (ARM CPU, 4 MB RAM)
>> - Linksys WRT54GL (MIPS  CPU?, 16 MB RAM)
>> - iPhone/iTouch (ARM CPU, 128 MB RAM)
>> - Xilinx Virtex II  FPGA (PowerPC CPU, a few MB of RAM)
>> 
>> Search the Gambit mailing list  archive for details.
>> 
>> Gambit was designed to be extremely portable.   It has very few library 
>> dependencies (libc is enough to have a working  system).
> 
> I think all these system have a MMU.  Can Gambit run on a no-MMU system?

I doubt that the Nintendo DS has an MMU.  Gambit has no reliance on an MMU.  In fact, for portability, all dynamic memory allocation (of heap blocks, including the stack) is done with malloc/free.  So as long as your C compiler supports malloc/free you are OK.

> I'd like to propose Gambit for a project based on ucLinux on a Renesas SH7203.
> AFAIK, ucLinux's malloc() uses mmap() instead of brk(), it is a iusse wrt memory 
> management?

iusse?

I checked the specs for the Renesas SH7203 development board and it has a 16MB SDRAM module.  That should be plenty for the heap.  On the other hand, the development board has a 4MB FLASH memory, for the bootloader and OS (ucLinux) and user code (2MB total).  On an intel processor when compiled with gcc, the Gambit interpreter's code occupies 3 to 4 MB.  The C compiler for the  SH7203 may generate more compact, or less compact code, so YMMV.  If the program is still too big, you can probably reduce the size by eliminating some of the runtime functions (file I/O, bignums, etc).  On the other hand, if the target platform has more FLASH memory, say at least 8MB, then you wouldn't have to change anything.  You might also be able to run "on the bare metal", i.e. no OS at all, to access the full 4MB of FLASH.

Marc




More information about the Gambit-list mailing list