I try to learn assembly and use an arduino uno R3 to act as a programmer. i have build a standalone circuit with an atmega328p, can upload usual sketches (written in c) and have also sucessfully burned the bootloader to the external chip with the arduino as an isp but i cant bring my assembly code onto the chip on the breadboard. i tried it with avrdude and the following command

avrdude -C avrdude.conf -p atmega328p -c avrisp -P /dev/ttyACM0 -b 115200 -D -U flash:w:test.hex:i

and also

avrdude -C avrdude.conf -p atmega328p -c arduino -P /dev/ttyACM0 -b 115200 -D -U flash:w:test.hex:i

but the code is always uploaded to the chip on the arduino - not to the one on the breadboard. can anyone lead me how to upload my assembly programm to the standalone chip on the breadboard using the arduino as isp? is this possible anyway?

EDIT This command worked for me

avrdude -C avrdude.conf -v -v -v -v -p atmega328p -c stk500v1 -P /dev/ttyACM0 -b19200 -Uflash:w:test.hex:i
  • You're using your Arduino as the programmer, but you're using "avrisp"? – Ignacio Vazquez-Abrams Oct 4 '15 at 23:41
  • i do so because the arduino ide doesnt compile and upload my asm code correctly - just inline asm. what should i use? -c arduino? i also tried that without any success. – BrainWorx Oct 4 '15 at 23:42
  • Hello folks is my question bad written or does nobody have an answer? – BrainWorx Oct 5 '15 at 0:10
  • It would be good to definitively separate the problem into pieces. If you can get a bootloader on the breadboard chip, such that you can upload sketches to it over (USB-) serial rather than ISP, then you should also be able to upload valid assembly code built with a bootloader-compatible memory footprint. But if you are using an Arduino as an ISP programmer, and are having problems differentiating between its bootloader and the programmed ISP sketch, then you need to solve that first. Making sure the ISP sketch uses a different baud rate than the bootloader could help a lot. – Chris Stratton Oct 5 '15 at 0:21
  • 2
    Hello folks is my question bad written or does nobody have an answer? - so, no answer after one hour, huh? Maybe a lot of people are in bed. Patience, old chap! – Nick Gammon Oct 5 '15 at 3:48

Try uploading the blink sketch to the standalone atmega328 first.

Once you get that to work you can get the right command form the console (after enabling verbose output, in the settings).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.