ベアメタルRaspberry Pi用MicroPythonが公開

以前、下記の記事で紹介したStefan NaumannさんのベアメタルRPi向けMicroPythonが公開されました。

Raspberry PiベアメタルでMicroPythonの調査: 楽しくやろう。

プルリクエストがこちらに出ています。
サポートされているハードウェアはRaspberry Pi Zeroのみで、おそらく初代Raspberry Piでも動作するだろうとのことです。RPi Zero Wは試してみましたが動作しませんでした動作しました。

Bare-Metal Raspberry Pi port by naums · Pull Request #3522 · micropython/micropython

マージされるまでは、下記にリポジトリの形でも公開されているそうです。

naums/micropython: MicroPython – a lean and efficient Python implementation for microcontrollers and constrained systems

学生さんのプロジェクト?であるらしく、期末レポートがこちらで公開されています。

Term Paper: Porting Micropython to bare-metal Raspberry Pi – Stefan Naumann

とりあえずビルドして、先日購入したRaspberry Pi Zeroで動かしてみました。
REPLが実装されておらず、mainの中で渡された文字列を実行して終わりなので、現時点ではIchigo Jamのように単体でプログラミングすることはできません。
ハードウェアはUARTとGPIOがサポートされており、Lチカはできるようです。

rpi-zero-serial.jpg

ちなみにRaspberry Pi Zeroにはまだピンヘッダを付けていなかったので、スルホール用テストワイヤを使いました。
バネが弱いので、沢山接続するにはあまり向かないと思いますが、このようにちょっとUARTを接続するだけなら割と便利です。

コメント

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny

タイトルとURLをコピーしました