New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling v 1.14 with Winbond W25Q128 external flash #10
Comments
I encountered the same problem when I try to build it and solved refer to the method you said in the issue. |
Hi, |
I compiled 4 versions of micropython v 1.17. Just including #define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1) |
And |
Hello,
I compiled with Micropython v 1.14 under Manjaro Linux.
After
sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib
sudo pacman -S stlink
I had no Problem compiling with the predefined settings.
I noticed (too) that it was necessary to change into mpy-cross directory and execute make there before going to stm32 directory and making with
make BOARD=WEACT_F411CEU6 .
I could use
make BOARD=WEACT_F411CEU6 deploy-stlink
with my STLink v2 connected to the Blackpill board.
It gave an error first but repeating a second time I had success.
Now my Problem:
In a second attempt I wanted to make binaries for my Blackpill boards from Canaduino which have Winbond W25Q128 (16 MByte) external flash added.
Following instructions here I set
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)
and later uncommented
#define MICROPY_HW_SPIFLASH_SIZE_BITS (128 * 1024 * 1024)
After executing the make command I ran into the Error that the type
mp_spiflash_cache_t was not defined.
Therefore I had to adapt the sources a very little bit:
I included
#include "../../drivers/memory/spiflash.h"
in line 2 of bdev.c (after #include "storage.h")
and
#define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)
in line 104 of mpconfigport.h (after #define MICROPY_HW_SPIFLASH_MOSI (pin_A7) ).
And then it compiled and worked.
@mcauser : Sorry, I'm not familiar enough with git to make a pull-request.
I hope you read this and make these changes.
A question: Do we need cache for the spiflash at all?
Greetings and thank you for your work.
rkompass
The text was updated successfully, but these errors were encountered: