Coder Social home page Coder Social logo

fi0 / interphase-firmware Goto Github PK

View Code? Open in Web Editor NEW

This project forked from durburz/interphase-firmware

0.0 1.0 0.0 124 KB

Firmware for interphase (a mitosis clone)

License: GNU General Public License v3.0

C 70.02% Makefile 28.09% Shell 1.89%

interphase-firmware's Introduction

Interphase Keyboard Firmware

Firmware for Nordic MCUs used in the Interphase Keyboard, contains precompiled .hex files, as well as sources buildable with the Nordic SDK This firmware is a dervivative of reversebias' mitosis firmware. https://github.com/reversebias/mitosis

Install dependencies

Tested on Ubuntu 16.04.2, but should be able to find alternatives on all distros.

sudo apt install openocd gcc-arm-none-eabi

Download Nordic SDK

Nordic does not allow redistribution of their SDK or components, so download and extract from their site:

https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v11.x.x/nRF5_SDK_11.0.0_89a8197.zip

Firmware written and tested with version 11

unzip nRF5_SDK_11.0.0_89a8197.zip  -d nRF5_SDK_11
cd nRF5_SDK_11

Toolchain set-up

A cofiguration file that came with the SDK needs to be changed. Assuming you installed gcc-arm with apt, the compiler root path needs to be changed in /components/toolchain/gcc/Makefile.posix, the line:

GNU_INSTALL_ROOT := /usr/local/gcc-arm-none-eabi-4_9-2015q1

Replaced with:

GNU_INSTALL_ROOT := /usr/

Clone repository

Inside nRF5_SDK_11/

git clone https://github.com/Durburz/interphase-firmware

Install udev rules

sudo cp interphase-firmware/49-stlinkv2.rules /etc/udev/rules.d/

Plug in, or replug in the programmer after this.

OpenOCD server

The programming header on the side of the keyboard, from top to bottom:

SWCLK
SWDIO
GND
3.3V

It's best to remove the battery during long sessions of debugging, as charging non-rechargeable lithium batteries isn't recommended.

Launch a debugging session with:

openocd -f interphase-firmware/nrf-stlink.cfg

Should give you an output ending in:

Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints

Otherwise you likely have a loose or wrong wire.

Manual programming

From the factory, these chips need to be erased:

echo reset halt | telnet localhost 4444
echo nrf51 mass_erase | telnet localhost 4444

From there, the precompiled binaries can be loaded:

echo reset halt | telnet localhost 4444
echo flash write_image `readlink -f precompiled-basic-left.hex` | telnet localhost 4444
echo reset | telnet localhost 4444

Automatic make and programming scripts

To use the automatic build scripts:

cd mitosis/interphase-keyboard-basic
./program.sh

An openocd session should be running in another terminal, as this script sends commands to it.

interphase-firmware's People

Contributors

durburz avatar joric avatar reversebias avatar

Watchers

 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.