Hi, I'm looking for a small scripting engine implementation for my embedded project running on STM32F103T6 MCU @ 72MHz and FreeRTOS 6.0.4 and ST library 3.2.0. Right now, I'm using a derivate of basic language with code: c=0 for d=1 to 10000 set_onboard_led c if c=0 then c=1 else c=0 next d end and get performance roughly 1 millisecond per 1 loop. The project is level 2 optimized in GCC (-O2). The script is running as an operating system task. I'm looking for an alternative scripting solution that can do roughly 20 microseconds per 1 loop. Thanks in advance!
Embedded scripting engine
Started by ●April 23, 2010
Reply by ●April 23, 20102010-04-23
On 23/04/2010 10:10, Raul wrote:> Hi, >=20 > I'm looking for a small scripting engine implementation for my > embedded project running on STM32F103T6 MCU @ 72MHz and FreeRTOS 6.0.4 > and ST library 3.2.0. >=20 > Right now, I'm using a derivate of basic language with code: > c=3D0 > for d=3D1 to 10000 > set_onboard_led c > if c=3D0 then c=3D1 else c=3D0 > next d > end >=20 > and get performance roughly 1 millisecond per 1 loop. The project is > level 2 optimized in GCC (-O2). > The script is running as an operating system task. I'm looking for an > alternative scripting solution that can do roughly 20 microseconds per > 1 loop. >=20 > Thanks in advance!You might want to take a look at: http://www.compuphase.com/pawn/pawn.htm I don't know anything about it so cannot recommend it as such, but I do know that people use it with FreeRTOS. --=20 Regards, Richard. + http://www.FreeRTOS.org Designed for Microcontrollers. More than 7000 downloads per month. + http://www.SafeRTOS.com Certified by T=DCV as meeting the requirements for safety related systems= =2E
Reply by ●April 23, 20102010-04-23
On 23/04/2010 11:10, Raul wrote:> Hi, > > I'm looking for a small scripting engine implementation for my > embedded project running on STM32F103T6 MCU @ 72MHz and FreeRTOS 6.0.4 > and ST library 3.2.0. > > Right now, I'm using a derivate of basic language with code: > c=0 > for d=1 to 10000 > set_onboard_led c > if c=0 then c=1 else c=0 > next d > end > > and get performance roughly 1 millisecond per 1 loop. The project is > level 2 optimized in GCC (-O2). > The script is running as an operating system task. I'm looking for an > alternative scripting solution that can do roughly 20 microseconds per > 1 loop. > > Thanks in advance!Have you looked at Lua? <http://www.lua.org/> It's quite a powerful and flexible embeddedable scripting language. You'll want to configure it to use integer numbers (by default it uses floating point).
Reply by ●April 23, 20102010-04-23
On Apr 23, 2:48=A0pm, David Brown <da...@westcontrol.removethisbit.com> wrote:> On 23/04/2010 11:10, Raul wrote: > > > > > Hi, > > > I'm looking for a small scripting engine implementation for my > > embedded project running on STM32F103T6 MCU @ 72MHz and FreeRTOS 6.0.4 > > and ST library 3.2.0. > > > Right now, I'm using a derivate of basic language with code: > > c=3D0 > > for d=3D1 to 10000 > > =A0 =A0set_onboard_led c > > =A0 =A0if c=3D0 then c=3D1 else c=3D0 > > next d > > end > > > and get performance roughly 1 millisecond per 1 loop. The project is > > level 2 optimized in GCC (-O2). > > The script is running as an operating system task. I'm looking for an > > alternative scripting solution that can do roughly 20 microseconds per > > 1 loop. > > > Thanks in advance! > > Have you looked at Lua? =A0<http://www.lua.org/> =A0It's quite a powerful > and flexible embeddedable scripting language. =A0You'll want to configure > it to use integer numbers (by default it uses floating point).Yes, LUA is definitely one of the good choices. But right now I have not seen any good benchamarks on Internet. I'd not consider porting the language just to see that it is too slow :) Pawn looks also interesting - has anyone ported it to STM32 or cortex- m3 platform?
Reply by ●April 23, 20102010-04-23
On 23/04/2010 14:39, Raul wrote:> On Apr 23, 2:48 pm, David Brown<da...@westcontrol.removethisbit.com> > wrote: >> On 23/04/2010 11:10, Raul wrote: >> >> >> >>> Hi, >> >>> I'm looking for a small scripting engine implementation for my >>> embedded project running on STM32F103T6 MCU @ 72MHz and FreeRTOS 6.0.4 >>> and ST library 3.2.0. >> >>> Right now, I'm using a derivate of basic language with code: >>> c=0 >>> for d=1 to 10000 >>> set_onboard_led c >>> if c=0 then c=1 else c=0 >>> next d >>> end >> >>> and get performance roughly 1 millisecond per 1 loop. The project is >>> level 2 optimized in GCC (-O2). >>> The script is running as an operating system task. I'm looking for an >>> alternative scripting solution that can do roughly 20 microseconds per >>> 1 loop. >> >>> Thanks in advance! >> >> Have you looked at Lua?<http://www.lua.org/> It's quite a powerful >> and flexible embeddedable scripting language. You'll want to configure >> it to use integer numbers (by default it uses floating point). > > Yes, LUA is definitely one of the good choices. But right now I have > not seen any good benchamarks on Internet. I'd not consider porting > the language just to see that it is too slow :) > Pawn looks also interesting - has anyone ported it to STM32 or cortex- > m3 platform?There's no porting to do - it's a C library, and can be compiled with just about any compiler. I don't know about its performance (though it will be slower if you don't configure for integers), but there should be no problem getting it to build.
Reply by ●April 23, 20102010-04-23
On Fri, 23 Apr 2010, Raul wrote:> Date: Fri, 23 Apr 2010 02:10:02 -0700 (PDT) > From: Raul <raul.bachmann@gmail.com> > Newsgroups: comp.arch.embedded > Subject: Embedded scripting engine > > Hi, > > I'm looking for a small scripting engine implementation for my > embedded project running on STM32F103T6 MCU @ 72MHz and FreeRTOS 6.0.4 > and ST library 3.2.0. > > Right now, I'm using a derivate of basic language with code: > c=0 > for d=1 to 10000 > set_onboard_led c > if c=0 then c=1 else c=0 > next d > end > > and get performance roughly 1 millisecond per 1 loop. The project is > level 2 optimized in GCC (-O2). > The script is running as an operating system task. I'm looking for an > alternative scripting solution that can do roughly 20 microseconds per > 1 loop. > > Thanks in advance! >I should think ficl would fill the bill ... http://ficl.sourceforge.net/ This C based forth interpreter is used to boot FreeBSD, and was designed from the outset to be embedded. HTH, Rob Sciuk