Newer
Older
#include "py/runtime.h"
#include "py/gc.h"
#include "lib/utils/pyexec.h"
#include "py/stackctrl.h"
#include <stdio.h>
/* Defined in linker script */
extern void *__StackTop, *__StackLimit;
extern void *__HeapBase, *__HeapLimit;
if (0) {
mp_stack_set_top(&__StackTop);
mp_stack_set_limit((mp_int_t)&__StackLimit);
}
/* TMR5 is used to notify on keyboard interrupt */
NVIC_EnableIRQ(TMR5_IRQn);
mp_init();
pyexec_friendly_repl();
mp_deinit();
sp,
((mp_uint_t)&__StackTop - (mp_uint_t)sp) / sizeof(mp_uint_t)