diff options
Diffstat (limited to 'src/Hardware/ExceptionHandlers.cpp')
-rw-r--r-- | src/Hardware/ExceptionHandlers.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Hardware/ExceptionHandlers.cpp b/src/Hardware/ExceptionHandlers.cpp index 7253f5cf..640c0a41 100644 --- a/src/Hardware/ExceptionHandlers.cpp +++ b/src/Hardware/ExceptionHandlers.cpp @@ -8,6 +8,7 @@ #include "ExceptionHandlers.h" #include <Platform/RepRap.h> #include <Platform/Platform.h> +#include <Platform/Tasks.h> #include <Hardware/NonVolatileMemory.h> #include <Cache.h> #if SAME70 || SAM4S || SAM4E @@ -62,10 +63,10 @@ } // Record the reason for the software reset - NonVolatileMemory mem; - SoftwareResetData * const srd = mem.AllocateResetDataSlot(); + NonVolatileMemory * const mem = new(Tasks::GetNVMBuffer(stk)) NonVolatileMemory; + SoftwareResetData * const srd = mem->AllocateResetDataSlot(); srd->Populate(fullReason, stk); - mem.EnsureWritten(); + mem->EnsureWritten(); } #if defined(__LPC17xx__) |