Compare commits
No commits in common. "master" and "devel" have entirely different histories.
10
README.md
10
README.md
@ -10,11 +10,11 @@ Currently the following AVR MCUs are supported:
|
||||
|
||||
AVR MCU | Flash bytes used (.text + .data) | Bootloader region size
|
||||
--- | --- | ---
|
||||
attiny85 | 954 (0x3BA) | 512 words
|
||||
atmega8 | 786 (0x312) | 512 words
|
||||
atmega88 | 810 (0x32A) | 512 words
|
||||
atmega168 | 810 (0x32A) | 512 words
|
||||
atmega328p | 810 (0x32A) | 512 words
|
||||
attiny85 | 956 (0x3BC) | 512 words
|
||||
atmega8 | 802 (0x322) | 512 words
|
||||
atmega88 | 826 (0x33A) | 512 words
|
||||
atmega168 | 826 (0x33A) | 512 words
|
||||
atmega328p | 826 (0x33A) | 512 words
|
||||
|
||||
(Compiled on Ubuntu 18.04 LTS (gcc 5.4.0 / avr-libc 2.0.0) with EEPROM and LED support)
|
||||
|
||||
|
14
main.c
14
main.c
@ -21,7 +21,7 @@
|
||||
#include <avr/boot.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#define VERSION_STRING "TWIBOOT v3.2"
|
||||
#define VERSION_STRING "TWIBOOT v3.1"
|
||||
#define EEPROM_SUPPORT 1
|
||||
#define LED_SUPPORT 1
|
||||
|
||||
@ -400,9 +400,14 @@ static uint8_t TWI_data_write(uint8_t bcnt, uint8_t data)
|
||||
uint8_t pos = bcnt -4;
|
||||
|
||||
buf[pos] = data;
|
||||
if (pos >= (SPM_PAGESIZE -1))
|
||||
if (pos >= (sizeof(buf) -2))
|
||||
{
|
||||
if (cmd == CMD_ACCESS_FLASH)
|
||||
ack = 0x00;
|
||||
}
|
||||
|
||||
if ((cmd == CMD_ACCESS_FLASH) &&
|
||||
(pos >= (sizeof(buf) -1))
|
||||
)
|
||||
{
|
||||
#if (USE_CLOCKSTRETCH)
|
||||
write_flash_page();
|
||||
@ -410,9 +415,6 @@ static uint8_t TWI_data_write(uint8_t bcnt, uint8_t data)
|
||||
cmd = CMD_WRITE_FLASH_PAGE;
|
||||
#endif
|
||||
}
|
||||
|
||||
ack = 0x00;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user