t0mpr1c3 91 Posted December 21, 2013 Share Posted December 21, 2013 Here you go Mike: Dmitry Grinberg's uJava I haven't tried it myself but it claims to be a full implementation. Quote Link to post Share on other sites
rockets4kids 204 Posted December 22, 2013 Share Posted December 22, 2013 When you need 60 - 80 KB just for the VM, I would say you have left the world of small microcontrollers. Quote Link to post Share on other sites
t0mpr1c3 91 Posted December 22, 2013 Share Posted December 22, 2013 Touche. But small microcontrollers are getting bigger all the time Quote Link to post Share on other sites
rockets4kids 204 Posted December 22, 2013 Share Posted December 22, 2013 Well, I would agree that cut-throat competition among the various ARM vendors has resulted in some truly amazing price points.... We are practically at the point where 60 - 80 kB of overheard is no big deal even if you only want to blink an LED. Remind me again about why there is any point in using the MSP430 in this day and age? Quote Link to post Share on other sites
abecedarian 330 Posted December 22, 2013 Share Posted December 22, 2013 Remind me again about why there is any point in using the MSP430 in this day and age?Relatively simple, established and with known efficiency? Doesn't try to be everything to everyone... in one package? It sounds more "sophisticated" than AVR, ARM, PIC.... Quote Link to post Share on other sites
mpymike 18 Posted December 23, 2013 Share Posted December 23, 2013 Thanks t0mpr1c3, interesting reading, I shall keep an eye on how uJava progresses. First thoughts, the memory footprint does look smaller than MicroPython, which could be due to many reasons. Well, I would agree that cut-throat competition among the various ARM vendors has resulted in some truly amazing price points.... We are practically at the point where 60 - 80 kB of overheard is no big deal even if you only want to blink an LED. Remind me again about why there is any point in using the MSP430 in this day and age? My original motivation for using the 430 Launchpads: 1) The price - when it was $4.30 2) Simple architecture that is easy to understand and explain. 3) DIL component that can be plugged into a breadboard, making it more useful for building electronic projects. Now however the ARM products are ubiquitous... Anyone know of a standalone ARM uC in a DIL package? Quote Link to post Share on other sites
t0mpr1c3 91 Posted December 23, 2013 Share Posted December 23, 2013 There's the LPC111X. It's not tremendously powerful though. Quote Link to post Share on other sites
Druzyek 36 Posted December 23, 2013 Share Posted December 23, 2013 Running Python on a microcontroller is an interesting idea but I am scratching my head trying to think of cases where I would choose Python over C. Can you give me some example projects where you would rather use Python? There's the LPC111X. It's not tremendously powerful though. Compared to DIL MSP430s, it is much more powerful. I did a short comparison (although not a full benchmark) here: http://joldosh.blogspot.com/2013/10/microcontroller-showdown-part-2.html Quote Link to post Share on other sites
jpnorair 340 Posted December 23, 2013 Share Posted December 23, 2013 If you haven't seen this kickstarter: http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers It just succeeded and the founder is going to release the source code eventually. He currently has it working on ARM Cortex Ms, so hopefully not a hard port to Tiva LaunchPad, but it would certainly be interesting to get a python parser running on 430. Running it on a Stellaris M4 would be an option. Running it on MSP430 might be possible if resources allow, but it wouldn't be logical when the cost of a CM3/4 CPU is already less than the cost of an MSP430 solution with enough resources to hold MicroPython. As has been noted, MicroPython buries a 31 bit integer inside an object pointer in order to save RAM as well as cycles to malloc/free the heap. While this can certainly work on MSP430, it's much more natural on a 32 bit ALU. Furthermore, as I can imagine MicroPython is targeted towards DSP rapid prototyping (why else would I consider using Python, there are plenty of other options), the weak ALU on the 430 doesn't suit it well. CM3 and CM4 have strong ALUs, and the M4 even has an FPU, so they seem natural for MicroPython. Anyway, eLua is an embedded Lua framework that is primarily targeted at CM3/CM4 as well, but it is slim enough that an MSP430 port may be feasible -- particularly an integer-only port, which could likely fit on any of the 5-series devices packing 16 / 256 (or more). Quote Link to post Share on other sites
t0mpr1c3 91 Posted December 23, 2013 Share Posted December 23, 2013 I noticed that someone has made a start on an eLua port for Stellaris. http://forum.stellarisiti.com/topic/552-elua-for-stellaris-launchpad/ Quote Link to post Share on other sites
mpymike 18 Posted December 24, 2013 Share Posted December 24, 2013 For me the motivation for using Python is that it is an easier language to introduce to kids. A full Python implementation is a higher level more sophisticated language, has higher level constructs, more abstraction is possible, more compact code, easier to understand, easier to maintain, faster development time. (ie the usual arguments between language benefits) I would not claim that the Python implementation would be any more efficient, in memory or performance. Looked at Lua some time back, I like the language a lot, and probably a better language for a uC than Python but for kids (and me) the aim is using the same language for the uC and regular software. Quote Link to post Share on other sites
jpnorair 340 Posted December 24, 2013 Share Posted December 24, 2013 Looked at Lua some time back, I like the language a lot, and probably a better language for a uC than Python but for kids (and me) the aim is using the same language for the uC and regular software. The main reason why I like Lua is that it is popular in the game developing scene, and I find that people with game dev history tend to convert easily to embedded. Quote Link to post Share on other sites
Mark Easley TI 42 Posted January 2, 2014 Author Share Posted January 2, 2014 Source code available now for the public if anyone is curious: https://github.com/micropython/micropython/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.