zephyr: Enable building of modsocket.
parent
316f42bdc1
commit
efed2dd984
|
@ -32,17 +32,23 @@ INC += -I.
|
|||
INC += -I..
|
||||
INC += -I$(BUILD)
|
||||
INC += -I$(ZEPHYR_BASE)/include -I$(ZEPHYR_BASE) \
|
||||
-I$(ZEPHYR_BASE)/net/ip -I$(ZEPHYR_BASE)/net/ip/contiki -I$(ZEPHYR_BASE)/net/ip/contiki/os \
|
||||
-Ioutdir/$(OUTDIR_PREFIX)/misc/generated/sysgen \
|
||||
-I$(dir $(Z_AUTOCONF_H))
|
||||
|
||||
SRC_C = main.c \
|
||||
uart_core.c \
|
||||
modsocket.c \
|
||||
lib/utils/stdout_helpers.c \
|
||||
lib/utils/printf.c \
|
||||
lib/utils/pyexec.c \
|
||||
lib/mp-readline/readline.c \
|
||||
lib/netutils/netutils.c \
|
||||
$(SRC_MOD)
|
||||
|
||||
# List of sources for qstr extraction
|
||||
SRC_QSTR += $(SRC_C)
|
||||
|
||||
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||
|
||||
COPT = -Os -DNDEBUG -fdata-sections -ffunction-sections
|
||||
|
|
|
@ -47,5 +47,10 @@ typedef long mp_off_t;
|
|||
#define MICROPY_PORT_ROOT_POINTERS \
|
||||
const char *readline_hist[8];
|
||||
|
||||
extern const struct _mp_obj_module_t mp_module_socket;
|
||||
|
||||
#define MICROPY_PORT_BUILTIN_MODULES \
|
||||
{ MP_ROM_QSTR(MP_QSTR_usocket), MP_ROM_PTR(&mp_module_socket) }, \
|
||||
|
||||
// Include Zephyr's autoconf.h, which should be made first by Zephyr makefiles
|
||||
#include "autoconf.h"
|
||||
|
|
Loading…
Reference in New Issue