Sign up ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

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
share|improve this question
    
You're using your Arduino as the programmer, but you're using "avrisp"? –  Ignacio Vazquez-Abrams yesterday
    
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 yesterday
    
Hello folks is my question bad written or does nobody have an answer? –  BrainWorx yesterday
    
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 yesterday
1  
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 yesterday

1 Answer 1

up vote 0 down vote accepted

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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