samd: Re-arrange the makefiles for the Variants WLAN and WLAN_BLE.

Variant WLAN: Support for WiFi. For the Adafruit Metro M4 board, this
  is the default. At boards with small available flash, SSL is not
  supported.
Variant WLAN_BLE: Support for WiFi and BLE.

Signed-off-by: robert-hh <robert@hammelrath.com>
pull/12464/head
robert-hh 2023-11-16 21:16:56 +01:00
rodzic 42a905190c
commit 2d5fa9c2da
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 32EC5F755D5A3A93
9 zmienionych plików z 56 dodań i 79 usunięć

Wyświetl plik

@ -15,7 +15,8 @@
],
"mcu": "samd51",
"variants": {
"WLAN": "WiFi support using a ESP32 module with NINA firmware"
"WLAN": "WiFi support using a ESP32 module with NINA firmware",
"WLAN_BLE": "WiFi and BLE support using a ESP32 module with NINA firmware"
},
"product": "Feather M4 Express",
"thumbnail": "",

Wyświetl plik

@ -13,7 +13,8 @@
],
"mcu": "samd51",
"variants": {
"WLAN": "WiFi support using a ESP32 module with NINA firmware"
"WLAN": "WiFi support using a ESP32 module with NINA firmware",
"WLAN_BLE": "WiFi and BLE support using a ESP32 module with NINA firmware"
},
"product": "ItsyBitsy M4 Express",
"thumbnail": "",

Wyświetl plik

@ -15,6 +15,9 @@
"metro_m4_express_airlift.jpg"
],
"mcu": "samd51",
"variants": {
"WLAN_BLE": "WiFi and BLE support using a ESP32 module with NINA firmware"
},
"product": "Metro M4 Express Airlift",
"thumbnail": "",
"url": "https://www.adafruit.com/product/4000",

Wyświetl plik

@ -3,10 +3,6 @@ CMSIS_MCU = SAMD51J19A
LD_FILES = boards/samd51x19a.ld sections.ld
TEXT0 = 0x4000
# MicroPython settings
MICROPY_PY_NETWORK = 1
MICROPY_PY_NETWORK_NINAW10 = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_HW_CODESIZE = 496K
BOARD_VARIANT ?= WLAN

Wyświetl plik

@ -14,7 +14,8 @@
],
"mcu": "samd51",
"variants": {
"WLAN": "WiFi support using a ESP32 module with NINA firmware"
"WLAN": "WiFi support using a ESP32 module with NINA firmware",
"WLAN_BLE": "WiFi and BLE support using a ESP32 module with NINA firmware"
},
"product": "Sparkfun SAMD51 Thing Plus",
"thumbnail": "",

Wyświetl plik

@ -29,7 +29,6 @@
#include "py/gc.h"
#include "py/mperrno.h"
#include "py/stackctrl.h"
// #include "extmod/modbluetooth.h"
#include "extmod/modnetwork.h"
#include "shared/readline/readline.h"
#include "shared/runtime/gchelper.h"

Wyświetl plik

@ -3,11 +3,3 @@ include("$(MPY_DIR)/extmod/asyncio")
require("onewire")
require("ds18x20")
require("dht")
include(
"$(MPY_LIB_DIR)/micropython/bluetooth/aioble/manifest.py",
client=True,
central=True,
l2cap=True,
security=True,
)

Wyświetl plik

@ -6,3 +6,11 @@ require("ds18x20")
require("dht")
# Networking
require("bundle-networking")
# BLE
include(
"$(MPY_LIB_DIR)/micropython/bluetooth/aioble/manifest.py",
client=True,
central=True,
l2cap=True,
security=True,
)

Wyświetl plik

@ -9,70 +9,46 @@ MICROPY_HW_CODESIZE ?= 368K
MICROPY_VFS_LFS2 ?= 1
MICROPY_VFS_FAT ?= 1
ifeq ($(BOARD_VARIANT),WLAN)
MICROPY_PY_NETWORK ?= 1
MICROPY_PY_NETWORK_NINAW10 ?= 1
ifeq ($(MICROPY_HW_CODESIZE),496K)
MICROPY_PY_SSL ?= 1
MICROPY_SSL_MBEDTLS ?= 1
MICROPY_PY_BLUETOOTH ?= 1
MICROPY_BLUETOOTH_NIMBLE ?= 1
endif
ifeq ($(MICROPY_HW_CODESIZE),1008K)
MICROPY_PY_SSL ?= 1
MICROPY_SSL_MBEDTLS ?= 1
MICROPY_PY_BLUETOOTH ?= 1
MICROPY_BLUETOOTH_NIMBLE ?= 1
endif
endif
ifeq ($(MICROPY_PY_NETWORK),1)
FROZEN_MANIFEST ?= mcu/$(MCU_SERIES_LOWER)/manifest_net.py
else
FROZEN_MANIFEST ?= mcu/$(MCU_SERIES_LOWER)/manifest.py
endif
SRC_S += shared/runtime/gchelper_thumb2.s
SRC_C += \
fatfs_port.c \
mbedtls/mbedtls_port.c
fatfs_port.c
ifneq ($(BOARD_VARIANT),)
MICROPY_PY_NETWORK ?= 1
CFLAGS += -DMICROPY_PY_NETWORK=1
MICROPY_PY_NETWORK_NINAW10 ?= 1
CFLAGS += -DMICROPY_PY_NETWORK_NINAW10=1
ifeq ($(MICROPY_PY_NETWORK),1)
CFLAGS += -DMICROPY_PY_NETWORK=1
INC += -I$(TOP)/drivers/ninaw10
SRC_C += \
mbedtls/mbedtls_port.c\
nina_wifi_bsp.c
SHARED_SRC_C += \
shared/netutils/dhcpserver.c \
shared/netutils/netutils.c \
shared/netutils/trace.c
DRIVERS_SRC_C += \
drivers/ninaw10/nina_bt_hci.c \
drivers/ninaw10/nina_wifi_drv.c \
drivers/ninaw10/nina_wifi_bsp.c \
drivers/ninaw10/machine_pin_nina.c
SHARED_SRC_C += \
shared/netutils/dhcpserver.c \
shared/netutils/netutils.c \
shared/netutils/trace.c
endif
ifeq ($(MICROPY_PY_NETWORK_NINAW10),1)
CFLAGS += -DMICROPY_PY_NETWORK_NINAW10=1
INC += -I$(TOP)/drivers/ninaw10
DRIVERS_SRC_C += \
drivers/ninaw10/nina_bt_hci.c \
drivers/ninaw10/nina_wifi_drv.c \
drivers/ninaw10/nina_wifi_bsp.c \
drivers/ninaw10/machine_pin_nina.c
SRC_C += \
nina_wifi_bsp.c
endif
ifeq ($(MICROPY_BLUETOOTH_NIMBLE), 1)
SRC_C += \
mpbthciport.c \
mpnimbleport.c
INC += \
-I$(TOP)/extmod/nimble \
-I$(TOP)/lib/mynewt-nimble/nimble/host/include \
-I$(TOP)/lib/mynewt-nimble/nimble/include \
-I$(TOP)/lib/mynewt-nimble/porting/nimble/include
ifeq ($(MICROPY_HW_CODESIZE),$(filter $(MICROPY_HW_CODESIZE), 496K 1008K))
MICROPY_PY_SSL ?= 1
MICROPY_SSL_MBEDTLS ?= 1
ifeq ($(BOARD_VARIANT),WLAN_BLE)
MICROPY_PY_BLUETOOTH ?= 1
MICROPY_BLUETOOTH_NIMBLE ?= 1
SRC_C += \
mpbthciport.c \
mpnimbleport.c
INC += \
-I$(TOP)/extmod/nimble
endif
endif
FROZEN_MANIFEST ?= mcu/$(MCU_SERIES_LOWER)/manifest_net.py
else
FROZEN_MANIFEST ?= mcu/$(MCU_SERIES_LOWER)/manifest.py
endif