diff options
| author | Damien George | 2014-09-01 22:48:57 +0100 |
|---|---|---|
| committer | Damien George | 2014-09-01 22:52:38 +0100 |
| commit | bcf041f1a33d20a12b1cfbfe434c0b2c69f0e5b3 (patch) | |
| tree | ad8f12681af5dae7dd3f2a1f41b09a9c9435a688 /stmhal/Makefile | |
| parent | cdd40f149a5c5a628bc1cf2181d6d16382e66757 (diff) | |
stmhal: Add wiznet5k module, to control WIZnet ethernet adaptor.
Allows to create socket objects that support TCP and UDP in server and
client mode. Interface is very close to standard Python socket class,
except bind and accept do not work the same (due to hardware not
supporting them in the usual way).
Not compiled by default. To compile this module, use:
make MICROPY_PY_WIZNET5K=1
Diffstat (limited to 'stmhal/Makefile')
| -rw-r--r-- | stmhal/Makefile | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile index 707b898a5..a918b1cc0 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -9,6 +9,7 @@ endif BUILD ?= build-$(BOARD) include ../py/mkenv.mk +-include mpconfigport.mk # qstr definitions (must come before including py.mk) QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h @@ -41,7 +42,7 @@ INC += -I$(FATFS_DIR)/src INC += -I$(CC3K_DIR) CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion -CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT) +CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT) CFLAGS += -Iboards/$(BOARD) LDFLAGS = -nostdlib -T stm32f405.ld -Map=$(@:.elf=.map) --cref @@ -196,6 +197,19 @@ SRC_CC3K = $(addprefix $(CC3K_DIR)/,\ pybcc3k.c \ ) +ifeq ($(MICROPY_PY_WIZNET5K),1) +WIZNET5K_DIR=drivers/wiznet5k +INC += -I$(TOP)/$(WIZNET5K_DIR) +CFLAGS_MOD += -DMICROPY_PY_WIZNET5K=1 +SRC_MOD += modwiznet5k.c +SRC_MOD += $(addprefix $(WIZNET5K_DIR)/,\ + ethernet/w5200/w5200.c \ + ethernet/wizchip_conf.c \ + ethernet/socket.c \ + internet/dns/dns.c \ + ) +endif + OBJ = OBJ += $(PY_O) OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o)) @@ -205,6 +219,7 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_HAL:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_USBDEV:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_FATFS:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_CC3K:.c=.o)) +OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) OBJ += $(BUILD)/pins_$(BOARD).o # We put ff.o and stm32f4xx_hal_sd.o into the first 16K section with the ISRs. |
