저는 테스트 보드로 AVR Atmega 16u2 마이크로 컨트롤러가 장착 된 Arduino UNO R3을 사용하여 GNU/Linux에서 Arduino를위한 어셈블리 프로그래밍에 대해 배우고 있습니다. 이 글에서 읽으면서Arduino UNO R3 (atmega 16u2)에 조립하는 방법은 무엇입니까?
https://www.cypherpunk.at/2014/09/native-assembler-programming-on-arduino/의 지시가 있어야합니다 :이 두 번째 명령을 실행하려고 할 때
avr-as -g -mmcu=atmega16u2 -o simple_led_blink.o simple_led_blink.s
이
avr-ld -o simple_led_blink.elf simple_led_blink.o
#됐다 링크
를 조립하지만 #됐다,이 표시 오류 :
avr-ld: avr:35 architecture of input file `simple_led_blink.o' is incompatible with avr output
내가했습니다 채널 아키텍처 지원으로 avr-as를 사용했으며이 아키텍처가 지원됩니다.
무엇이 문제 일 수 있습니까?
업데이트 : 다윗이 말한대로 마지막으로, 주요 마이크로 컨트롤러는 328p하지 16u2 내가 가이드에 기록 된 같은 지침을 사용이며,이 avr-gcc test.c -v -mmcu=atmega16u2
을 실행하면 잘
mcu'atmega16u2'에서는 작동하지 않습니다. 'atmega328'로 시도하십시오 – Sniper
@Sniper atmega328이 실행되지만 보드에 atmega16u2가 있습니다. – AlmuHS