ndreynolds / flathead

A toy JavaScript interpreter written in C
MIT License
92 stars 17 forks source link

embedded OS porting #15

Open geniusgogo opened 10 years ago

geniusgogo commented 10 years ago

Hello,I want porting this componet to RTOS,but this source code hava too much stdio/FILE and so on func, what can I do?

ndreynolds commented 10 years ago

Hey there. That sounds awesome :smile:. I'm unfortunately not terribly familiar with RTOSs, but maybe the stdio/file usage could be removed with DEFINEs or by refactoring those calls to include some additional logic based on your needs. Did you have something in particular in mind?

BernardXiong commented 10 years ago

Thank ndreynolds, geniusgogo just finished a alpha porting for flathead in RT-Thread RTOS (https://github.com/RT-Thread). However, we think RT-Thread RTOS has a powerful shell, therefore, we want let flathead can interpret some JavaScript file or as a system service to interpret JavaScript texture or files. In our board (RealBoard 4088), there are some file system, such as FAT, YAFFS, C run-time environment, such as newlib and 32MB SDRAM. The stdio/file APIs is not the problem, however, we hope flathead has more portable in the system level, especially for micro-controller.

Possibly, we will send out our pull request later, could you please merge them into flathead? Thank you very much for your flathead.

@geniusgogo

ndreynolds commented 10 years ago

Oh ok, I see. Very cool. I'm definitely interested in making flathead more portable for this sort of usage. So absolutely, I'd love see a pull request with the changes you've made. Thanks!

lpsantil commented 8 years ago

@BernardXiong @ndreynolds Any update on this? I'm interested in seeing geniusgogo's work.

I just finished porting flathead to MS-DOS using Andrew Wu's DJGPP cross compilers (https://github.com/andrewwutw/build-djgpp/releases/), RayeR's NVCLOCK (http://rayer.g6.cz/programm/programe.htm#NVCLOCK , for getopt :/) and some other changes. Not license compatible so I need to clean it up/rewrite getopt.