mcauser / WEACT_F411CEU6

MicroPython board definition for the WeAct STM32F411CEU6 board
127 stars 35 forks source link

building firmware V1.13-266 #9

Closed robhamerling closed 3 years ago

robhamerling commented 3 years ago

When trying to build v1.13-266 the messages below appear. It seems related to a recent change in Micropython: drivers/memory/spiflash: Add MICROPY_HW_SPIFLASH_ENABLE_CACHE option.

boards/WEACT_F411CEU6/bdev.c:16:8: error: unknown type name 'mp_spiflash_cache_t'
   16 | STATIC mp_spiflash_cache_t spi_bdev_cache;
      |        ^~~~~~~~~~~~~~~~~~~
boards/WEACT_F411CEU6/bdev.c:23:6: error: 'const struct _mp_spiflash_config_t' has no member named 'cache'
   23 |     .cache = &spi_bdev_cache,
      |      ^~~~~
boards/WEACT_F411CEU6/bdev.c:23:14: error: excess elements in struct initializer [-Werror]
   23 |     .cache = &spi_bdev_cache,
      |              ^
boards/WEACT_F411CEU6/bdev.c:23:14: note: (near initialization for 'spiflash_config')
cc1: all warnings being treated as errors
make: *** [../../py/mkrules.mk:77: build-WEACT_F411CEU6/boards/WEACT_F411CEU6/bdev.o] Error 1
mcauser commented 3 years ago

I haven't worked with this board in over a year. No doubt something upstream has changed. Will look into it soon

shariltumin commented 3 years ago

Try ... // 1 = use internal flash (512 KByte) // 0 = use onboard SPI flash (4 MByte) Winbond W25Q32

define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)

define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)

...

in boards/WEACT_F411CEU6/mpconfigboard.h

with "#define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)" I managed to compile without problem.

robhamerling commented 3 years ago

Thanks, I have a working v1.13-268 firmware version now!