Git Product home page Git Product logo

sockpuppet's Introduction

The Sockpuppet API is a minimalist system call interface that is Cortex-M Specific. This system call interface includes getchar/putchar and friends, plus a runtime linking mechanism so that the client application can look up selected variables and functions in the C layer. This was originally written to simplify porting Forth to new microcontroller environments, but has since gone on to be a more general-purpose tool. This code has accumulated over a hundred million hours of runtime.

The basic mechanism is a the SVC instruction that hooks into a system call layer that is written in C. The client code can be in any language that complies or can comply with the ARM AAPCS calling convention.

This allows you to leverage the large body of vendor-supplied SOC initialization code (for good or ill!) and write all of the device-specific interupt handlers in C.

If the client application supports threads, interrupt handlers and service calls can stop threads and wake them for a traditional top half/bottom half arrangement. This is all discussed in more detail in Architecture.txt

Support for other languages is possible. main() or it's equivalent can be substituted as need be. Python comes to mind. The only requirement is that the client binary be at a known location in memory and the first two words of of the client application are the initial stack pointer and program counter. This is a Cortex-M binary with only the first two vectors.

This repo contains the files to support a reference implementation on the SiLab Leopard Gecko. The SOC-specific files for that project are in another repository.

Currently supported SOCs include Cortex-M3s from TI (Stellaris) and the ST Micro STM32L family. Its extensible.

Included:

  • Architecture.txt : An in-depth discussion of how it works.
  • SAPI - Key pieces that make up the C-Side layer.
  • Forth - Implementation files for MPE Forth

Files are supplied for use with MPE Forth (http://www.mpeforth.com).

Not included: Libraries from TI and/or ST. Those are covered under their own licenses and may be obtained directly from the vendors.

Not Included: Forth compiler from MPE. MPE's Lite compiler will work with this code. It runs on windows or under WINE on Linux or Mac.

sockpuppet's People

Contributors

rbsexton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.