bash script to make compilation and upload to avr boards using using USBasp programmers on LInux easy.
Steps to follow:
--Compilation:
- In the compile script change the
-mmcu=atmega16
to the microcontroller used. - Make sure the script is in the same folder as your c program.
- In your terminal use
cd
to navigate to the folder containing the c program. - Execute:
Replace
sudo bash ./compile_script program_name.c
program_name
suitably.
--Uploading:
- In the upload_script change the
-p m16
to your microcontroller. - Execute:
sudo bash ./upload_script program_name