Jump to content
Mark Easley TI

MicroPython for MSP430?

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.... :)

Share this post


Link to post
Share on other sites

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?

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...