Giter Site home page Giter Site logo

00kai0 / mmruby Goto Github PK

View Code? Open in Web Editor NEW

This project forked from picoruby/picoruby

0.0 0.0 0.0 542 KB

mini mruby compiler integrated with mruby/c VM for one-chip microcontroller

License: MIT License

Makefile 2.38% C 87.37% C++ 0.96% Ruby 2.73% Yacc 6.56%

mmruby's Introduction

mmruby

mmruby is an alternative mruby implementation which is:

  • Small foot print
    • ROM: 256KB or less
    • RAM: 128KB or less
    • Reference board is PSoC5LP which has Arm 32bit processor, 256KB ROM and 64KB RAM
  • Portable
    • Depends on only standard C library such as glibc, Newlib or Newlib-nano

Set-up

  • mmrbc
    • mini mruby compiler. The main part of this repository
  • mruby/c (mrubyc/mrubyc)
    • Another implementation of mruby virtual machine

Build

  • Just hitting make will build binaries for your host machine.
  • You can build library files for PSoC5LP by hitting make psoc5lp_lib

Binaries

make command will make three executable binaries

  • mmrbc
    • build/host-debug/bin/mmrbc source.rb makes source.mrb which is VM code runs on mruby VM
  • mmruby
    • build/host-debug/bin/mmruby source.rb executes Ruby just like normal ruby command
    • You can also do like build/host-debug/bin/mmruby -e 'puts "Hello World!"'
  • mmirb

Debug build and production build

make command makes "debug build" which shows debug-print like this:

You can get "production build" like build/host-production/bin/mmruby which omits debug-print by make host_production

mmirb

Because mmruby is dedicated for onechip-microcontroller which doesn't have STDIN/STDOUT like normal computers, REPL (or you can also say SHELL) should work over serial communication like UART.

You can start up mmirb on your host machine with make mmirb though, it may look weird since it is implemented as a ported version from microcontroller version. Please try to use it according as the message on the screen if you are intersted in.

You will find more information at hasumikin/mruby_machine_PSoC5LP

Presentation about mmruby

I gave a talk about this project on RubyKaigi Takeout 2020.

Roadmap

mmruby is still developing halfway towards finishing as of 2020.

See implementation roadmap on issue/6

Contributing to mmruby

Fork, fix, then send a pull request.

License

Copyright © 2020 HASUMI Hitoshi. See MIT-LICENSE for further details.

mmruby's People

Contributors

hasumikin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.