From 6c13225f49dcf4024d7747cbfe80c493c889aefe Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Fri, 9 Nov 2018 10:45:16 +0100 Subject: [PATCH] Fix PFW651 - cannot upload MK3 languages with slic3r (firmware compiled on linux arduino 1.8.5 + lto) --- Firmware/optiboot_w25x20cl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Firmware/optiboot_w25x20cl.cpp b/Firmware/optiboot_w25x20cl.cpp index d05ae59f..dad697ea 100644 --- a/Firmware/optiboot_w25x20cl.cpp +++ b/Firmware/optiboot_w25x20cl.cpp @@ -130,7 +130,7 @@ void optiboot_w25x20cl_enter() } // Send the initial magic string. while (ptr != end) - putch(pgm_read_byte_far(ptr ++)); + putch(pgm_read_byte(ptr ++)); watchdogReset(); // Wait for one second until a magic string (constant entry_magic) is received // from the serial line. @@ -145,7 +145,7 @@ void optiboot_w25x20cl_enter() return; } ch = UDR0; - if (pgm_read_byte_far(ptr ++) != ch) + if (pgm_read_byte(ptr ++) != ch) // Magic was not received correctly, continue with the application return; watchdogReset(); @@ -153,7 +153,7 @@ void optiboot_w25x20cl_enter() // Send the cfm magic string. ptr = entry_magic_cfm; while (ptr != end) - putch(pgm_read_byte_far(ptr ++)); + putch(pgm_read_byte(ptr ++)); } spi_init();