GithubHelp home page GithubHelp logo

phase4ground / joco-2018-badge Goto Github PK

View Code? Open in Web Editor NEW
10.0 9.0 2.0 253.83 MB

Electronic Badge for the JoCo 2018 Cruise

License: Apache License 2.0

Tcl 0.12% C++ 0.70% C 85.11% PLSQL 11.89% Makefile 0.98% Shell 0.16% Python 1.04%

joco-2018-badge's Introduction

joco-2018-badge

Code and documentation for the unofficial electronic badge for the JoCo Cruise 2018.

This is based on the excellent work that the AND!XOR team produced for the DEFCON 25 Bender Badge.

All code and hardware design files are closed until Feb 26th, 2018 and then are licensed under the Apache license 2.0 unless superceded by notices in individual files or directories.

Getting Started

Some resources must be installed outside of this source tree. One of these is the Nordic SDK.

Choose a place to install these on your file system. For example, we'll use "/src/joco-support/".

Download the version 12.3 of the Nordic SDK from here and unzip it into the directory you chose.

It's known that later versions of the SDK are not compatible with the existing badge code. We may work on fixing that, which is why we don't install the SDK in the source tree for the project.

Now edit your shell init or rc file to set the following environment variable when you create a shell, substituting your chosen path:

export SDK_ROOT=/src/joco-support/nRF5_SDK_12.3.0_d7731ad

Ubuntu Installation (non-ARM host)

Download the GNU ARM Embedded Toolchain. Choose one of these methods:

Then edit $SDK_ROOT/components/toolchain/gcc/Makefile.posix and change the value for GNU_INSTALL_ROOT to the directory where your toolchain was installed.

If you plan to hook up hardware for programming and debugging, you'll need the Segger JLink software. It's available from https://www.segger.com/downloads/jlink/ for a variety of host platforms. We used version V6.18b, but the latest version is probably fine. To install on Ubuntu on an Intel PC:

sudo dpkg -i <path-to-downloads>/JLink_Linux_V618b_x86_64.deb

You'll also need a couple of command line tools from Nordic. These are available from http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrf5x_command_line_tools/nrf5x_installation.html?cp=5_1_1. We used version 9.7.0, but the latest version is probably fine. Install them in a location outside this project, like the Nordic SDK. For example using the location "/src/joco-support", you can do the following:

mkdir -p /src/joco-support/bin
cd /src/joco-support/bin
tar xvf <path-to-downloads>/nRF5x-Command-Line-Tools_9_7_0_Linux-x86_64.tar

Now edit your shell init or rc file to set the following environment variable when you create a shell, substituting your chosen path:

export NRFJ_BIN=/src/joco-support/bin

Ubuntu on an ARM Host

If you want to develop on an ARM-based host, most of the components are available.

The Nordic SDK is the same.

You should be able to sudo apt-get install gcc-arm-none-eabi to get the toolchain.

You can get JLink software from Segger here

The command line tools nrfjprog and mergehex are not currently available for ARM hosts. You can use the JLink tools to program the device, so you can probably work around nrfjprog.

Build the code

cd firmware/manbearpig

make

cd ..

./update.sh

JTAG interface hardware

To flash the code to the badge and use the Ozone debugger, you'll need a JTAG hardware interface. The one that was used by the development team is the Segger J-Link EDU Mini.

It's much easier to connect to the board if you use a short flat cable and a mating header on the board end. All these can be purchased from these retailers:

Flashing the target

Two ways, either:

cd firmware

./provision.sh

or

cd firmware/manbearpig

make flash_softdevice

make flash

The make flash_softdevice can be omitted after the first time.

Setting up the Segger Ozone debugger

This was correct for Ubuntu 14.04.5 64 bit

Install the Ozone package from here

The manual is useful (same link)

IMPORTANT NOTE:

Ozone version 2.56 would not work for me. It would halt execution in seemingly random places and not load source code.

Version 2.54b works fine

If you're using the Segger edu device, Select the device as Nordic nRF52832_xxAA

Choose SWD for the debugger device and NOT USB.

open the badge .out file to bring in source files

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.