Skip to content

Latest commit

 

History

History
200 lines (136 loc) · 4.63 KB

github.md

File metadata and controls

200 lines (136 loc) · 4.63 KB

class: center, middle, riot

RIOT im Internet of Things

Github Introduction

Cenk Gündogan, Peter Kietzmann, Sebastian Meiling, Thomas C. Schmidt

:scale 50%

iNET, Department Informatik, HAW Hamburg


Getting Started

Configure GIT

  • Get a GitHub account, and sign in

  • Install GIT on your Laptop, Mac, or PC

    • on Windows use scm-git
    • on Linux use package manager: apt, pacman, yum, zypper
    • on macOS git preinstalled, or use: macports, brew
  • Configure GIT environment with your name and email:

$ git config --global user.email "[email protected]"
$ git config --global user.name "Your Name"
  • send us your Github account name

Getting Started

Important Links

Git Help


Contribute to RIOT

  • Fork RIOT into your own account via Github

  • Clone your RIOT fork, and create a branch for development

$ git clone https://github.com/USERNAME/RIOT.git
$ cd RIOT
$ git checkout -b <develop branch>
  • make your patches, changes, additions to RIOT

  • Example: fixing typos

    • dist/tools/vagrant/REAMDE.md: reproducable : reproducible
    • dist/tools/tunslip/README.md: unnessarily : unnecessarily

Verify and publish your changes

  • build and test your code

  • commit everything and push to Github

git status
git add <changed files>
git commit
git push
git push --set-upstream origin <devel branch>
  • make a pull request, wait for CI okay, and someone to merge

Update Your Fork

  • RIOT regularly receives updates in form of pull requests.

  • To update your fork:

    • update your master branch with RIOT master
    • rebase your working branch to your master.
$ git checkout master
$ git pull --rebase https://github.com/RIOT-OS/RIOT.git
$ git checkout <working_branch>
$ git rebase master

Build a RIOT application

Init and clone code repository

  • Create your own project repository on Github

    • choose a license, and
    • add a README file
  • Clone the repository

$ git clone https://github.com/USERNAME/hello-riot
$ cd REPO

Add some code

  • create a simple Makefile
APPLICATION = hello-riot
BOARD ?= native
include $(RIOTBASE)/Makefile.include
  • add your application code
#include <stdio.h>

int main(void)
{
    puts("Hello RIOT!");

    printf("You are running RIOT on a(n) %s board.\n", RIOT_BOARD);
    printf("This board features a(n) %s MCU.\n", RIOT_MCU);

    return 0;
}

Test your application

  • build and run your code with RIOT-OS
$ RIOTBASE=/path/to/RIOT make
$ ./bin/native/hello-riot.elf
  • application output:
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2016.10-devel-199-g0d901-ws-86-209.haw-1x.haw-hamburg.de)
Hello RIOT!
You are running RIOT on a(n) native board.
This board features a(n) native MCU.

Github project environment

  • provide a README, showing how to use and build your project

    • simple, brief; for everything else use the Wiki
  • use Github features such as Wiki, Issues, and Pull Request to collaborate

    • Wiki: collect further information
    • Issues: report problems, track todos
    • Pull Request: propose changes, fixes etc.
  • use Github pages to create project website

    • create simple webpage from README
    • one website per user/organisation or repository
    • hosted by Github: {user|org}.github.io/[repo]
  • remember: it's recommended to choose a license (GPL, MIT, ...)


class: center, middle, riot :scale 100%