2023-05-01 13:11:19 +00:00
|
|
|
# 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 = ../..
|
|
|
|
|
2023-05-01 14:35:26 +00:00
|
|
|
# Include modules from extmod in the output.
|
|
|
|
EMBED_EXTRA = extmod
|
|
|
|
|
ports/embed: Implement additional time functions.
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>
2023-05-05 17:37:49 +00:00
|
|
|
# Include helper sources for the time module in the output.
|
|
|
|
EMBED_EXTRA += \
|
|
|
|
shared/timeutils/timeutils.c \
|
|
|
|
shared/timeutils/timeutils.h \
|
|
|
|
shared/timeutils/modtime_mphal.h
|
|
|
|
|
2024-03-30 22:26:51 +00:00
|
|
|
# Include source for mphal-backed stdio in the output.
|
|
|
|
# Disable when using POSIX-backed stdio (MICROPY_VFS_POSIX).
|
2024-03-30 22:05:20 +00:00
|
|
|
#EMBED_EXTRA += \
|
|
|
|
# shared/runtime/sys_stdio_mphal.c
|
2024-03-30 22:26:51 +00:00
|
|
|
|
2024-02-25 14:44:49 +00:00
|
|
|
# Include library sources for littlefs 2 in the output.
|
|
|
|
EMBED_EXTRA += littlefs2
|
|
|
|
|
2023-05-03 20:02:30 +00:00
|
|
|
# Freeze Python modules.
|
|
|
|
FROZEN_MANIFEST ?= manifest.py
|
|
|
|
|
2023-05-03 20:45:43 +00:00
|
|
|
# Add C modules.
|
|
|
|
USER_C_MODULES = modules
|
|
|
|
|
2023-05-01 13:11:19 +00:00
|
|
|
# Include the main makefile fragment to build the MicroPython component.
|
|
|
|
include $(MICROPYTHON_TOP)/ports/embed/embed.mk
|