473,394 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Suggestions for an Embbeded Scripting Language

Banfa
9,065 Expert Mod 8TB
The project I work on has a bespoke hardware platform which is designed to go into a variety of different situations. However to keep things simple we really want the software for the platform to remain the same in all cases (as good practice suggests). One of our thoughts is that to provide the final customisation required for each application we could embed a scripting language into the platform to allow any additional business logic to be applied to the platform in the form of one or more scripts.

Constraints
  • The platform is an embedded one, normally with no direct interface with a human being.
  • The script engine needs to be written in C or easily portable to C because the platform only has a C compiler.
  • Program memory is relatively abundant, we can easily afford up to 100k of additional code.
  • Data memory is more of a problem, the platform has 2Mbyte of RAM, however the processor only has a 64k data memory map. Currently 32k of that memory space is permanently mapped to RAM, 16k is used for mapping various bits of hardware directly into memory and 16k is used to page the rest of RAM and FLASH into the data space as required.
  • The processor is not terribly powerful so the scripting language needs to be not too intensive.
  • The EEPROM used for storing configuration is only 8k and only about 6k of that is available for storing scripts in.

Desirables and Requirements
  • The script engine should not make excessive use of the heap. The heap consists of the 32k of permanently mapped space minus all the data that is already used in that space for static variables and task stacks. This is currently about 20k but is going down slowly.
  • The script engine should only run when permitted to allow all the scripts data to be placed into a page 16k data segment.
  • The scripts should be compilable to p-code externally to reduce their size for storage on the platform.
  • The script language must be extensible via additional function or additional objects to allow us to create the interface to interact with the hardware platform.


My thoughts so far

It would be nice to have an already well defined language rather than trying to write my own.

Java - while I have seen the Java VM ported very successfully to various embedded platforms it has normally been to platforms that are less constrained resource wise (plenty of RAM, FLASH and processing power) and particularly do not have the heap constraints of this platform. Also we are not talking about writing major applications on this platform and it feels like a bit of a sledge hammer to crack a nut.

Python - this was my first thought, however I am not sure that it's scripts are compilable to p-code and given the use of indentation to denote script structure the scripts could end up quite big and so not fit in available memory. However reading the available documentation there has clearly already been some thought to embedding this into applications.

There are various other scripting languages available, for instance Pawn (http://www.compuphase.com/pawn/pawn.htm) but I do not know too much about them.


So now is the time for you input, what are you thoughts, comments and suggestions (or questions if something about this is unclear) on find/using/embedding a scripting language into an embedded application?
Dec 4 '07 #1
3 2047
JamieHowarth0
533 Expert 512MB
Hi Banfa,

Not a clue - I'm a VB programmer so I only work in high-level... sorry :-$
However, I would love to learn more about embedded stuff but my skill in C is incredibly rusty and probably just about covers "Hello World"!

medicineworker
Dec 10 '07 #2
JosAH
11,448 Expert 8TB
I'd say Forth (google for it). A basic Forth implementation has a footprint of just
a couple of KB and you can extend Forth in Forth itself.

kind regards,

Jos
Dec 10 '07 #3
RedSon
5,000 Expert 4TB
I'd say Forth (google for it). A basic Forth implementation has a footprint of just
a couple of KB and you can extend Forth in Forth itself.

kind regards,

Jos
Check this site out... http://www.embedded.com/story/OEG20021211S0034
Dec 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: The_Incubator | last post by:
As the subject suggests, I am interested in using Python as a scripting language for a game that is primarily implemented in C++, and I am also interested in using generators in those scripts... ...
41
by: Richard James | last post by:
Are we looking at the scripting world through Python colored glasses? Has Python development been sleeping while the world of scripting languages has passed us Pythonista's by? On Saturday...
33
by: Quest Master | last post by:
I am interested in developing an application where the user has an ample amount of power to customize the application to their needs, and I feel this would best be accomplished if a scripting...
9
by: Vijai Kalyan | last post by:
Hello All, I have a few questions which you might seem irrelavant and/or foolish. I am asking anyway so I can find out. 1. Is XSL as powerful as a programming language such as Java in its...
16
by: Ding Lei | last post by:
Dear fellows, I am currently a Java programmer, using it for around 3 years, & felt quite bored with it. IMHO, Java is too strict on lots of things, unlike Perl, There is usually only one or two...
4
by: korund | last post by:
Is there any difference to read & write to windows Registry with VBScript or JavaScript? Both scripting languages have similar syntax. What is preferable use for this? thanks.
4
by: Gene Jones | last post by:
So I'm starting to do some things where I'm going to want to add scripting in the application, and I can't find a scripting language to plug in that I like. So far I've looked at LUA and L-Sharp,...
2
by: JosAH | last post by:
Greetings, Introduction Java is not Javascript and most of the times when questions end up in the wrong forum, they're moved to the other forum as soon as possible. Accidentally this article...
10
by: Rob Kendrick | last post by:
Hi, I'm a C programmer of (I'd like to think) intermediate skill and experience, able to throw most things together quite happily in C. I'd like to get to the point of being able to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.