Hi,
I was wondering if anybody has attempted, or is interested in, a port to the mbed platform?
The background in my case is that I recently bought a FRDM-K64F to play with - it is mbed-enabled out of the box and there is an online compiler to get you into blinky-led examples straight away, with an ecosystem of shared code and libraries to get you further. You can also download projects for offline compilation, and push/pull/fork via hg repositories. But there didn't seem to be an easy way to do interactive tinkering (apart from a noddy RPC system which seems more trouble than it's worth).
At about the same time, I became aware of the micropython project via the microbit announcement, and it seemed that micropython would be ideal for my needs.
AIUI, the microbit version of micropython was originally based on mbed. Also I see neilh10 is working on a port for the FRDM-K64F at the Freescale HAL level. I was thinking of working against the mbed API, a slightly higher level of abstraction which would also make it applicable to a wider range of boards.
Porting to mbed
-
- Posts: 5
- Joined: Fri Apr 15, 2016 11:27 am
- Location: Abingdon, UK
Re: Porting to mbed
I have a basic mbed port working on my FRDM-K64F board. I decided in the first instance to model the mbed C++ classes rather than the patterns of pyboard et al, although I have put in a machine module with mem8, mem16 & mem32 objects for direct memory access (useful for tinkering). So far I have DigitalOut and Serial classes, and can successfully turn LEDs on & off (always satisfying to get the blinkenlights working!).
The main issue with the port is that the mbed online IDE compiler requires a certain layout of files, and tries to compile every source file it finds in a tree. The IDE is also geared around hg repositories. So I wrote a little python script to allow synchronising a subset of files between my main git repo and an hg repo.
The main issue with the port is that the mbed online IDE compiler requires a certain layout of files, and tries to compile every source file it finds in a tree. The IDE is also geared around hg repositories. So I wrote a little python script to allow synchronising a subset of files between my main git repo and an hg repo.
-
- Posts: 5
- Joined: Fri Apr 15, 2016 11:27 am
- Location: Abingdon, UK
mbed port published
I have now published my initial port of MicroPython to the mbed classic platform, which makes MicroPython available on quite a few boards.
Here are some relevant links:
Here are some relevant links:
- * Announcement on mbed forum: https://developer.mbed.org/forum/news-a ... pic/26162/
* Wiki describing some aspects of the port: https://github.com/infinnovation/micropython/wiki
* micropython repo on mbed: https://developer.mbed.org/users/infinn ... cropython/
* micropython-repl repo on mbed: https://developer.mbed.org/users/infinn ... thon-repl/
* mbed directory in mbed branch in my github fork: https://github.com/infinnovation/microp ... /mbed/mbed
-
- Posts: 16
- Joined: Fri Apr 29, 2016 7:08 pm
Re: Porting to mbed
Very interesting work, thanks for that.
Re: Porting to mbed
I just started trying to port it to another mbed board. The board has more than 100K flash, so that will not be an issue. I am still learning about the board and mbed, which might be a bigger issue in porting mircopython to my board
Question, where can I find makembedpins.py, and do you have anyhints how to make it works for other boards?
Paul
Question, where can I find makembedpins.py, and do you have anyhints how to make it works for other boards?
Paul