WeAct STM32F411CEU6 black pill

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
CATSUPERBERG
Posts: 2
Joined: Mon Jan 11, 2021 12:47 pm

Re: WeAct STM32F411CEU6 black pill

Post by CATSUPERBERG » Wed Jan 13, 2021 6:20 am

rcolistete wrote:
Wed Jan 13, 2021 4:01 am
Yes, it is supported. Example :
Thanks for the answer with example, i guess the port for my F401CC (256 kb) doesn't support it, gonna wait for my F411CE boards.

bartag
Posts: 1
Joined: Sat Jan 16, 2021 9:33 pm

Re: WeAct STM32F411CEU6 black pill

Post by bartag » Sat Jan 16, 2021 10:02 pm

Hi,

I'm quite new to MP and STM32, so please forgive me if my question is too trivial!

Is there a way to extend the allowed maximum firmware size during compile when I use W25Q128?
I figured out that I need to search around FLASH_TEXT and FLASH_FS... but I'm stuck here.

My reason:
I try to compile a FW with WIZNET5K and LWIP support and I try to freeze the MicroWebSrv2 module into it.

Code: Select all

make MICROPY_PY_WIZNET5K=5500 MICROPY_PY_LWIP=1 BOARD=WEACT_F411CEU6 -j2
Without the MicroWebSrv2 it compiles fine, but as soon as I try to integrate it, I got the following error:

Code: Select all

LINK build-WEACT_F411CEU6/firmware.elf
arm-none-eabi-ld: build-WEACT_F411CEU6/firmware.elf section `.text' will not fit in region `FLASH_TEXT'
arm-none-eabi-ld: region `FLASH_TEXT' overflowed by 30536 bytes
make: *** [Makefile:669: build-WEACT_F411CEU6/firmware.elf] Error 1

bogdansrb
Posts: 3
Joined: Fri Jan 22, 2021 6:35 pm

Re: WeAct STM32F411CEU6 black pill

Post by bogdansrb » Fri Jan 22, 2021 6:43 pm

Hello everyone! I have this "black pill" f401ccu6 board. I bought it a long time ago and haven't used it, but I now need a board on which to put mycropython. On the back of the board it says "weact v2.0". I wasn't able to find an image for it, the official github page has documentation and images for f401ceu6. Any way to get micropython running on this?

SpotlightKid
Posts: 424
Joined: Wed Apr 08, 2015 5:19 am

Re: WeAct STM32F411CEU6 black pill

Post by SpotlightKid » Fri Jan 22, 2021 7:47 pm

This is apparently an update of this variant of the Black Pill:

https://stm32-base.org/boards/STM32F401 ... -Pill-V1.2

You need to compile your own firmware for this variant of the Black Pill.

You should be able to use this board definition from WeACT:

https://github.com/YXZhu/micropython/tr ... Act_F401CC

You can follow the instructions for mcausers board definition for the STM32F411CEU6:

https://github.com/mcauser/WEACT_F411CEU6

And adapt them where necessary.

Hth, Chris

bogdansrb
Posts: 3
Joined: Fri Jan 22, 2021 6:35 pm

Re: WeAct STM32F411CEU6 black pill

Post by bogdansrb » Mon Jan 25, 2021 7:49 am

Ok so I tried doing just that, got the board definitions and tried building but I get a bunch of errors and compilation stops:

Code: Select all

In file included from ./mpconfigport.h:31,
                 from ../../py/mpconfig.h:62,
                 from ../../lib/oofatfs/ffconf.h:30,
                 from ../../lib/oofatfs/ff.h:33,
                 from ../../lib/oofatfs/ff.c:28:
boards/WeAct_F401CC/mpconfigboard.h:19: error: "MICROPY_VFS_FAT" redefined [-Werror]
   19 | #define MICROPY_VFS_FAT             (0)
      | 
<command-line>: note: this is the location of the previous definition
cc1: all warnings being treated as errors
In file included from ./mpconfigport.h:31,
                 from ../../py/mpconfig.h:62,
                 from ../../lib/oofatfs/ffconf.h:30,
                 from ../../lib/oofatfs/ff.h:33,
                 from ../../lib/oofatfs/ffunicode.c:26:
boards/WeAct_F401CC/mpconfigboard.h:19: error: "MICROPY_VFS_FAT" redefined [-Werror]
   19 | #define MICROPY_VFS_FAT             (0)
      | 
and so on...

davef
Posts: 142
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: WeAct STM32F411CEU6 black pill

Post by davef » Tue Jan 26, 2021 2:00 am

Hi bartag,

Did you modify your mpconfigboard.h file?

I tried your line:

Code: Select all

make MICROPY_PY_LWIP=1 BOARD=WEACT_F411CEU6 -j2
without WIZNET and it compiled for me using arm-none-eabi-gcc-4.9.3 on a 32 bit machine. Thanks for the hint ... I have been messing around in the mpconfigboard files ... this looks an easier way to do it.

I would like to build in support for PPP as well so I can try to talk to a Huawei 3G dongle. Any suggestions?

Thanks,
Dave

davef
Posts: 142
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: WeAct STM32F411CEU6 black pill

Post by davef » Tue Jan 26, 2021 10:15 am

bartag,

I tried building with the W25Q32 by changing line 9 in mpconfigboard.h and got the same problem. I think there are some hints earlier in this thread so I am off to re-read them.

Tried the other fork here:

Code: Select all

git clone https://github.com/jugnu-jethi/WeAct_F411CE-MicroPython.git WeAct_F411CE
and got the same error. I noticed that the lines:

Code: Select all

#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)
#define MICROPY_HW_SPIFLASH_ENABLE_CACHE (1)
were not in his mpconfigboard.h file. Even including them made no difference.
Off to find who generates the FLASH_TEXT message.

Both firmware.map and stm32f411.ld have the name FLASH_TEXT in them, the first length 0x00060000 (393,216) and the second 384K.

Doesn't something need to change these numbers when you use bigger flash?

Post Reply