Code Monkey home page Code Monkey logo

sjsu-dev2's Introduction

SJSU-Dev2

Discord Github Actions codecov Documentation Status Codacy Badge GitHub stars GitHub forks GitHub issues

Cross platform firmware framework written by students, alumni, and faculty of San Jose State University. Designed for the original purpose of helping students develop firmware for the SJTwo board.

๐Ÿ—๏ธ WARNING: UNDER HEAVY CONSTRUCTION ๐Ÿšง

Currently Ongoing Breaking Changes:

  1. New common API for modules
  2. Introduction of Docker Images and Containers to make development consistent across computer operating systems.
  3. Renaming and reorganization of the library folder

Additional Considered Changes:

  1. New build system (maybe meson, or CMake (ick), or our own custom build system called cpp-build)
  2. Add package management system to separate platform and peripheral implementation details from main codebase.

๐Ÿ’ป Operating System Supported

  • Ubuntu (>= 18.04)
  • Mac OSX (>= High Sierra)

๐Ÿš€ Quick Start

To download and setup the environment, simply copy and paste this into a terminal:

git clone https://github.com/SJSU-Dev2/SJSU-Dev2.git
cd SJSU-Dev2
./setup

asciicast

If you find that git is not installed on your machine follow these steps to install GIT.

๐Ÿ› ๏ธ Building a Project

A good project to start with would be the hello_world project. It can be found in the projects/ folder. The example projects can be found in the demos/ folder.

Building hello_world:

cd project/hello_world
make application

๐Ÿ“ฅ Programming a Device

From within a project, run

make flash

asciicast

Most platforms do not have make flash available, and in those cases JTAG/SWD can be used to program a device. Hook up a JTAG or SWD to your MCU and execute the following command with the correct JTAG and PLATFORM selected:

make program JTAG=<jlink|stlink|etc> PLATFORM=<stm32f10x|lpc17xx|etc>

Example using a STLink to program a stm32f10x

make program JTAG=stlink PLATFORM=stm32f10x

๐Ÿ–ฅ๏ธ Viewing Serial Output

The preferred method for communicating with a serial devices is via Google Chrome, using the online serial terminal tool, Telemetry. You can also open this up on your browser using the make telemetry command in a project directory.

๐Ÿ”Ž Debugging Device

If you are using a JTAG or SWD device with your MCU, you can debug the device with a similiar command to programming:

make debug JTAG=<jlink|stlink|etc> PLATFORM=<stm32f10x|lpc17xx|etc>

Example using a STLink to program a stm32f10x:

make debug JTAG=stlink PLATFORM=stm32f10x

STDOUT and STDIN will be available via the gdb debug monitor.

๐Ÿ“ฆ Windows Users: Using a Virtual Machine

One of the easiest ways to get started with SJSU-Dev2 for Windows users is to use a prebuilt virtual machine.

Steps to install virtual box and the virtual machine are listed below:

  1. Download and install Virtualbox and then the "VirtualBox Oracle VM VirtualBox Extension Pack" on your computer from this link: VirtualBox Download
  2. Download a prebuilt VirtualBox image for Ubuntu from https://www.osboxes.org/ubuntu/. If you don't know which version to choose, use 18.04.3.
  3. Open the file with VirtualBox to setup and open the virtual machine.

Setting up SJSU-Dev2

Now that the VM is up and running, you can use the quick start guide to download and setup SJSU-Dev2.

Connecting USB Devices to Virtual Machine

  1. Open the Ubuntu Virtual Machine on the left hand side.
  2. Login by entering the password "osboxes.org"
  3. To program and interact with your board, you will need to connect it to your host machine and bring it into the virtual machine by using the top menu: Devices > USB > CP2102n...
  4. At this point you can run commands like make application and make flash from within the SJSU-Dev2 folder.

