IDE works fine but avrdude programmer is not responding using command line

Hello everyone.

I recently graduated from engineering physics and have been learning some programing (python, c++) on my own so I have some basic programming knowledge. I wanted then to learn about embedded softwares and acquired the ELEGOO pack with the arduino mega 2560.

I’ve installed the IDE on my windows desktop and I can upload sketches without problem. However I would like to know more about what’s happening behind the scences and learn more about embedded software programming by coding the operations myself and using makefile etc. to upload the code to the board.

So using a virtualbox machine running Ubuntu I first tested the IDE again and it works fine on Ubuntu too, then I’ve basically followed the first few videos of Jacob Sorber embedded systems playlist on youtube (no links but video #3) where I follow the same steps (adapted to my board and filesystem) and trying to convert the blink.ino sketch to a blink.c file to be compiled and sent to the board.

The compilation works fine (I think ?) but the code can’t be sent to the board with avrdude and I get the output shown in log.txt. I’ve spent the afternoon trying to figure out what was happening: checking that the correct board name is selected, same for USB port, tried different programmer in the -c option of avrdude or changing rate but all resulted in no response and timeouts. I came across many topics where the problem seemed to be related to no reset occuring, and usually people could upload their scheme by manually pressing the reset button just before running avrdude. I tried many times too but I could not upload the code even once, even though the IDE works fine, so it feels like the problem is not there.

I am a novice so the problem could be really trivial but I couldn’t figure it out.
Hope you can help me out ! I have attached the source file, makefile, and log.txt.

Best regards.

blink.c (302 Bytes)

log.txt (2.53 KB)

Makefile.txt (335 Bytes)

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.