GithubHelp home page GithubHelp logo

isabella232 / module-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from helium/module-sdk

0.0 0.0 0.0 11.2 MB

Libraries and example applications for developing Helium embedded Applications

License: Apache License 2.0

Shell 4.15% Makefile 26.25% C 69.60%

module-sdk's Introduction

Build Status

Helium Module SDK

This repository contains libraries and example applications for developing Helium Apps which sit above the open-source TockOS kernel. This Module SDK is a Helium curated fork of Tock's libtock-c.

Installing Dependencies

Windows 10 (64-bit)

Download Cygwin and install make. During the installation process, you will be prompted to add Cygwin to your environment path - do so. If you missed it, add it manually.

Download TI XDS Emulation Package so that we can communicate to the LaunchXL over USB.

Download this zipfile which contains OpenOCD, the ARM GNU toolchain, elf2tab, and make.

The zipfile has a script called set_paths.ps1 to help, but you can manually add the three paths to your environment's Path:

  • [PATH_TO_DIRECTORY]\cargo\bin
  • [PATH_TO_DIRECTORY]\gnu_arm_embedded\7 2018-q2-update\bin
  • [PATH_TO_DIRECTORY]\OpenOCD\0.10.0-9-20181016-1725\bin

NOTE: to use the script, you need to enable Powershell scripts. Open up Powershell as admin, and type Set-ExecutionPolicy Unrestricted. Now you can execute the set_paths.ps1 which will put all four paths in your environment path.

Install Tockloader (depends on Python3):

$ pip3 install tockloader

Proceed to the Getting Started section.

MacOS

Install the cross compiler for embedded targets: arm-none-eabi- (depends on homebrew)

$ brew tap ARMmbed/homebrew-formulae && brew update && brew install arm-none-eabi-gcc

Install the most recent version of openocd:

$ brew install openocd --HEAD

Download TI XDS Emulation Package so that we can communicate to the LaunchXL over USB.

Install rustup; a compilation utility is managed by it.

$ curl https://sh.rustup.rs -sSf | sh

Install Tockloader (depends on Python3):

$ pip3 install tockloader

Proceed to the Getting Started section.

Debian/Ubuntu (64-bit)

Install the cross compiler for embedded targets: arm-none-eabi-.

$ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa && sudo apt update && sudo apt install gcc-arm-embedded

You can either download and compile the most recent OpenOCD or you can use this prebuilt verison.

Download TI XDS Emulation Package so that we can communicate to the LaunchXL over USB.

Install rustup; a compilation utility is managed by it.

$ curl https://sh.rustup.rs -sSf | sh

Install Tockloader (this requires Python3):

$ pip3 install tockloader --user

Proceed to the Getting Started section.

Getting Started

Compile

Changing directory until you are in module-sdk/examples/blink. If make starts building then ARM GNU is properly setup. Success here verifies that make, arm-none-eabi, and elf2tab are properly installed.

Upload

From the same directory, type tockloader install --board launchxl-cc26x2r1 --openocd './build/blink.tab'. Even without hardware, you can test this and you will simply see openocd fail to reach the debugger. If you have hardware, you should see blinking LEDs! Success here verifies that tockloader and openocd are propery installed.

Common Issues

"Command not found" command line response. Application is not in system path.

If you have installed all of the above componenets correctly, check to make sure that the application install directory is in the system path. This can be found by checking either you're .bashrc, .zprofile, or .zshrc file, typically located in your $HOME directory. ls -a ~/ or ls -a $HOME/ to locate file and view/edit with text editor of your choice (vim, emacs, sublime etc...)

If this is happening when attempting to envoke tockloader, check which python you have installed and where that python version installs executables. If you system has many different python versions, they may not all be listed in your system path.

Example application fails to build with make due to elf2tab

Check that you have installed Rust through Rustup instead of installing from Rust source. Rustup will manage your toolchain and fetch elf2tab when you envoke make and rust+cargo seems to fail at this.

$ openocd -c "source [find board/ti_cc26x2_launchpad.cfg]; init; halt; flash erase_address 0x30000 0x10000; soft_reset_halt; resume; exit"

Flashing the kernel

For some reason or another, you may need to reflash the kernel. tools/kernel contains the necessary binaries and some helper scripts for flashing. Running ./flash_kernel.sh from that directory should be enough.

On a Windows sytem, you will want to try the command directly openocd -f flash-kernel.openocd

Pinout

DIO Signal
DIO12 UART0_RX
DIO13 UART0_TX
DIO21 UART1_RX
DIO11 UART1_TX
DIO22 I2C0_SCL
DIO5 I2C0_SDA
DIO16 TDO
DIO17 TDI
DIO6 RED_LED
DIO7 GREEN_LED
DIO15 BUTTON_1
DIO14 BUTTON_2
DIO20 GPIO0
DIO23 ADC0
DIO24 ADC1
DIO25 ADC2
DIO26 ADC3
DIO27 ADC4
DIO18 PWM0
DIO19 PWM1
DIO28 RF24
DIO29 RFHIPA
DIO30 RFSUBG

module-sdk's People

Contributors

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