๐ŸŒŒ Future Goals of SJSU-Dev2

  • Integrate user-defined literals for SI units
  • Platform Additions
    • Support for host side application development
    • Support of STM32 series of MCUs
    • Support of TI series of MCUs
    • Support for Raspberry Pi and other SBCs such as the BeagleBone Black
    • Support of RISC-V
  • Multi Threading Portability
    • Add FreeRTOS wrapper of POSIX calls
      • Allows Linux platforms to work with code that makes calls to FreeRTOS.
  • Move from Return-Error-Codes to C++ std::expected
  • Move from C++ std::expected to exceptions handling
  • Package manager for adding SJSU-Dev2 libraries
  • Package manager for adding custom platforms SJSU-Dev2

sjsu-dev2's People

Contributors

acarrou avatar adam-d-sanchez avatar aidenchan12 avatar andrew-javier avatar andrewdemerson avatar brentjsimon avatar chuefengvang avatar diarmadhi avatar drler0 avatar evanugarte avatar hangbogu avatar harmandersihra avatar hashah1 avatar huangdave avatar jechea14 avatar jeremy-chau avatar k-leong avatar kammce avatar lawrence-wan avatar legenderry9 avatar masterboyd avatar ntwong0 avatar pricelessantonio avatar pushpalpatil avatar rabeelio avatar radconmannbor avatar rjavier441 avatar vsawce avatar williammajor avatar zackeryplovanic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sjsu-dev2's Issues

OLED Firmware Loading Animation

Design a minimalist OLED animation that indicates to the user, during the flashing stage of the SJTwo board, the current progress of firmware loading.

Stop Watch

Stopwatch implementation where the user can get the time between executions.

DEBUG_PRINT()

Inline function that should use the FILE, PRETTY_FUNC and LINE to show users exactly where that print statement is coming from.

Asynchronous Accelerometer Monitor System

Using an RTOS task and the accelerometer module, the object should be able to run a callback function in the event of the following events:

  1. Pitch beyond threshold
  2. Roll beyond threshold
  3. Accelerate beyond threshold
  4. Decelerate beyond threshold
  5. Board level
  6. Board still for a duration of time

Asynchronous Button Monitor System

Using an RTOS task and the button module, the object should be able to run a callback function in the event of the following events:

  1. Button N pressed
  2. Button N released
  3. Button N changes
  4. Combination of buttons pressed
  5. Combination of buttons released
  6. Button state still (given a specified time)

Rationale
Why not use external interrupts for this? Because the buttons use GPIO port 1 which does not support external interrupts, so this must be done in software

Utility Object

A static class full of useful utility functions

  • delayMS(uint64_t delay_time);
  • delayUS(uint64_t delay_time);
  • logBootInfo(char destination_buffer[256]);
  • uint64_t micros();
  • uint32_t millis();
  • uint32_t random(uint32_t min, uint32_t max);
  • randomSeed();
  • uint32_t bitExtract()
  • uint32_t bitPlace()
  • uint32_t bitSet()
  • uint32_t bitClear()
  • uint32_t bitRead()
  • min
  • max
  • map
  • constrain

Asyncrounous Ambient Light Sensor

Using an RTOS task and the ambient light/gesture sensor object, the object should be able to run a callback function in the event of the following events:

  1. Ambient light reached point
  2. Under ambient light threshold
  3. Over ambient light threshold
  4. Ambient light Increase (above a specified threshold amount)
  5. Ambient light Decrease (below a specified threshold amount)
  6. Ambient light still (given a specified time and a epsilon (range))

OLED Printf

Design an object that will allow debug messages to show up on the OLED display during the booting process. This should allow printf like statements to appear on the display. This object should be static, global and usable by all modules. This system should also have a tier debug level system for which messages are allowed to be shown (equivalent to the DEBUG_PRINTF).

Asyncronous Gesture Sensor Controller

Object will create its own RTOS task and utilize it to monitor the Gesture sensor. In the event that an action occurs, the gesture sensor will execute a callback for that particular action.

The object should be able to run a callback function in the event of the following events:

  1. Swipe right
  2. Swipe left
  3. Swipe Up
  4. Swipe Down

Asyncronous Temperature Monitor System

Using an RTOS task and the temperature module, the object should be able to run a callback function in the event of the following events:

  1. Temperature reached point
  2. Under Temperature
  3. Over Temperature
  4. Temperature Increase (above a specified threshold amount)
  5. Temperature Decrease (below a specified threshold amount)
  6. Temperature still (given a specified time)

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.