I want to upload lines of code (with c files, not sketches). But sadly I don't own any programmers and only possess the Arduino UNO board. Since I want to program in c code, I can't make use of the Arduino IDE. Is there any way can code can be uploaded to the ATmega IC without using any programmer?
How to program ATmega 328P – PU
arduinoprogrammer
Best Answer
You can use Arduino as ISP programmer. Check the Arduino IDE \$\Rightarrow\$ File \$\Rightarrow\$ Examples \$\Rightarrow\$ ArduinoISP and refer to ArduinoISP documentation.
I personally use Linux and a Makefile to run all the required commands.
In short these are the commands required (Linux, but Windows is pretty similar when the toolchain is installed [and it is if you have the ArduinoIDE on the system])
Seeing the complexity to remember these commands, it really pays off to figure out how to use the linked above makefile on your system: