Is MicroPython considered stable to real world deployment (STM32)

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
BrendanSimon
Posts: 32
Joined: Wed Sep 07, 2016 10:46 am

Is MicroPython considered stable to real world deployment (STM32)

Postby BrendanSimon » Sun Mar 05, 2017 10:50 am

Is MicroPython ready for real world deployment (STM32) ?

If I wanted to deploy a large number of devices and have them run reliably, would MicroPython be a risky choice?

For example, if my work was developing a new embedded product (e.g. an IOT device or scientific lab device or industrial controller) for other clients, would I be foolish/naive/bonkers to suggest using MicroPython as the platform as the OS/development environment (rather than a C/C++ based OS/RTOS or bare metal) ??

There are many potential reasons to not choose MicroPython (ranging performance, resources, lack of commercial support or industry usage, etc), but I'm more interested in the robustness and stability of MicroPython. I realise this would be port dependent but let's assume STM32F4 platform.

I see lots of great development going on in the GIT repo, and MicroPython is evolving fast, so I'm wondering if it's just too early to propose/champion MicorPython for work projects.

Thanks,
Brendan.

chuckbook
Posts: 17
Joined: Fri Oct 30, 2015 11:55 pm

Re: Is MicroPython considered stable to real world deployment (STM32)

Postby chuckbook » Mon Mar 06, 2017 10:46 am

As usual, the answer is, it depends!
We are using Micropython in several projects (medical & industrial certified measurement equipment) for ~2 years.
It was a bold decision, but it already paid off.
Our experiences are very good. In fact we try to migrate other products to MPY based solutions if sufficient resources (MCU power and storage size) exist. All implementations are a combination of a MPY framework and few (usually just one) specific (usually (very) small) C or even assembler modules.
cons:
increased hardware resources required
lack of developer skills regarding OO languages
pros:
productivity
traceability
testability
portability
licensing
support

We would do it again!

BrendanSimon
Posts: 32
Joined: Wed Sep 07, 2016 10:46 am

Re: Is MicroPython considered stable to real world deployment (STM32)

Postby BrendanSimon » Mon Mar 06, 2017 11:16 am

That's fantastic news !! That increases my comfort level to know there are real products, working in the field, in industries that require robust stability.

Interesting list of pros. Apart from potentially "productivity", don't the other benefits also exist for C/C++ (with or without an widely used OS/RTOS) ? e.g. clang or gcc, FreeRTOS, etc?

I'm keen to port an existing product (primarily C with a little C++) to a STM32F4 platform using MicroPython. Another alternative is a small Linux platform using CPython, which is also viable. The main advantage I see in MicroPython over Linux/CPython is lower hardware costs and lower power requirements (though those arguments also apply to a C/C++ dev environment).

chuckbook
Posts: 17
Joined: Fri Oct 30, 2015 11:55 pm

Re: Is MicroPython considered stable to real world deployment (STM32)

Postby chuckbook » Mon Mar 06, 2017 12:51 pm

I have to admit that it is just a list of buzz words but it is really meant that MPY outperforms all the tools we know (even the ones we can't afford) for our application portfolio and a broad range of different MCU types. We came to MPY while searching for a lightweight python implementation for a linux based system to get rid of bloated shell scripts. For this first project it ended up with getting rid of linux replacing it with MPY. Two years later we cover ultra low power systems (consuming 500nA with active REPL!) to real-time image processing, all with just one development and runtime environment.
Again, everything stated here just reflects our scenario.

stijn
Posts: 118
Joined: Thu Apr 24, 2014 9:13 am

Re: Is MicroPython considered stable to real world deployment (STM32)

Postby stijn » Mon Mar 06, 2017 4:30 pm

I also consider uPy 'real world ready'. We use it in a couple of applications, one pretty large (say 5k loc of custom uPy modules most written in C++), not on an STM but on pc. I'd say problems with the uPy side of things are extremely rare and the API is also very stable, and even if there is a bug or feature missing the fix takes a couple of days at most (either fix by main devs or time to get PR merged). Frankly I don't think there are many other scripting language implementations out there that work as good for the pros mentioned by chuckbook already. Lua is ok but it's not Python. CPython works but good luck getting it to compile on non-pc or embedded pc hardware. Or trying to understand the code. C and C++ are tried and tested and pretty awesome if yo know how to use them properly, but are not scripting languages at all. Hence I'd say your choices are a bit limited in any case so you might just as well take a small leap and try uPy. It would probably only take a couple of days to figre out if it works for you or not so you can always try something else afterwards.

BrendanSimon
Posts: 32
Joined: Wed Sep 07, 2016 10:46 am

Re: Is MicroPython considered stable to real world deployment (STM32)

Postby BrendanSimon » Wed Mar 08, 2017 10:29 am

Not really a big problem getting CPython for Linux based embedded systems. Can use a full Linux distro like Debian, or Armbian, or some of the more embedded distros based on buildroot or Yocto such as openwrt, etc.

I'm really encouraged with these awesome testimonials re MicroPython. Now I'm super motivated to to port a C embedded app to Python to get a good feel for the differences.

Thanks heaps !!


Return to “General Discussion and Questions”

Who is online

Users browsing this forum: microPyforMy and 4 guests