Skip to content
Dr. Boris Neubert edited this page Feb 1, 2015 · 4 revisions

Initializing Git

See this tutorial for a comprehensive introduction of Git.

Initialize your Git configuration from the command line as follows:

git config --global user.name "Your real name"

git config --global user.email "your@email.address"

git config --global core.autocrlf input

git config --global core.safecrlf true

Getting the sources

The go-to branch for actual development firmware is "development".
The master branch is usually quite old.

Change to the folder where you like to put the sources. Then clone the development branch:

git clone -b development https://github.com/mysmartgrid/hexabus.git

cd hexabus

git branch # * development

You need to initialize and retrieve Contiki as a submodule:

git submodule init

git submodule update

Note: if you are registered at GitHub and if you have provided your public RSA key there, you might get asked for unlocking your private key from ~/.ssh/id_rsa when running the last command from above list.

Compiling the firmware

Check firmware\Hexabus-Device\hexabus_config.h to contain the right settings for an auto-broadcasting Hexabus Plug+:

#define HXB_DEVICE_PROFILE HXB_PROFILE_PLUGPLUS

#define VALUE_BROADCAST_ENABLE 1

Then

cd firmware\Hexabus-Device

make TARGET=Hexabus-Socket

That's it. You end up with hexabus-main.hex. See Compiling and uploading Firmware for how to upload the firmware to the Hexabus device.

For those possessing an AVR Dragon, just flash hexabus/firmware/Hexabus-Device/hexabus-main.hex to the Plug with

avrdude -c dragon_jtag -p m1284p -U flash:w:hexabus-main.hex -F

The -F is necessary to force the firmware on the ATMega1284 (without the "p"). In one case it was necessary to specify the baud rate with the -b 9800 switch.

The fuses are show with

avrdude -c dragon_jtag -p m1284p -F -v

Warning: some versions of avrdude wrongly swap the efuse and the lfuse in the "Fuses OK (...)" message.

Clone this wiki locally