remove unused files; fix typo; remove debugging code
This commit is contained in:
parent
dc016769fe
commit
f78b35d06f
|
@ -1,44 +0,0 @@
|
|||
/* This file is part of the MicroPython project, http://micropython.org/
|
||||
* The MIT License (MIT)
|
||||
* Copyright (c) 2022-2023 Damien P. George
|
||||
*/
|
||||
|
||||
#include "port/micropython_embed.h"
|
||||
|
||||
// This is example 1 script, which will be compiled and executed.
|
||||
static const char *example_1 =
|
||||
"print('hello world!', list(x + 1 for x in range(10)), end='eol\\n')";
|
||||
|
||||
// This is example 2 script, which will be compiled and executed.
|
||||
static const char *example_2 =
|
||||
"for i in range(10):\n"
|
||||
" print('iter {:08}'.format(i))\n"
|
||||
"\n"
|
||||
"try:\n"
|
||||
" 1//0\n"
|
||||
"except Exception as er:\n"
|
||||
" print('caught exception', repr(er))\n"
|
||||
"\n"
|
||||
"import gc\n"
|
||||
"print('run GC collect')\n"
|
||||
"gc.collect()\n"
|
||||
"\n"
|
||||
"print('finish')\n"
|
||||
;
|
||||
|
||||
// This array is the MicroPython GC heap.
|
||||
static char heap[8 * 1024];
|
||||
|
||||
int main() {
|
||||
// Initialise MicroPython.
|
||||
mp_embed_init(&heap[0], sizeof(heap));
|
||||
|
||||
// Run the example scripts (they will be compiled first).
|
||||
mp_embed_exec_str(example_1);
|
||||
mp_embed_exec_str(example_2);
|
||||
|
||||
// Deinitialise MicroPython.
|
||||
mp_embed_deinit();
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
# This file is part of the MicroPython project, http://micropython.org/
|
||||
# The MIT License (MIT)
|
||||
# Copyright (c) 2022-2023 Damien P. George
|
||||
|
||||
# Set the location of the top of the MicroPython repository.
|
||||
MICROPYTHON_TOP = ../..
|
||||
|
||||
# Include the main makefile fragment to build the MicroPython component.
|
||||
include $(MICROPYTHON_TOP)/ports/embed/embed.mk
|
|
@ -1,4 +1,4 @@
|
|||
>/*
|
||||
/*
|
||||
* This file is part of the Micro Python project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
|
|
|
@ -34,15 +34,6 @@ extern const mp_obj_module_t usb_core_module;
|
|||
|
||||
void usb_core_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind);
|
||||
|
||||
/*#define MP_DEFINE_USB_CORE_EXCEPTION(exc_name, base_name) \
|
||||
const mp_obj_type_t mp_type_usb_core_##exc_name = { \
|
||||
{ &mp_type_type }, \
|
||||
.name = MP_QSTR_##exc_name, \
|
||||
.print = usb_core_exception_print, \
|
||||
.make_new = mp_obj_exception_make_new, \
|
||||
.attr = mp_obj_exception_attr, \
|
||||
.parent = &mp_type_##base_name, \
|
||||
};*/
|
||||
#define MP_DEFINE_USB_CORE_EXCEPTION(exc_name, base_name) \
|
||||
MP_DEFINE_CONST_OBJ_TYPE(mp_type_usb_core_##exc_name, MP_QSTR_##exc_name, MP_TYPE_FLAG_NONE, \
|
||||
make_new, mp_obj_exception_make_new, \
|
||||
|
|
Loading…
Reference in New Issue