Friendly projects - Pycorn, etc.

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Friendly projects - Pycorn, etc.

Post by pfalcon » Fri May 09, 2014 7:38 pm

Here's a project which tries to use CPython to do baremetal hardware programming, and write a complete OS in Python: https://github.com/tornewuff/pycorn . Ideally, I'd like to see MicroPython being suitable for that either, and actually used as such ;-). So, there may be something to learn from Pycorn (I'd pay particular attention to API - it's better to start with something and accept or dismiss rather than take first approach which came to mind).
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/

nande
Posts: 13
Joined: Fri Oct 10, 2014 6:11 pm
Location: argentina
Contact:

Re: Friendly project - Pycorn

Post by nande » Mon Nov 03, 2014 9:40 pm

Really interesnting, i always wanted to make an OS in python.
I think uPy implementations is actually better suitable for that task as it can handle interrupts and custom asm.
~namida de ashita ga mienai~

User avatar
bmarkus
Posts: 111
Joined: Tue Oct 21, 2014 5:58 am

Re: Friendly project - Pycorn

Post by bmarkus » Tue Nov 04, 2014 9:59 am

Unfortunately the latest commit is two years old, the latest discussion in issue tracker is one year. Looks a dead project, or at least suspended :(
Tiny Core Linux (piCore) developer
HAM radio call: HA5DI (Béla)

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Friendly project - Pycorn

Post by Damien » Tue Nov 04, 2014 10:39 am

uPy as an OS on a PC, now that would be cool! I started to write an OS from scratch a long time ago and it could boot giving you keyboard and screen. I can try and dig it up and see if I can get uPy booting in a virtualbox.

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

Re: Friendly project - Pycorn

Post by pfalcon » Tue Nov 04, 2014 7:13 pm

I tries to post "Hello" message to Pycorn some time ago, but it was stuck in moderation queue, so yep, project seems to be pretty dead.

Damien, that's cool, but hope it won't take too much of your cycles ;-).
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/

nande
Posts: 13
Joined: Fri Oct 10, 2014 6:11 pm
Location: argentina
Contact:

Re: Friendly project - Pycorn

Post by nande » Wed Nov 05, 2014 5:28 am

I think one of the most interesting contribution of micropython is the language itself. The board is awesome (i really love it), but the language is incredible. IMHO it has a lot of potential, to fill a gap in CPython implementation i've seen for some time.
I would love to try to make an os with it.
~namida de ashita ga mienai~

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Friendly project - Pycorn

Post by Damien » Wed Nov 05, 2014 9:18 am

nande wrote:I think one of the most interesting contribution of micropython is the language itself. The board is awesome (i really love it), but the language is incredible.
Thank you for the compliment! I am glad you like the hardware.

I dug up my 9 year-old micro-OS and tried to get it booting. It used to run under bochs, but now, 9 years later, it seems not to work... It has a tiny bootstrap piece of code in the first sector of the drive, which loads a loader, then the loader (which support ext2fs) looks for the kernel on the filesystem, then loads that and jumps to it. I managed to fix the bootstrap code, since it was doing something wrong setting the cache in cr0 (it's for x86). With that fixed the loader runs, but gets stuck trying to access the ATA controller. Seems that the ATA controller has changed since I last ran bochs...

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

Re: Friendly project - Pycorn

Post by pfalcon » Sat Nov 08, 2014 12:26 pm

Last week appears to have been fruitful for "new old" OSes ;-) - there's Fuxiz project popped up too, from a Linux refugee: https://plus.google.com/+AlanCoxLinux/posts/a2jAP7Pz1gj , https://github.com/EtchedPixels/FUZIX
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/

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Friendly project - Pycorn

Post by pythoncoder » Mon Nov 10, 2014 12:54 pm

The Initially supported processor architecture is the Zilog Z80
Interesting. The first Unix microcomputer I encountered was a costly box called the Onyx which used the Zilog Z8000. This was an early 16 bit chip, competing with the 8086 and the 68000. At the time Z80 machines mostly ran CP/M and the received wisdom of the day was that Unix needed a 16 bit or better processor. I certainly don't remember any 8 bit Unix boxes. It's strange to discover it's possible so long after the technology became obsolete ;)
Peter Hinch
Index to my micropython libraries.

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: Friendly project - Pycorn

Post by Damien » Wed Apr 29, 2015 8:11 am

Apparently there was a talk at PyCon 2015 about running CPython on bare metal, specifically in the GRUB bootloader: http://lwn.net/SubscriberLink/641244/5d1d6d20aeb0a647/. (BTW, nice that uPy was mentioned more than once in the associated hackernews discussion: https://news.ycombinator.com/item?id=9453677.)

Post Reply