Skip to content

Commit 09ccc55

Browse files
author
Prince
committed
update optiboot
1 parent ff4c0d4 commit 09ccc55

File tree

13 files changed

+308
-50
lines changed

13 files changed

+308
-50
lines changed

Projects/HomeAutomation/Webserver/Webserver.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void setup() {
2525
// main thread runs at NORMALPRIO
2626
void mainThread() {
2727

28-
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 3, Thread1, NULL);
28+
//chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO + 3, Thread1, NULL);
2929

3030
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO + 2, Thread2, NULL);
3131

hardware/optiboot/avr/bootloaders/optiboot/Makefile

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
# Set many variables with ?= so they can be overridden
3535
# Use arduinoISP settings as default for ISP targets
3636
#
37+
#
38+
# * Copyright 2013-2015 by Bill Westfield. Part of Optiboot.
39+
# * This software is licensed under version 2 of the Gnu Public Licence.
40+
# * See optiboot.c for details.
3741

3842
#----------------------------------------------------------------------
3943
#
@@ -183,15 +187,15 @@ dummy = FORCE
183187
endif
184188

185189
ifdef SINGLESPEED
186-
SSCMD = -DSINGLESPEED=1
190+
SS_CMD = -DSINGLESPEED=1
187191
endif
188192

189193
COMMON_OPTIONS = $(BAUD_RATE_CMD) $(LED_START_FLASHES_CMD) $(BIGBOOT_CMD)
190-
COMMON_OPTIONS += $(SOFT_UART_CMD) $(LED_DATA_FLASH_CMD) $(LED_CMD) $(SSCMD)
194+
COMMON_OPTIONS += $(SOFT_UART_CMD) $(LED_DATA_FLASH_CMD) $(LED_CMD) $(SS_CMD)
191195

192196
#UART is handled separately and only passed for devices with more than one.
193197
ifdef UART
194-
UARTCMD = -DUART=$(UART)
198+
UART_CMD = -DUART=$(UART)
195199
endif
196200

197201
# Not supported yet
@@ -232,13 +236,34 @@ endif
232236

233237
# Test platforms
234238
# Virtual boot block test
239+
virboot8: TARGET = atmega8
240+
virboot8: MCU_TARGET = atmega8
241+
virboot8: CFLAGS += $(COMMON_OPTIONS) '-DVIRTUAL_BOOT_PARTITION' '-Dsave_vect_num=EE_RDY_vect_num'
242+
virboot8: AVR_FREQ ?= 16000000L
243+
virboot8: LDSECTIONS = -Wl,--section-start=.text=0x1c00 -Wl,--section-start=.version=0x1ffe
244+
virboot8: $(PROGRAM)_virboot8.hex
245+
virboot8: $(PROGRAM)_virboot8.lst
246+
247+
235248
virboot328: TARGET = atmega328
236249
virboot328: MCU_TARGET = atmega328p
237-
virboot328: CFLAGS += $(COMMON_OPTIONS) '-DVIRTUAL_BOOT'
250+
virboot328: CFLAGS += $(COMMON_OPTIONS) '-DVIRTUAL_BOOT_PARTITION'
238251
virboot328: AVR_FREQ ?= 16000000L
239-
virboot328: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
240-
virboot328: $(PROGRAM)_atmega328.hex
241-
virboot328: $(PROGRAM)_atmega328.lst
252+
virboot328: LDSECTIONS = -Wl,--section-start=.text=0x7d80 -Wl,--section-start=.version=0x7ffe
253+
virboot328: $(PROGRAM)_virboot328.hex
254+
virboot328: $(PROGRAM)_virboot328.lst
255+
256+
virboot328_isp: virboot328
257+
virboot328_isp: TARGET = virboot328
258+
virboot328_isp: MCU_TARGET = atmega328p
259+
# no boot section, SPIEN
260+
virboot328_isp: HFUSE ?= DF
261+
# Low power xtal (16MHz) 16KCK/14CK+65ms
262+
virboot328_isp: LFUSE ?= FF
263+
# 2.7V brownout
264+
virboot328_isp: EFUSE ?= 05
265+
virboot328_isp: isp
266+
242267

243268
# Diecimila, Duemilanove with m168, and NG use identical bootloaders
244269
# Call it "atmega168" for generality and clarity, keep "diecimila" for

hardware/optiboot/avr/bootloaders/optiboot/Makefile.1284

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#
22
# Makefile for 40-pin AVR chips, including ATmega644 and ATmega1284
33
#
4+
# * Copyright 2013-2015 by Bill Westfield. Part of Optiboot.
5+
# * This software is licensed under version 2 of the Gnu Public Licence.
6+
# * See optiboot.c for details.
47

58
# Chip level targets
69
#
@@ -9,7 +12,7 @@ atmega644p: MCU_TARGET = atmega644p
912
atmega644p: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT
1013
atmega644p: AVR_FREQ ?= 16000000L
1114
atmega644p: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
12-
atmega644p: CFLAGS += $(UARTCMD)
15+
atmega644p: CFLAGS += $(UART_CMD)
1316
atmega644p: $(PROGRAM)_atmega644p.hex
1417
atmega644p: $(PROGRAM)_atmega644p.lst
1518

@@ -18,7 +21,7 @@ atmega1284: MCU_TARGET = atmega1284p
1821
atmega1284: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT
1922
atmega1284: AVR_FREQ ?= 16000000L
2023
atmega1284: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
21-
atmega1284: CFLAGS += $(UARTCMD)
24+
atmega1284: CFLAGS += $(UART_CMD)
2225
atmega1284: $(PROGRAM)_atmega1284p.hex
2326
atmega1284: $(PROGRAM)_atmega1284p.lst
2427

