diff --git a/pureboot/pureboot.cpp b/pureboot/pureboot.cpp index 7881008..9dd36db 100644 --- a/pureboot/pureboot.cpp +++ b/pureboot/pureboot.cpp @@ -488,8 +488,7 @@ void fill_page(std::uint8_t bank, std::uint16_t at) // address is a word address and a slot is half as many words as bytes, so // its high byte is the slot index outright. No absolute address is ever // formed, so the image stays position-independent. - const auto return_words = reinterpret_cast(__builtin_return_address(0)); - const auto slot_high = static_cast(return_words >> 8); + const auto slot_high = avr::startup::caller_page(); await_host();