Skip to content

gfwilliams/EspruinoCompiler

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
inc
 
 
src
 
 
 
 
tmp
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Espruino Compiler

See the Espruino Compilation Page

This project does the following:

  • Turns JavaScript code into C++ (that calls into Espruino library functions for more complicated operations)
  • Compiles the code with GCC
  • Links and Extracts a relocatable blob of Thumb code
  • Formats it into JS that can be run in Espruino

Files

  • src/utils.js - general utilities
  • src/infer.js - Type inferral on parse tree
  • src/compile.js - Parse tree -> C++, and calling of GCC
  • server.js - server that performs compilation for the Web IDE
  • test.js - simple command-line test
  • test_espruino.js - test in such a way that the C code is compiled into Espruino - allowing nice easy GDB debug

Setup

You need:

Running

  • Run node server.js
  • Go into Web IDE settings and set Communications / JavaScript Compiler URL to http://localhost:32766

About

Node.js-based JavaScript->C++ compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published