My question is how would I go about making files in avr - c then compiling them to the avr mkii isp.
Would I just simply create a c file, put my avr - c code in it, then type a command in the terminal to export it to the isp or is there a more complicated process?
P.S I am a complete newbie when it comes to arch linux
I don't know specifically how to do it on arch linux, but it should not be much different from how you do on the other distros. Avr-gcc is usually used to refer to the entire toolchain. But really avr-gcc is just the compiler. You also need avr-binutils(assembler, linker, object file handling) and avr-libc(libs needed). Try following this tutorial: http://www.ladyada.net/learn/avr/setup-unix.html It shows how to download and set all tools needed. It's specifically for Ubuntu which uses 'apt' as package manager. Learn how pacman works(package manager for arch linux).
When you have installed everything correctly, find a simple example program like flashing a led or similar. Compile the program in terminal, something like:
sudo avr-gcc -mmcu=(microcontroller device) flash_LED_example.c -o flash_LED_bin
This will generate a binary file, which you will need to upload to your microcontroller. Use avrdude for uploading. You need to upload via a ISP programmer, or via USB. For example in terminal(using usbasp programmer):
sudo avrdude -c usbasp -p m328p -U flash:w:flash_LED_bin
With -c
you choose the programmer, -p
the microcontroller device, and -U
chooses what memory to target, like flash, eeprom or fuse. If to write, read or read and verify, w,r or v. And lastly the binary or hex file to upload, flash_LED_bin.