I too have a need for running interpreted code inside of microcontrollers. Several of my products need to be taylored for each client. Usually I create a special version of the firmware for each one, but that adds a lot of work. My products include a lot of processing, algorithms and protocols and after its primary job is done (for instance capturing and recognizing a fingerprint) each client wants to do a different thing with the results. One approach would be to supply an API and allow each client to add its own code, but that would be a risk for my intellectual property because one could write code to steal my original code. Some time ago I found Mr. Loren Blaney and the language XPL0. It is interesting and there is a compiler that produces a pseudo-machine-code called I2L. The I2L code can be interpreted/executed by an interpreter written in 80x86 assembly. I ported this interpreter to C (written with portability in mind) and succeded in running I2L code under Windows and Linux and also in PIC18, PIC24, dsPIC, PIC32 and ARM MCUs. I tried to convert the XPL0 to I2L compiler to a C to I2L compiler but with limited success. Indeed, after some time I decided that I would not force my clients to learn a new (old) language so I started looking for a new solution. Java seemed too heavy and bloated for such small MCUs, then I found someone's idea of writing an ARM-Thumb (no Thumb2 or ARM instructions, just plain old Thumb) interpreter. I then started writing my Thumb interpreter (again in C with portability as primary target). I'm almost done, with just some bugs in status flags generation. I am now able to use GCC to produce Thumb-only applications that can be loaded in my emulator and run. I think that my clients will be able to write code in several of the languages supported by GCC. Isaac Em 30/03/2013 19:19, Byron Jeff escreveu: > On Sat, Mar 30, 2013 at 04:52:13PM +0000, Sergey Dryga wrote: >> Byron Jeff mail.clayton.edu> writes: >> >>> On Sat, Mar 30, 2013 at 03:26:33AM +0000, Sergey Dryga wrote: >>>> Byron Jeff mail.clayton.edu> writes: >>>> >>>>>> Stating the obvious: MPLAB X?=20 >>>>> A step in the right direction. It showed up about 15 years too late f= or my >>>>> needs. >>>> That I agree. Luckily, the days of configuring VMWare to run Windows = and >>>> communicate with PIC are over. I can do everything under Linux now. = =20 >>> I haven't used MPLAB since the days of DOS emulation nearly 20 years ag= o. >>> I've been using the gputils suite forever. I used gpsim for simulation >>> until recently because it has not yet caught up to the Enhanced 16F fam= ily. >>> For programming I used to build my own parallel port programmers. With = the >>> death of the parallel port, recently I've been using a PicKit 2 with pk= 2cmd >>> software. Fortunately the active Microchip forum community has taken up= the >>> cause of keeping PK2DeviceFile.dat updates even though Microchip has pu= t >>> the PK2 at end of life. Also I've written a solid bootloader for the >>> enhanced family that works really well with USB/serial converters on >>> Windows, Linux, and Mac. My next project is to see if this can be exten= ded >>> to a bluetooth/serial dongle so that development from a tablet/smartpho= ne >>> is possible. >>> >>> I've given MPLAB-X a spin or two. It works to a degree. Simulation for = the >>> 16F enhanced isn't real great. The command line tools for assembling an= d >>> linking are about as effective as the gputils suite. I guess it isn't a= big >>> deal to me because I'm not really hung up on IDEs. >>> >>> BAJ >>> >> I just started to use MPLAB once they released MPLAB X. Only because it= works >> under Linux and because of the availability of C compilers. I did learn >> assembler in the days of 16F84, but much prefer C. > High level languages definitely facilitate getting things done. Language > building happens to be my academic hobby. So over the years instead of ju= st > pulling a working package off the shelf, I've explored different ways of > developing in the HLL space for Pics. Currently, as I outlined in anothe= r > recent post, I'm currently working in a FORTH like threaded interpreter > setup that one of my students developed last year. > >> I started with home-brew >> parallel port programmer as well. Until MPLAB X I was using CCS with the= ir >> ICD-U40 programmer. It worked great, but cannot justify $500 every upgr= ade, >> even though their C compilers were great. > Did you ever consider SDCC during that timeframe? Or JAL, which has > developed into a really slick development environment? > >> I tried gputils some years ago (>10) >> but probably did not spend enough time to really make it work. If gputi= ls work >> for you, I will give it another look. Thanks Jeff! > I don't think you really need to take another look. As I said, MPLAB-X > certainly does the job, so if it works for you, you should stick with it. > Also gputils still doesn't carry a C compiler. Of course SDCC, C18 and X8 > (command line), are now all available on multiple platforms. > >> Sergey Dryga >> http://beaglerobotics.com >> >> >> >> >> --=20 >> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .