zephyr: Enable building of modsocket.

better-build-2
Paul Sokolovsky 2016-09-13 12:20:04 +03:00
parent 316f42bdc1
commit efed2dd984
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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"