|
| 1 | +# This module is intended for use on stm32wb55 microcontrollers |
| 2 | +# and shows how a native module can be used to extend hardware |
| 3 | +# functionality. |
| 4 | + |
| 5 | +# Note: `pip install pyelftools` is required to build native modules. |
| 6 | + |
| 7 | +# Location of top-level MicroPython directory |
| 8 | +MPY_DIR = ../../.. |
| 9 | + |
| 10 | +# Name of module |
| 11 | +MOD = transparent_vcp |
| 12 | + |
| 13 | +# Source files (.c or .py) |
| 14 | +SRC = \ |
| 15 | + _stm32wb55_transparent.c \ |
| 16 | + stm32wb55_transparent_vcp.py \ |
| 17 | + |
| 18 | + |
| 19 | +# $(MPY_DIR)/ports/stm32/rfcore.c |
| 20 | + |
| 21 | +# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin) |
| 22 | +ARCH = armv7m |
| 23 | + |
| 24 | +MCU_SERIES = wb |
| 25 | +CMSIS_MCU = STM32WB55xx |
| 26 | +include $(MPY_DIR)/ports/stm32/stm32.mk |
| 27 | + |
| 28 | +CFLAGS += -D$(CMSIS_MCU) -DUSE_FULL_LL_DRIVER $(CFLAGS_MCU_$(MCU_SERIES)) |
| 29 | +# CFLAGS += -DSTM32_HAL_H='<stm32$(MCU_SERIES)xx_hal.h>' |
| 30 | +CFLAGS += -DSTM32_HAL_H='<stm32$(MCU_SERIES)xx_hal.h>' |
| 31 | +CFLAGS += -DMICROPY_PIN_DEFS_PORT_H='<rfcore_settings.h>' |
| 32 | +CFLAGS += -Dpin_gpio_t=uint32_t |
| 33 | +# CFLAGS += -Dmp_obj_new_int_from_uint= |
| 34 | +CFLAGS += -DMICROPY_PY_BLUETOOTH=0 |
| 35 | +CFLAGS += -DMICROPY_BLUETOOTH_NIMBLE=0 |
| 36 | +CFLAGS += -DMICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS=1 |
| 37 | + |
| 38 | +CFLAGS += -I$(MPY_DIR)/ports/stm32 |
| 39 | +CFLAGS += -I$(MPY_DIR)/ports/stm32/boards/NUCLEO_WB55 |
| 40 | +CFLAGS += -I$(MPY_DIR)/lib/cmsis/inc |
| 41 | +CFLAGS += -I$(MPY_DIR)/lib/stm32lib/STM32WBxx_HAL_Driver/Inc |
| 42 | +CFLAGS += -I$(MPY_DIR)/lib/stm32lib/CMSIS/STM32WBxx/Include |
| 43 | +CFLAGS += -I$(MPY_DIR)/lib/mynewt-nimble/nimble/include |
| 44 | +CFLAGS += -I$(MPY_DIR)/extmod/nimble |
| 45 | + |
| 46 | +include $(MPY_DIR)/py/dynruntime.mk |
0 commit comments