rgoel / optiboot

Automatically exported from code.google.com/p/optiboot
0 stars 0 forks source link

Code for ATmega168P #67

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
The version for ATmega168 will work on ATmega168P but signature bytes are 
different

What is the expected output? What do you see instead?
1E 94 0B (for ATmega168P) but is 1E 94 06 (for ATmega168)

What version of the product are you using? On what operating system?
optiboot 4.5

Please provide any additional information below.

To fix the signature bytes I've made the following changes:

1. in the pin_defs.h file the first line changed to:
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || 
defined(__AVR_ATmega328P__) || defined(__AVR_ATmega88) || 
defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__)

2. in the file optiboot.c the I've changed the line:
#if defined(__AVR_ATmega168__)
to:
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__)

3. I've added an entry in the Makefile:
atmega168p: TARGET = atmega168p
atmega168p: MCU_TARGET = atmega168p
atmega168p: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200'
atmega168p: AVR_FREQ = 16000000L 
atmega168p: $(PROGRAM)_atmega168p.hex
atmega168p: $(PROGRAM)_atmega168p.lst

atmega168p_isp: atmega168p
atmega168p_isp: TARGET = atmega168p
#2.7V brownout
atmega168p_isp: HFUSE = DD
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega168p_isp: LFUSE = FF
#512 byte boot
atmega168p_isp: EFUSE = 04
atmega168p_isp: isp

Original issue reported on code.google.com by calin.ra...@gmail.com on 8 May 2012 at 6:25

GoogleCodeExporter commented 8 years ago
For the 328 (vs 328p), which is in a similar state, I've been suggesting that 
only the "burn" procedure be changed (burn the 328p bootloader into a 328, or 
in this case, burn the 168 bootloader into a 168p.)  Thereafter, the bootloader 
will lie about the signature, but that's somewhere between "ok" and 
"desirable", at least WRT Arduino, since the compiler provided doesn't support 
328 (though it does seem to support 168p.)

Original comment by wes...@gmail.com on 17 May 2012 at 5:44

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Too bad this is not included in the official source...
Until then, we have to rely on the Calin's article here 
http://letsmakerobots.com/node/32523

Original comment by funl...@gmail.com on 25 Aug 2013 at 8:32

GoogleCodeExporter commented 8 years ago

Original comment by wes...@gmail.com on 28 Jun 2014 at 9:41

GoogleCodeExporter commented 8 years ago

Original comment by wes...@gmail.com on 28 Jun 2014 at 9:41