Programming AVR From Linux
Programming AVR From Linux
sudo apt-get
get install binutils gcc
gcc-avr avr-libc
libc uisp avrdude flex byacc bison codeblocks
Figure-1
1 Package installation through linux terminal
Note:1.Package
Package installation will require internet connectivity.
2. In majority of ubuntu distribution Terminal can be launched by using shortcut key ctrl+alt+t
Step:2.2
Select AVR Project from Project template category and click Go. Illustrated in figure-3 below.
Step2.5 Text editor will open as shown in figure-8 below. We can start writing the C-program.
As shown in figure-10, Build messages window at the bottom of IDE shows various messages
generated after compilation. Errors if any, will also be shown in this window.
ls -l to list the folder content in long list format. This format will display
Use linux command
permission for root and other users.
As shown in figure-11, avrdude has only read and write privilege for root user. We have to first set a
execute privilege to script file. This is done by following linux command
Step3.3
In terminal use following command to load the hex file.
./avrdude_script.sh f <filename.hex>
Note: Filename will be the .hex file which needs to be loaded on the microcontroller. You will have
to give the complete path of file. Easier way of doing this is to keep the terminal and directory
window beside each other and drag the .hex file from directory and drop it into the terminal after
./avrdude_script.sh f
References:
1. File Permission in linux. https://help.ubuntu.com/community/FilePermissions