FlasgProg project consist with 2 software projects which are known as firmware and loader. The firmware project is used to drive ATmega8A microcontroller and loader is design to execute on host terminal to control the programmer over USB interface. This article explain how to compile those 2 projects on appropriate operating systems.
FlashProg ATmega8A firmware is developed using Atmel Studio 6.2 on Windows operating system. In this project all the dependencies are incorporated into source code and therefore no any additional libraries are needed to compile with this project.
This firmware is designed to work with following fuse values, therefor during the programming, make sure to set ATmega8A high and low fuses into following values:
Fuse | Value |
---|---|
Low | 0xFF |
High | 0xC9 |
Loader is console application developed using C. To compile this project we recommended to use GCC version 4.9 or newer version.
This project use LibUSB for USB communications. In Linux systems LibUSB runtime and source packages are need to be installed into the system to compile FlashProg loader project. On Debian/Ubuntu Linux systems use following command to install LibUSB into the system:
apt-get install libusb-1.0-0-dev
For Windows based compilations we recommended to use LibUSB for Windows package which is bundled with the FlashProg source code.
In Linux use make command to build Loader application.
Compilation sequence for Linux (Ubuntu) is listed in below:
labuser@ubuntu:~$ sudo apt-get install libusb-1.0-0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libusb-1.0-doc The following NEW packages will be installed: libusb-1.0-0-dev libusb-1.0-doc 0 upgraded, 2 newly installed, 0 to remove and 564 not upgraded. Need to get 169 kB of archives. After this operation, 1,488 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main libusb-1.0-0-dev amd64 2:1.0.17-1ubuntu2 [54.7 kB] Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main libusb-1.0-doc all 2:1.0.17-1ubuntu2 [115 kB] Fetched 169 kB in 1s (103 kB/s) Selecting previously unselected package libusb-1.0-0-dev:amd64. (Reading database ... 171304 files and directories currently installed.) Preparing to unpack .../libusb-1.0-0-dev_2%3a1.0.17-1ubuntu2_amd64.deb ... Unpacking libusb-1.0-0-dev:amd64 (2:1.0.17-1ubuntu2) ... Selecting previously unselected package libusb-1.0-doc. Preparing to unpack .../libusb-1.0-doc_2%3a1.0.17-1ubuntu2_all.deb ... Unpacking libusb-1.0-doc (2:1.0.17-1ubuntu2) ... Processing triggers for doc-base (0.10.5) ... Processing 1 added doc-base file... Setting up libusb-1.0-0-dev:amd64 (2:1.0.17-1ubuntu2) ... Setting up libusb-1.0-doc (2:1.0.17-1ubuntu2) ... labuser@ubuntu:~/flashprog$ make gcc -o ./bin/Release/flashprog main.cpp -lusb
In Windows operating system we highly recommend to use Code::Blocks IDE to build this project. Properly configured Code::Blocks project file (FlashProg.cbp) is also available with the source code.