atmel-samd: correctly reset the REPL history on reload. Fixes #141

This commit is contained in:
Scott Shawcroft 2017-05-24 10:53:04 -07:00
parent b444788451
commit 3cad7b7b03
1 changed files with 3 additions and 0 deletions

View File

@ -125,6 +125,9 @@ void reset_mp(void) {
disk_ioctl(1, CTRL_SYNC, NULL);
disk_ioctl(2, CTRL_SYNC, NULL);
// Clear the readline history. It references the heap we're about to destroy.
readline_init0();
#if MICROPY_ENABLE_GC
gc_init(heap, heap + sizeof(heap));
#endif