• LOG IN
  • REGISTER
  • ISSUES

Make, Hack, Void

  • home
  • projects
  • news
  • community
Home › Projects › Group Projects › MHVLib › Tutorials › Building with Make

Building MHVlib from the Command Line

MHVlib can be built from the command line using GNU make.

Getting a Toolchain

To do so, you should have an AVR toolchain installed. Windows, Linux & MacOSX users are encouraged to use MHV AVR Tools, as this is the toolchain MHVlib is tested with.

Preparing to Build

After cloning the git repository (or extracting the release archive), edit the env script in the top level of the package, and configure it to suit your installation. As shipped, it expects the AVR toolchain to be in /usr/local/mhvavrtools, and will add this to the path.

Building

To establish your development environment, cd to the top level of the package and source the script: . ./env

You can now cd to the appropriate platform of MHVlib, and build it:

cd mhvlib/ATmega328P_20MHz

make

 

Once MHVlib is built, you can then build other code:

cd $MHVLIBTOP/mhvlib-tutorial-BlinkingLED/ATmega328P_20MHz

make

 

Uploading

To upload to your AVR, most toolchains include AVRDude, which understands how to speak to many AVR programmers and bootloaders.

The bootloader on the MHVBoard emulates a USBAsp programmer, so you can upload to it as follows (after hitting reset on the board):

avrdude -c usbasp -p atmega328p -U flash:w:mhvlib-tutorial-BlinkingLED.hex:i

  • Tutorials
  • Printer-friendly version

Search

Recent Comments

#1
1 day 14 hours ago
#1
1 day 14 hours ago
more

Member Tweets

MakeHackVoid
13 hours 34 min ago — Space is closed (was open 6 hours)
MakeHackVoid
20 hours 1 min ago — Space is open until 22:00 (estimate)
MakeHackVoid
1 day 10 hours ago — Space is closed (was open 11 hours)
MakeHackVoid
1 day 22 hours ago — Space is open until 23:00 (estimate)
MakeHackVoid
2 days 13 hours ago — Space is closed (was open 9 hours)
MakeHackVoid
2 days 19 hours ago — Space staying open until 22:45 (estimate)
MakeHackVoid
2 days 22 hours ago — Space is open until 17:30 (estimate)
MakeHackVoid
2 days 22 hours ago — Space is closed (was open 117 minutes)
projectgus
3 days 44 min ago — Back at @MakeHackVoid today to do some more 3d printing. I don't have a problem, I can quit any time I want to.
MakeHackVoid
3 days 50 min ago — Space is open until 13:45 (estimate)
  •  
  • 1 of 7
  • ››
more