Table of Contents

Program Arduino Uno in C

Windows

install win avr: https://sourceforge.net/projects/winavr/

open a terminal window: ⊞ Win + C M D

put these files in a folder “path/to/folder/c-blink”, and run: \

cd path/to/folder/c-blink make make flash

c-blink.zip

The important bit is you Makefile. Depending on your configuration you might have to adjust the name of the USB-port your Arduino is connected to:

AVRDUDE = avrdude -q -V -p atmega328p -C C:\WinAVR-20100110\bin\avrdude.conf -D -c arduino -b 115200 -P COM6

Mac/Linux

For Mac install crosspack-avr:

https://www.obdev.at/products/crosspack/index.html

For Linux install avrgcc toolchain:

sudo apt install avrdude gcc-avr avr-libc make

open terminal/bash:

Mac: cmd-space and then type terminal
Linux: usually Ctrl+Alt+T

put the files (download below) in a folder path/to/folder/c-blink

open the Makefile with a text editor and edit the following line:

AVRDUDE = avrdude -q -V -p atmega328p -C /usr/local/CrossPack-AVR/etc/avrdude.conf -D -c arduino -b 115200 -P /dev/cu.usbmodem14101

changing:

/dev/cu.usbmodem14101

with the serial port where the Arduino is connected to, you can get it from the Arduino IDE Tools→Port, or via bash with

ll /dev/ | grep cu.usbmodem
/usr/local/CrossPack-AVR/etc/avrdude.conf

with the folder where you have installed the AVR Crosspack/Toolchain, if different

save the Makefile and then run:

cd path/to/folder/c-blink
make clean
make
make flash

c-blink_mac.zip