In the embedding-full example, that requires disabling mphal-backed stdio
again as it conflicts with the implementation brought in by
vfs_posix_file.c.
Signed-off-by: Christian Walther <cwalther@gmx.ch>
Optionally adds gmtime, localtime, mktime, time, time_ns to the time
module, implemented using mp_hal_time_ns(). This could also be used by
other ports.
I'm unsure where to put modtime_mphal.h, it could also be in extmod. The
important thing is that for MICROPY_PY_TIME_INCLUDEFILE to work it must be
at the same path in both the port build (original source tree) and the
application build (micropython_embed distribution), therefore not in
ports/embed/port.
It is named .h, mismatching the corresponding ports/*/modtime.c, because it
must not be compiled separately, which naming it .c would make harder for
users of the embed port - they would need to explicitly exclude it, whereas
this way they can continue to just compile all the .c files found in the
micropython_embed distribution except those in lib.
Signed-off-by: Christian Walther <cwalther@gmx.ch>
To include extmod and its dependencies in the output, include the word
"extmod" in make variable EMBED_EXTRA when building the port.
Ideally this would be deduced automatically from the set of modules enabled
in mpconfigport.h (in a more fine-grained way too), but I can't think of a
simple way of achieving that.
Change in mphalport.h: fixes compiler error "type name requires a specifier
or qualifier" in machine_i2c.h, included from machine_i2c.c.
Signed-off-by: Christian Walther <cwalther@gmx.ch>
The implementation of mp_hal_stdout_tx_strn_cooked() does not belong into
the library, but into the embedding application. Some applications may not
want Python output to go straight to their stdout, or may not even have
printf() available.
Signed-off-by: Christian Walther <cwalther@gmx.ch>
It compiles and runs in this state, but a lot of functionality is still
missing, to be extended over the following commits.
Signed-off-by: Christian Walther <cwalther@gmx.ch>