summaryrefslogtreecommitdiff
path: root/stmhal/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-25 14:18:18 +0000
committerDamien George <damien.p.george@gmail.com>2014-03-25 14:18:18 +0000
commitcaac542b235003f7b79d7aa23eaebe8f2c772508 (patch)
treef70b42312f091b10c9e3d871fe1a70d573e7cba4 /stmhal/main.c
parent1dfde891e3e26543da6d42215da6a23c32b0a8bc (diff)
Proper support for registering builtin modules in ROM.
Comes with some refactoring of code and renaming of files. All modules are now named mod*.[ch].
Diffstat (limited to 'stmhal/main.c')
-rw-r--r--stmhal/main.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/stmhal/main.c b/stmhal/main.c
index a231ca250..ab96dcdef 100644
--- a/stmhal/main.c
+++ b/stmhal/main.c
@@ -21,9 +21,6 @@
#include "gc.h"
#include "gccollect.h"
#include "pyexec.h"
-#include "pybmodule.h"
-#include "osmodule.h"
-#include "timemodule.h"
#include "usart.h"
#include "led.h"
#include "exti.h"
@@ -110,6 +107,7 @@ static const char fresh_boot_py[] =
"# boot.py -- run on boot-up\n"
"# can run arbitrary Python, but best to keep it minimal\n"
"\n"
+"import pyb\n"
"pyb.source_dir('/src')\n"
"pyb.main('main.py')\n"
"#pyb.usb_usr('VCP')\n"
@@ -246,15 +244,6 @@ soft_reset:
pin_map_init();
- // we pre-import the pyb module
- // probably shouldn't do this, so we are compatible with CPython
- rt_store_name(MP_QSTR_pyb, (mp_obj_t)&pyb_module);
-
- // pre-import the os and time modules
- // TODO don't do this! (need a way of registering builtin modules...)
- rt_store_name(MP_QSTR_os, (mp_obj_t)&os_module);
- rt_store_name(MP_QSTR_time, (mp_obj_t)&time_module);
-
// check if user switch held (initiates reset of filesystem)
bool reset_filesystem = false;
#if MICROPY_HW_HAS_SWITCH