Git Product home page Git Product logo

cs249-project's Introduction

Template for the Lingua Franca RP2040 target platform

This repo is a template for Lingua Franca (LF) projects using the bare metal RP2040 target platform such as found on the Raspberry Pi Pico board and the Pololu 3pi+ 2040 robot. This template is particularly well suited for the LF Embedded Lab exercises. Students should create a repository using this template and record their work within their repo.

The repo supports MacOS, Linux, and Windows through WSL. To support RP2040-based boards, the repo uses the Pico SDK as a submodule. It also includes some code from the pololu-3pi-2040-robot library by DavidEGrayson.

See the getting started instructions to get started.

Emulator

To run basic tests and monitor GPIO, UART, and other supported peripherals, a Node.js-based emulator for the Raspberry Pi Pico is provided in this repo. During the nix shell setup for the repo, the Node modules in the test directory are installed. This emulator is based on Wokwi. Because it emulates the Pico board, not the Pololu robot, it will not be able to run all the programs for the robot.

By default, the emulator uses hex binaries which are generated by both build options. Any hex files that are in need of testing must be placed in the /test directory.

Run the following from the /test directory. It will run an emulator instance for each hex file in the directory in parallel and report results as plain text files in the same directory.

cd test/
npm start

The text framework source code is available and can be easily extended. Currently, a test is set to report a FAILING status if it does not terminate within 10 seconds but this callback condition is marked in run.ts and can be modified. To set a timeout in a LF program add the following target property to the program header.

target C {
    ...
    timeout: 5 sec,
}

cs249-project's People

Contributors

jonathanlu31 avatar mikkelsvartveit avatar thomas-kragerud avatar

Stargazers

 avatar  avatar

Watchers

 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.