Fix sizeof(VERSION_STRING)
- sizeof(info) should not be increased (16->18) since the size is never exchanged with the I2C master. Also using a non 2^x size will result in bigger code since the compiler can no longer use a simple AND to implement the bcnt %= sizeof(info). - when using a info[16] the firmware is small enough to fit in a 512 word bootloader again :)
This commit is contained in:
parent
31d65c76d7
commit
bc5d45359a
4
Makefile
4
Makefile
@ -42,9 +42,9 @@ endif
|
|||||||
ifeq ($(MCU), atmega328p)
|
ifeq ($(MCU), atmega328p)
|
||||||
# (8Mhz internal RC-Osz., 2.7V BOD)
|
# (8Mhz internal RC-Osz., 2.7V BOD)
|
||||||
AVRDUDE_MCU=m328p -F
|
AVRDUDE_MCU=m328p -F
|
||||||
AVRDUDE_FUSES=lfuse:w:0xc2:m hfuse:w:0xda:m efuse:w:0xfd:m
|
AVRDUDE_FUSES=lfuse:w:0xc2:m hfuse:w:0xdc:m efuse:w:0xfd:m
|
||||||
|
|
||||||
BOOTLOADER_START=0x7800
|
BOOTLOADER_START=0x7C00
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
2
main.c
2
main.c
@ -154,7 +154,7 @@
|
|||||||
* SLA+W, 0x02, 0x02, addrh, addrl, {* bytes}, STO
|
* SLA+W, 0x02, 0x02, addrh, addrl, {* bytes}, STO
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const static uint8_t info[18] = VERSION_STRING;
|
const static uint8_t info[16] = VERSION_STRING;
|
||||||
const static uint8_t chipinfo[8] = {
|
const static uint8_t chipinfo[8] = {
|
||||||
SIGNATURE_BYTES,
|
SIGNATURE_BYTES,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user