diff --git a/README b/README index 9f1ad8f..465e8d5 100644 --- a/README +++ b/README @@ -15,22 +15,14 @@ be in the same directory as the top-level directory of Antorcha. E.g., /home/qi/antorcha/ -/etc/avrdude.conf entry ------------------------ +Avrdude configuration +--------------------- Antorcha uses the atusb programming adapter from the ben-wpan project. Since the pin positions of MISO and MOSI are swapped between ATmega32U2 -and the ATmega168, the following entry is needed in avrdude.conf (which -is the same as the entry for nanonote_atusb except that the pin numbers -for mosi and miso are swapped): +and the ATmega168, we use a modified configuration entry. -programmer - id = "nanonote_antorcha"; - desc = "NanoNote 8:10 card adapter for ATUSB"; - type = nanonote; - reset = 1; - sck = 8; - mosi = 6; - miso = 7; - pgmled = 2; -; +It is passed to avrdude via the new -L option, available with the +Nanonote patches at + +http://projects.qi-hardware.com/index.php/p/ben-blinkenlights/source/tree/master/avrdude diff --git a/fw/Makefile b/fw/Makefile index 642af17..580f540 100644 --- a/fw/Makefile +++ b/fw/Makefile @@ -159,7 +159,7 @@ MKDEP = \ # ----- Programming and device control ---------------------------------------- upload: $(NAME).bin boot.hex - scp $(NAME).bin boot.hex $(HOST): + scp $(NAME).bin boot.hex avrdude-antorcha.conf $(HOST): # lfuse: external clock, slow start-up # hfuse: 4 kB boot loader, reset into boot loader @@ -168,12 +168,14 @@ upload: $(NAME).bin boot.hex # verification. So we just program 0x2f. prog-app: - ssh $(HOST) avrdude -F -p $(CHIP) -c nanonote_antorcha -e \ + ssh $(HOST) avrdude -F -p $(CHIP) \ + -L avrdude-antorcha.conf -c nanonote_antorcha -e \ -U flash:w:antorcha.bin:r # -U lfuse:w:0x60:m prog: - ssh $(HOST) avrdude -F -p $(CHIP) -c nanonote_antorcha -e \ + ssh $(HOST) avrdude -F -p $(CHIP) \ + -L avrdude-antorcha.conf -c nanonote_antorcha -e \ -U flash:w:boot.hex:i \ -U efuse:w:0x00:m \ -U lfuse:w:0xe2:m diff --git a/fw/avrdude-antorcha.conf b/fw/avrdude-antorcha.conf new file mode 100644 index 0000000..b63bf4b --- /dev/null +++ b/fw/avrdude-antorcha.conf @@ -0,0 +1,10 @@ +programmer + id = "nanonote_antorcha"; + desc = "NanoNote 8:10 card adapter for ATUSB"; + type = nanonote; + reset = 1; + sck = 8; + mosi = 6; + miso = 7; + pgmled = 2; +;