Page 2 of 3

Re: RE: Re: MicroPython on the BBC micro:bit

Posted: Wed Oct 21, 2015 11:34 am
by pfalcon
Damien wrote: In the beginning it was. But then I needed to use the fancy new yotta build system, and this does everything automagically and forces a directory structure upon you.
Up to the level of not allowing to use existing directory structure with symlinks, etc.? That's crazy.

I thought the biggest problem might be that it doesn't allow to plug source file autogeneration. And that brings another question I wanted to ask - we had reports of that before with people using various vendor compilers, lately I see similar issue porting for Android NDK build system, and here's yotta case. So, even if there's gcc underlyingly, vendor build systems apply their own restrictions, and we apparently shouldn't ignore it any longer and do something to account for that.

I'm not sure what exactly and to what extent. First step can be just adding "make gen" to autogenerate all files in one go, leaving with just C code which can be copied somewhere else for building.

Re: MicroPython on the BBC micro:bit

Posted: Fri Oct 30, 2015 8:07 pm
by lucien2k
Very cool, so will it ship with MicroPython by default or will kids get a choice of language/system?

Re: RE: Re: MicroPython on the BBC micro:bit

Posted: Fri Oct 30, 2015 11:24 pm
by Damien
pfalcon wrote: Up to the level of not allowing to use existing directory structure with symlinks, etc.? That's crazy.
It probably could have allowed symlinks. But yotta likes to have the config and output-build files in the root directory, so it wouldn't really work to make a microbit/ subdir. Furthermore, yotta likes to make your code into a package that's automatically entered into their package directory, and if you don't do things the correct way it doesn't work. Oh yeah, and I didn't want thousands of lines of unneeded code (stmhal/hal/*) confusing the microbit repo, which is supposed to be inspected by inquisitive kids.
I thought the biggest problem might be that it doesn't allow to plug source file autogeneration.
It kind of does, since it just uses cmake underneath (it's really just a wrapper that creates cmakefiles). But to generate the qstrs I just provided a simple Makefile and makeqstrdata.py.
And that brings another question I wanted to ask - we had reports of that before with people using various vendor compilers, lately I see similar issue porting for Android NDK build system, and here's yotta case. So, even if there's gcc underlyingly, vendor build systems apply their own restrictions, and we apparently shouldn't ignore it any longer and do something to account for that.

I'm not sure what exactly and to what extent. First step can be just adding "make gen" to autogenerate all files in one go, leaving with just C code which can be copied somewhere else for building.
An amalgamation? :)

If you do any development of Python modules then you need to generate the qstrs, so you need to pull in makeqstrdata.py and find some way to run it. For mpversion.h, I just generated it using "make -C unix" and then copied mpversion.h.

At the moment it's really not that bad, but I agree the header-file generation process could be further simplified.

Re: MicroPython on the BBC micro:bit

Posted: Fri Oct 30, 2015 11:27 pm
by Damien
lucien2k wrote:Very cool, so will it ship with MicroPython by default or will kids get a choice of language/system?
There'll be a choice of a few languages, including Microsoft's Touch Develop. There might be a chance to have MicroPython shipped on it by default :D

BTW, the microbit mailing list has just been opened up to the public: microbit@python.org, see https://mail.python.org/mailman/listinfo/microbit

Re: MicroPython on the BBC micro:bit

Posted: Sat Jan 16, 2016 10:38 pm
by Damien
Microsoft have been taking inspiration from MicroPython and they have now implemented an in-browser compiler for their Touch Develop system. Read about it here(MicroPython is mentioned under "The inspiration" section): https://www.touchdevelop.com/docs/touch ... n-208-bits

Re: MicroPython on the BBC micro:bit

Posted: Thu Mar 10, 2016 10:16 am
by Damien
The online editor for MicroPython on the micro:bit is now live and can be found at: https://www.microbit.co.uk/create-code (click on "New Project" within the big Python box).

There is also a dedicated offline editor: https://github.com/ntoll/mu

And python.org has a dedicated page for the micro:bit: https://www.python.org/community/microbit/

Re: MicroPython on the BBC micro:bit

Posted: Thu Mar 10, 2016 1:02 pm
by Turbinenreiter
Is there a way to buy a micro:bit?

Re: MicroPython on the BBC micro:bit

Posted: Thu Mar 10, 2016 9:28 pm
by Damien
Turbinenreiter wrote:Is there a way to buy a micro:bit?
Not yet. Keep an eye on Kitronik: https://www.kitronik.co.uk/ they already sell microbit accessories.

Re: MicroPython on the BBC micro:bit

Posted: Thu Mar 10, 2016 9:59 pm
by SpotlightKid
It's a very limited device anyway. Unless you want to use it for teaching, all other boards supported by MicroPython are far more capable.

Re: MicroPython on the BBC micro:bit

Posted: Thu Mar 10, 2016 10:30 pm
by Turbinenreiter
Using it for teaching is the plan.