diff options
author | David Crocker <dcrocker@eschertech.com> | 2019-12-16 14:57:49 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2019-12-16 14:57:49 +0300 |
commit | 9ec73aac0702d91fb099dc086f8fb686541c88da (patch) | |
tree | d65a22e29b12d1c22369d0a9a9a29ae6b3c32a2a | |
parent | 0175ccbe94780d94e94c64f0fb894f85881f9d3b (diff) |
Fixes for IAP in RAM
-rw-r--r-- | src/Hardware/Cache.cpp | 1 | ||||
-rw-r--r-- | src/Linux/LinuxInterface.cpp | 8 | ||||
-rw-r--r-- | src/Version.h | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/Hardware/Cache.cpp b/src/Hardware/Cache.cpp index 1726fdd9..81fda123 100644 --- a/src/Hardware/Cache.cpp +++ b/src/Hardware/Cache.cpp @@ -152,6 +152,7 @@ void Cache::Disable() noexcept if (enabled) { #if SAME70 + SCB_CleanDCache(); SCB_DisableICache(); SCB_DisableDCache(); #elif SAM4E diff --git a/src/Linux/LinuxInterface.cpp b/src/Linux/LinuxInterface.cpp index cd9a2343..3b9f73b7 100644 --- a/src/Linux/LinuxInterface.cpp +++ b/src/Linux/LinuxInterface.cpp @@ -15,6 +15,7 @@ #include "Tools/Filament.h" #include "RepRap.h" #include "RepRapFirmware.h" +#include <Hardware/Cache.h> #if HAS_LINUX_INTERFACE @@ -268,6 +269,13 @@ void LinuxInterface::Spin() // Launch the IAP binary case LinuxRequest::StartIap: + reprap.EmergencyStop(); // turn off heaters etc. + Cache::Disable(); // this also flushes the data cache +#if USE_MPU + //TODO consider setting flash memory to strongly-ordered instead + ARM_MPU_Disable(); +#endif + #if !IAP_IN_RAM // Lock the whole IAP flash area again and start the IAP binary flash_lock(IAP_IMAGE_START, IAP_IMAGE_END, nullptr, nullptr); diff --git a/src/Version.h b/src/Version.h index ddba517e..aeab5809 100644 --- a/src/Version.h +++ b/src/Version.h @@ -20,7 +20,7 @@ #endif #ifndef DATE -# define DATE "2019-12-16b1" +# define DATE "2019-12-16b3" #endif #define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d" |