diff --git a/ion/src/device/bootloader/drivers/external_flash_tramp.cpp b/ion/src/device/bootloader/drivers/external_flash_tramp.cpp index 29a2bf03e..2116c5034 100644 --- a/ion/src/device/bootloader/drivers/external_flash_tramp.cpp +++ b/ion/src/device/bootloader/drivers/external_flash_tramp.cpp @@ -371,13 +371,13 @@ void MassErase() { void WriteMemory(uint8_t * destination, const uint8_t * source, size_t length) { asm("cpsid if"); - reinterpret_cast(Ion::Device::Trampoline::address(Ion::Device::Trampoline::ExternalFlashWriteMemory))(destination, source, length); + (*reinterpret_cast(Ion::Device::Trampoline::address(Ion::Device::Trampoline::ExternalFlashWriteMemory)))(destination, source, length); asm("cpsie if"); } void EraseSector(int i) { asm("cpsid if"); - reinterpret_cast(Ion::Device::Trampoline::address(Ion::Device::Trampoline::ExternalFlashEraseSector))(i); + (*reinterpret_cast(Ion::Device::Trampoline::address(Ion::Device::Trampoline::ExternalFlashEraseSector)))(i); asm("cpsie if"); } diff --git a/ion/src/device/bootloader/drivers/power.cpp b/ion/src/device/bootloader/drivers/power.cpp index f38f9e978..5680bb30f 100644 --- a/ion/src/device/bootloader/drivers/power.cpp +++ b/ion/src/device/bootloader/drivers/power.cpp @@ -79,7 +79,7 @@ void __attribute__((noinline)) internalFlashStandby() { } void enterLowPowerMode() { - reinterpret_cast(Ion::Device::Trampoline::address(Ion::Device::Trampoline::Suspend))(); + (*reinterpret_cast(Ion::Device::Trampoline::address(Ion::Device::Trampoline::Suspend)))(); } }