Skip to content
This repository was archived by the owner on Jul 9, 2020. It is now read-only.

Commit 9ec73aa

Browse files
committed
Fixes for IAP in RAM
1 parent 0175ccb commit 9ec73aa

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/Hardware/Cache.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ void Cache::Disable() noexcept
152152
if (enabled)
153153
{
154154
#if SAME70
155+
SCB_CleanDCache();
155156
SCB_DisableICache();
156157
SCB_DisableDCache();
157158
#elif SAM4E

src/Linux/LinuxInterface.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "Tools/Filament.h"
1616
#include "RepRap.h"
1717
#include "RepRapFirmware.h"
18+
#include <Hardware/Cache.h>
1819

1920
#if HAS_LINUX_INTERFACE
2021

@@ -268,6 +269,13 @@ void LinuxInterface::Spin()
268269

269270
// Launch the IAP binary
270271
case LinuxRequest::StartIap:
272+
reprap.EmergencyStop(); // turn off heaters etc.
273+
Cache::Disable(); // this also flushes the data cache
274+
#if USE_MPU
275+
//TODO consider setting flash memory to strongly-ordered instead
276+
ARM_MPU_Disable();
277+
#endif
278+
271279
#if !IAP_IN_RAM
272280
// Lock the whole IAP flash area again and start the IAP binary
273281
flash_lock(IAP_IMAGE_START, IAP_IMAGE_END, nullptr, nullptr);

src/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#endif
2121

2222
#ifndef DATE
23-
# define DATE "2019-12-16b1"
23+
# define DATE "2019-12-16b3"
2424
#endif
2525

2626
#define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d"

0 commit comments

Comments
 (0)