Setup | Developers

Setup

Estimated reading time: 3 minutes

This step is getting the plugin to compile. But first, we need to set up the working environment.

Base-path

Let’s now create a new directory to contain everything that is plugin related.
In a terminal:

mkdir plugin_dev
cd plugin_dev

Clone repositories

In the plugin_dev/ folder, clone the Ethereum-app:

git clone https://github.com/LedgerHQ/app-ethereum
cd app-ethereum
git checkout master

And the Plugin-tools (cd back to the plugin_dev/ first):

cd ..
git clone https://github.com/LedgerHQ/plugin-tools

The plugin-tools repository contains tools for your plugin development,

Connect to the container

We have created docker images to start coding quickly rather than installing all the dependencies on your computer from scratch.

You need to install these if you don’t already have them:

  1. Docker: instructions here
  2. Docker-compose: instructions here
Important
Make sure you have correctly installed the tools above.

There is no need to launch Docker because docker-compose (in the plugin-tools repository) does all the magic.

In the same terminal, simply type:

cd plugin-tools
./start.sh
Tip
If you get this error:
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
This means you either:
- Failed to install docker.
- Need to add sudo in front of sudo ./start.sh

You are now connected to the container. The plugin_dev directory you see in the container is the one created in the steps above. (They are shared using volume in docker-compose.)

At the prompt, ls gives

app-ethereum    plugin-tools

Compile the Ethereum app

Still in the terminal, compile the Ethereum app:

cd app-ethereum
make

In the first compilation, you may come across:

  1. messages such as BOLOS_ENV is not set: falling back to CLANGPATH and GCCPATH. These are expected.
  2. continue connecting messages: type yes.
  3. a few gcc or clang warnings about the C code. This is (unfortunately) expected.

If everything goes well, you should end with:

...
[LINK] bin/app.elf

Congratulations, you have successfully compiled the Ethereum app!
Now you are ready to walk through the Boilerplate plugin example.


Did you find this page helpful?


How would you improve this page for developers?



Overview
Introduction
Getting Started
Theme Features
Customization

DApps