From 388360a35dbbca529a63bfac9d72d6b2360d2eae Mon Sep 17 00:00:00 2001 From: mfunkey Date: Sat, 25 Dec 2021 11:28:24 +0100 Subject: [PATCH 1/3] Add TXC0 define to make rs485 usable on atmega8 --- optiboot/bootloaders/optiboot/pin_defs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/optiboot/bootloaders/optiboot/pin_defs.h b/optiboot/bootloaders/optiboot/pin_defs.h index f3414c1..41bfc57 100644 --- a/optiboot/bootloaders/optiboot/pin_defs.h +++ b/optiboot/bootloaders/optiboot/pin_defs.h @@ -106,6 +106,7 @@ #define UDR0 UDR #define UDRE0 UDRE #define RXC0 RXC + #define TXC0 TXC #define FE0 FE #define TIFR1 TIFR #define WDTCSR WDTCR From 7676d8fc060ed5cfd58a30126455ac15bc53d2d9 Mon Sep 17 00:00:00 2001 From: 2ijies11 Date: Mon, 7 Mar 2022 14:46:16 +0000 Subject: [PATCH 2/3] Fix register for SOFT_UART (PINx -> PORTx) --- optiboot/bootloaders/optiboot/optiboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optiboot/bootloaders/optiboot/optiboot.c b/optiboot/bootloaders/optiboot/optiboot.c index 0774d00..dec9c45 100644 --- a/optiboot/bootloaders/optiboot/optiboot.c +++ b/optiboot/bootloaders/optiboot/optiboot.c @@ -905,7 +905,7 @@ int main(void) { #if SOFT_UART /* Set TX pin as HIGH output */ - UART_PIN |= _BV(UART_TX_BIT); + UART_PORT |= _BV(UART_TX_BIT); UART_DDR |= _BV(UART_TX_BIT); #endif From d54168317a6600825c51389190de487f6a3f1731 Mon Sep 17 00:00:00 2001 From: Ondrej Stanek Date: Mon, 4 Apr 2022 13:27:05 +0200 Subject: [PATCH 3/3] Fix lock fuse verification step in the ISP target The fuse bits value has to be prefixed with `0x`, otherwise, avrdude treats it as a filename and the lock fuse write fails. --- optiboot/bootloaders/optiboot/Makefile.isp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optiboot/bootloaders/optiboot/Makefile.isp b/optiboot/bootloaders/optiboot/Makefile.isp index 1d792b0..84a3b4e 100644 --- a/optiboot/bootloaders/optiboot/Makefile.isp +++ b/optiboot/bootloaders/optiboot/Makefile.isp @@ -72,7 +72,7 @@ ISPFUSES = -e -u -U lock:w:0x$(LOCKFUSE):m $(EFUSE_CMD) \ # space from accidental SPM writes. Note: "2f" allows boot section to be read # by the application, which is different than the arduino default. # -ISPFLASH = -U flash:w:$(FILENAME) -U lock:w:$(LOCKFUSE):m +ISPFLASH = -U flash:w:$(FILENAME) -U lock:w:0x$(LOCKFUSE):m # There are certain complicated caused by the fact that the default state # of a fuse is a "1" rather than a "0", especially with respect to fuse bits