MicroPython on a Computer

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
TimBlo
Posts: 3
Joined: Wed Aug 06, 2014 10:02 am

MicroPython on a Computer

Post by TimBlo » Wed Aug 06, 2014 10:30 am

Hi

I was just like :shock: when i found MicroPython on google.
This project really sounds great. :o

Now, I searched on google but i only found stuff. :?
I'm actually wondering how easy it will be, putting MicroPython on a PC - or rahter in a VMWare since i've got a workstation. :mrgreen:

I could imagine that the MicroPython-runtime would need MicroPython-pc-drivers to do overpowered stuff like 3D animations or to use special hardware features.
Even though i except there is a logic way to put MicroPython into a pc (to get bootloaded on the processor), just allowing some simple actions.

I look forward to write some PythonFileSystems some day :D

And extra question: under what licences can i derive from MicroPython to improve pc-compatibility?

Edit: I'm already working on that "PythonOS" which would bring an app store and thread-, runtime-, library- and even user-management to the computer. It's all implied the way that python's nature does: dynamic.
This "OS" is supposed to get released under GPLv3

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: MicroPython on a Computer

Post by dhylands » Wed Aug 06, 2014 4:11 pm

You can use the unix port of micropython to run on a PC under linux.

If you're talking about running micropython on a bare-metal PC, then there is lot more work to get things up and running.

Micropython is also single-threaded (from the OS point of view).

TimBlo
Posts: 3
Joined: Wed Aug 06, 2014 10:02 am

Re: MicroPython on a Computer

Post by TimBlo » Wed Aug 06, 2014 4:44 pm

Yes, you're very right. There is a lot work to get things up.
And getting them running takes again a lot work, i know that from my own projects - but somehow i'd never get bored about it. (Working on my project since 3 years, most of it in python)

The effective MicroPython for that appication should allow acces all pyhsic CPU threads - what is probably why i asked about derriving from MircoPython.
It could be very complicated to achieve, but i really want to find out (if someone else hasn't done yet).
This capability would mean a lot in the situation of running micropython on a bare-metal PC.

I'm gonna push the speed of my project's runtimes to Over-Overpowered someday this way :D
An extended process management is already available ;)

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: MicroPython on a Computer

Post by dhylands » Wed Aug 06, 2014 8:18 pm

If you're looking for native multithreading, then you're probably better off using CPython, since it supports that already.

MicroPython supports non-preemptive multi-threading via yield and generators, but doesn't support preemptive multi-threading.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: MicroPython on a Computer

Post by pfalcon » Mon Aug 11, 2014 6:51 pm

To say it differently, MicroPython supports cooperative multitasking using native Python features. It doesn't support pre-emptive multitasking, and many people nowadays consider pre-emptive thread multitasking harmful (e.g. https://glyph.twistedmatrix.com/2014/02/unyielding.html). But adding pre-emptive threads support to uPy would be much easier than implementing entire OS with userland on top of it, so lack of threads should be very minor bump on the road.

The project itself is very cool, that's how I'd like to see uPy used too. My personal concern is hearing "in works for 3 years" and "supposed to be release under GPL3". Release early, release often. And well, if you really want to achieve something with such project, try to cooperate with, or reuse work done by other similar projects: http://forum.micropython.org/viewtopic.php?f=5&t=102
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

TimBlo
Posts: 3
Joined: Wed Aug 06, 2014 10:02 am

Re: MicroPython on a Computer

Post by TimBlo » Sun Sep 21, 2014 12:15 pm

Yes, you're right.

I see the biggest problem in my apprenticeship what actually kills all my time for some random stuff like "making a LED blink".
Either i go crazy due to this, or i won't survive it at all. But to remain optimistic, i except to complete that apprenticeship in 2 years.

Actually i'm working on the systems basics (as you say "implementing entire OS with userland on top of it") whenever i get time to. This includes mainly Libraries, so there is a wide range of abilities right now.
I intend to produce any library that seems usefull to me in order to complete easily when i finally start with my own ideas for end-user-applications.

At least if all the system's own functionality is present (including system development and debugging as well as updating), i'd start trying to write my own compiler.
I already know and wrote OPCODE and i'm very interested in such logical quests. Maybe it takes lots of time, maybe i reuse lots of work, but i'm really sure having to find out.
At this time i think i should get in touch with the problems of using threads.

So, in 2 years i except to have fun with python :D

Post Reply