diff --git a/pureboot/pureboot.cpp b/pureboot/pureboot.cpp index 5288d08..17c3d26 100644 --- a/pureboot/pureboot.cpp +++ b/pureboot/pureboot.cpp @@ -72,13 +72,24 @@ constexpr std::uint8_t version = 4; // The 'b' reply, byte for byte (layout: README.md). Flash-resident because // no crt copies a .data image — and flash_table's storage carries the word // alignment 'b' needs to halve the address on the large chips. +// One wire byte per line: this is the reply's layout, not a list. +// clang-format off inline constexpr avr::flash_table{ - 'P', 'B', version, avr::hw::db.signature[0], avr::hw::db.signature[1], avr::hw::db.signature[2], - static_cast(page), // 0 means 256 - wire_base & 0xff, wire_base >> 8, avr::hw::db.mem.eeprom_size & 0xff, avr::hw::db.mem.eeprom_size >> 8, - static_cast((boot_section ? 0 : 1) | (word_flash ? 2 : 0)), // patch-vector, word-addressed + 'P', + 'B', + version, + avr::hw::db.signature[0], + avr::hw::db.signature[1], + avr::hw::db.signature[2], + static_cast(page), // 0 means 256 + wire_base & 0xff, + wire_base >> 8, + avr::hw::db.mem.eeprom_size & 0xff, + avr::hw::db.mem.eeprom_size >> 8, + static_cast((boot_section ? 0 : 1) | (word_flash ? 2 : 0)), // patch-vector, word-addressed }> info_data; +// clang-format on // The serial link, per the build's PUREBOOT_USART / PUREBOOT_SOFT_SERIAL, // defaulting to the chip's USART0 where it has one. The software receiver is