hardware/optiboot/avr/bootloaders/optiboot/Makefile.custom

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#
22
# Makefile for "custom" platforms. Add your board here.
33
#
4+
# * Copyright 2013-2015 by Bill Westfield. Part of Optiboot.
5+
# * This software is licensed under version 2 of the Gnu Public Licence.
6+
# * See optiboot.c for details.
47

58

69
wildfire: TARGET = $@

hardware/optiboot/avr/bootloaders/optiboot/Makefile.extras

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#
22
# Makefile for "other" implemented platforms.
33
#
4+
# * Copyright 2013-2015 by Bill Westfield. Part of Optiboot.
5+
# * This software is licensed under version 2 of the Gnu Public Licence.
6+
# * See optiboot.c for details.
7+
#
48

59
#
610
# Extra chips (maybe) supported by optiboot
@@ -40,7 +44,29 @@ atmega88p_isp: LFUSE ?= FF
4044
atmega88p_isp: EFUSE ?= 04
4145
atmega88p_isp: isp
4246

47+
#
48+
# ATmega168p [QFN32]
49+
#
50+
atmega168p: TARGET = atmega168p
51+
atmega168p: MCU_TARGET = atmega168p
52+
atmega168p: CFLAGS += $(COMMON_OPTIONS)
53+
atmega168p: AVR_FREQ ?= 16000000L
54+
atmega168p: $(PROGRAM)_atmega168p_16MHz.hex
55+
atmega168p: $(PROGRAM)_atmega168p_16MHz.lst
56+
57+
atmega168p_isp: atmega168p
58+
atmega168p_isp: TARGET = atmega168p
59+
# 2.7V brownout
60+
atmega168p_isp: HFUSE ?= DD
61+
# Low power xtal (16MHz) 16KCK/14CK+65ms
62+
atmega168p_isp: LFUSE ?= FF
63+
# 512 byte boot
64+
atmega168p_isp: EFUSE ?= 04
65+
atmega168p_isp: isp
4366

67+
#
68+
# ATmega32
69+
#
4470
atmega32: TARGET = atmega32
4571
atmega32: MCU_TARGET = atmega32
4672
atmega32: CFLAGS += $(COMMON_OPTIONS)
@@ -58,6 +84,11 @@ atmega32_isp: HFUSE ?= CE
5884
atmega32_isp: LFUSE ?= BF
5985
atmega32_isp: isp
6086

87+
88+
89+
#
90+
# ATtiny84
91+
#
6192
attiny84: TARGET = attiny84
6293
attiny84: MCU_TARGET = attiny84
6394
attiny84: CFLAGS += $(COMMON_OPTIONS) -DSOFT_UART -DVIRTUAL_BOOT_PARTITION

hardware/optiboot/avr/bootloaders/optiboot/Makefile.isp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@
1414
# make lilypad_isp
1515
# make ng_isp
1616
# etc...
17-
17+
#
1818
#
1919
# Note: inherit paths/etc from parent Makefile.
2020
#
21-
21+
#---------------------------------------------------------------------------
22+
#
23+
# * Copyright 2013-2015 by Bill Westfield. Part of Optiboot.
24+
# * This software is licensed under version 2 of the Gnu Public Licence.
25+
# * See optiboot.c for details.
26+
#
2227
#---------------------------------------------------------------------------
2328

2429
# enter the parameters for the avrdude isp tool -b19200

hardware/optiboot/avr/bootloaders/optiboot/README.TXT

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@ This directory contains the Optiboot small bootloader for AVR
22
microcontrollers, somewhat modified specifically for the Arduino
33
environment.
44

5-
Optiboot is more fully described here: http://code.google.com/p/optiboot/
5+
Optiboot is more fully described here: http://github.com/Optiboot/optiboot
66
and is the work of Peter Knight (aka Cathedrow), building on work of Jason P
7-
Kyle, Spiff, and Ladyada. Arduino-specific modification are by Bill
8-
Westfield (aka WestfW)
7+
Kyle, Spiff, and Ladyada. More recent maintenance and modifications are by
8+
Bill Westfield (aka WestfW)
99

1010
Arduino-specific issues are tracked as part of the Arduino project
11-
at http://code.google.com/p/arduino
11+
at http://github.com/arduino/Arduino
1212

1313

14+
Most of the information in this file is superceeded by the wiki content at
15+
https://github.com/Optiboot/optiboot/wiki
16+
17+
It's till here "just in case."
18+
1419
------------------------------------------------------------
20+
1521
Building optiboot for Arduino.
1622

1723
Production builds of optiboot for Arduino are done on a Mac in "unix mode"

hardware/optiboot/avr/bootloaders/optiboot/baudcheck.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
* writes the desired output...
1212
*
1313
* Note that the C-style comments are stripped by the C preprocessor.
14+
*
15+
* Copyright 2013-2015 by Bill Westfield.
16+
* This software is licensed under version 2 of the Gnu Public Licence.
17+
* See optiboot.c for details.
1418
*/
1519

1620
/*

hardware/optiboot/avr/bootloaders/optiboot/makeall

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ make wildfirev2
1616
make atmega1284
1717
make atmega32
1818
make atmega88
19+
make atmega168p
1920

2021
#
2122
# The "big three" standard bootloaders.

0 commit comments

Comments
 (0)