Page 1 of 1

ChibiOS STM32F4 usb shell + Javascript interpreter

Posted: Sun Jul 14, 2013 11:44 pm
by mribelotta
Hi Guys.
I start this project (in very early stage) to build an enviroment for embedded scripting centered (but not limited) into javascript TinyJS interpreter trying to emulate the features found in Esrurino and eLua system but using a real RTOS under the interpreter.
https://github.com/martinribelotta/ChibiOS-JS
Any comments/ideas?

Re: ChibiOS STM32F4 usb shell + Javascript interpreter

Posted: Mon Jul 15, 2013 6:56 am
by Giovanni
Hi,

Very interesting project, would the RTOS primitives be available from JS? I can imagine quite a few applications where such an hybrid system could be useful.

One common request is to have parts of the application "loadable" from external media, I imagine this could be solved by loading a script, is this scenario something you considered?

Giovanni

Re: ChibiOS STM32F4 usb shell + Javascript interpreter

Posted: Mon Jul 15, 2013 1:22 pm
by mribelotta
Yes, the idea is load scripts from VFS (rom/fat/ram/nfs) but the project is in early stages (my time si very limited in to week)

Respect of the RTOS API exported to JS I am undecided between a direct export API one to one or opt for a POSIX abstraction layer (or similar)

Important note: At this moment, the most important problem is the JS memory manager because this use "new/delete" from the libstdc++ (wrapper for malloc/free) instead of ChibiOS pool allocator.

Re: ChibiOS STM32F4 usb shell + Javascript interpreter

Posted: Sat Jul 27, 2013 4:45 pm
by mabl
I wonder if it is not a better idea to use a virtual machine and compile the program to P-Code first, like PAWN. Interestingly sombody had the idea already - even with ChibiOS:
http://airlab.elet.polimi.it/index.php/ ... _platforms

I wonder what came out of it?

Re: ChibiOS STM32F4 usb shell + Javascript interpreter

Posted: Sat Jul 27, 2013 4:53 pm
by mabl
Digging further, there are other people doing stuff like this with Chibios!
https://code.google.com/p/chibios-embrio/

I did not notice these before!

Re: ChibiOS STM32F4 usb shell + Javascript interpreter

Posted: Wed Jul 31, 2013 11:51 pm
by mribelotta
Other interesting project on this line:

https://github.com/mimaki/stm32-mruby

The first point of my project is provide a stand alone system (through support of VGA/PS2) usable on out-of-door enviroments. In this view, the interpreter-only support is not much atractive than elf-loader system.

Re: ChibiOS STM32F4 usb shell + Javascript interpreter

Posted: Fri Feb 27, 2015 3:40 pm
by chradev
Hi Everybody,

I am trying to build (in Eclipse on Windows 7 64bit) and run (on STM32F4Discovery and my own board with STM32F405) your project ChibiOS-JS. I am using gcc-arm-none-eabi-4_8-140405 (part of ChibiOS 2.6.5) to compile and link application but without success. I have tried many thing incl. makefile project based on ChibiOS demo STM32F4xx-USB_CDC and adding all staff from ChibiOS-JS without success as well.

After lot of probes the successfully built application hangs not returning from ngshell_init.

Could somebody pleased to help me in my attempts to build and run ChibiOS-JS?
I prefer to use free tool chain and makefile project whit the latest and unmodified ChibiOS version.

Sorry for posting on this very old thread but I cannot succeed to e-mail Martin.

Best regards
Chris