Open water5 opened 1 year ago
Seems these boards have similar issue,
BLACK_F407VE
BLACK_F407ZE
BLACK_F407ZG
in mpconfigboard.h
#define MICROPY_HW_BDEV_IOCTL(op, arg) ( \
(op) == BDEV_IOCTL_NUM_BLOCKS ? (MICROPY_HW_SPIFLASH_SIZE_BITS / 8 / FLASH_BLOCK_SIZE) : \
(op) == BDEV_IOCTL_INIT ? spi_bdev_ioctl(&spi_bdev, (op), (uint32_t)&spiflash_config) : \
spi_bdev_ioctl(&spi_bdev, (op), (arg)) \
)
#define MICROPY_HW_BDEV_READBLOCKS(dest, bl, n) spi_bdev_readblocks(&spi_bdev, (dest), (bl), (n))
#define MICROPY_HW_BDEV_WRITEBLOCKS(src, bl, n) spi_bdev_writeblocks(&spi_bdev, (src), (bl), (n))
refer VCC_GND_F407ZG
board's mpconfigboard.h
and change to:
#define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)
#define MICROPY_HW_BDEV_SPIFLASH (&spi_bdev)
#define MICROPY_HW_BDEV_SPIFLASH_CONFIG (&spiflash_config)
#define MICROPY_HW_BDEV_SPIFLASH_SIZE_BYTES (MICROPY_HW_SPIFLASH_SIZE_BITS / 8)
build success. These boards use similar SPI Flash, what different/why between two code block above?
When I modify
micropython/ports/stm32/boards/WEACT_F411CEU6/mpconfigboard.h
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)
Then build with
make BOARD=WEACT_F411CEU6
, appear error:When use
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1)
have not this issue.