Skip to content

hasumikin/mruby_machine_PSoC5LP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mruby machine on PSoC5LP

mruby machine

mruby machine is an integration of mruby/c, mmrbc, shell and peripheral driver.

Build

Prerequisite

You can build this project without things below (except PSoC Creator) if you are knowledgeable about entire concept of them.

  • PSoC Creator 4.3+ (compulsory)
  • Windows Subsystem for Linux 2 (optional)
    • To host mmruby which contains mmrbc (mini mruby compiler)
    • You must install some essential tools such as make, git, etc.
    • I didn't try though, WSL1 should also work
  • Docker Desktop for Windows (optional)
    • To build library files (.a) for PSoC
    • Make sure it is integrated with WSL
    • Find more information from Makefile and docker-compose.yml of hasumikin/mmruby

Steps to build

  • on WSL2
    • git clone https://github.com/hasumikin/mmruby.git
    • cd mmruby
    • make psoc5lp_lib
  • on PSoC Creator
    • Open dialog from [Project] > [Build Settings...]

      • Add two file names to "Additional Link Files"

        • \\wsl$\[path\to]\mmruby\build\psoc5lp\lib\libmrubyc.a
        • \\wsl$\[path\to]\mmruby\build\psoc5lp\lib\libmmrbc.a
        • [path\to] should be correspond to your environment
      • As in, add two directory names to "Additional Include Directories"

        • \\wsl$\[path\to]\mmruby\src
        • \\wsl$\[path\to]\mmruby\cli\mmirb_lib
      • At last, add two items to "Preprocessor Defenitions"

        • MRBC_USE_HAL_PSOC5LP
        • MRBC_CONVERT_CRLF
    • Build and Program to PSoC

  • on Terminal emulator like Tera Term
    • Connect to PSoC over serial port

    • Serial port settings are shown in this image

Enjoy!

Contributing to mmruby

You will find there are still many problems to be fixed 😅

Fork, fix, then send a pull request if you are intersted in fixing them!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages