From f17c0db5f7bedd6653dc4559b3adb6d5c424a648 Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Thu, 20 May 2021 20:52:37 -0500 Subject: [PATCH] zephyr: Update disk access configuration for Zephyr v2.6.0. Zephyr's Kconfig symbols and defaults for SDHC/SDMMC disk drivers and the disk access subsystem were reworked between Zephyr v2.5.0 and v2.6.0. Update MicroPython accordingly. Signed-off-by: Maureen Helm --- ports/zephyr/boards/mimxrt1050_evk.conf | 3 +-- ports/zephyr/main.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ports/zephyr/boards/mimxrt1050_evk.conf b/ports/zephyr/boards/mimxrt1050_evk.conf index 051ab7e60b..c4abf726a4 100644 --- a/ports/zephyr/boards/mimxrt1050_evk.conf +++ b/ports/zephyr/boards/mimxrt1050_evk.conf @@ -1,9 +1,8 @@ # Required for zephyr.DiskAccess block devices CONFIG_DISK_ACCESS=y -CONFIG_DISK_ACCESS_SDHC=y CONFIG_USB=y CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="Zephyr MicroPython" CONFIG_USB_MASS_STORAGE=y -CONFIG_MASS_STORAGE_DISK_NAME="SDHC" +CONFIG_MASS_STORAGE_DISK_NAME="SDMMC" diff --git a/ports/zephyr/main.c b/ports/zephyr/main.c index f8ec0a0d27..7172f37824 100644 --- a/ports/zephyr/main.c +++ b/ports/zephyr/main.c @@ -100,8 +100,8 @@ STATIC void vfs_init(void) { const char *mount_point_str = NULL; int ret = 0; - #ifdef CONFIG_DISK_ACCESS_SDHC - mp_obj_t args[] = { mp_obj_new_str(CONFIG_DISK_SDHC_VOLUME_NAME, strlen(CONFIG_DISK_SDHC_VOLUME_NAME)) }; + #ifdef CONFIG_DISK_DRIVER_SDMMC + mp_obj_t args[] = { mp_obj_new_str(CONFIG_SDMMC_VOLUME_NAME, strlen(CONFIG_SDMMC_VOLUME_NAME)) }; bdev = zephyr_disk_access_type.make_new(&zephyr_disk_access_type, ARRAY_SIZE(args), 0, args); mount_point_str = "/sd"; #elif defined(CONFIG_FLASH_MAP) && FLASH_AREA_LABEL_EXISTS(storage)