mcauser / black_f407ve Goto Github PK
View Code? Open in Web Editor NEWMicroPython board definition for the MCUDev Black STM32F407VET6 board
License: MIT License
MicroPython board definition for the MCUDev Black STM32F407VET6 board
License: MIT License
Hello mcauser,
There is specification of the board listed in the readme, it would be nice to have a supported status for each line to help undersand waht one can do with this board.
maybe supported/unsupported/not tested
Is it possible to user network interface on this devboard?
From micropython docs:
To use this module, a MicroPython variant/build with network capabilities must be installed.
I don't see Driver
in network
module. Does it mean that this micropython port does not include network capabilities?
Thanks!
I have this error while trying to establish the definition:
make: *** no rule to make the target « lib/mbedtls/library/aes.c », necessary forre pour « build-BLACK_F407VE/genhdr/qstr.i.last ». Stop.
when executing make BOARD=BLACK_F470VE, an error was encountered as follows:
In file included from eth.c:31:0:
eth.c: In function 'eth_mac_init':
eth.c:163:106: error: implicit declaration of function 'STATIC_AF_ETH_RMII_REF_CLK' [-Werror=implicit-function-declaration]
mp_hal_pin_config_alt_static(MICROPY_HW_ETH_RMII_REF_CLK, MP_HAL_PIN_MODE_ALT, MP_HAL_PIN_PULL_NONE, STATIC_AF_ETH_RMII_REF_CLK);
^
pin_static_af.h:42:48: note: in definition of macro 'mp_hal_pin_config_alt_static'
mp_hal_pin_config(pin_obj, mode, pull, fn_type(pin_obj)) /* Overflow Error => alt func not found */
^~~~~~~
cc1: all warnings being treated as errors
../../py/mkrules.mk:47: recipe for target 'build-BLACK_F407VE/eth.o' failed
make: *** [build-BLACK_F407VE/eth.o] Error 1
Anyone could explain how to resolve it ? thanks.
Maybe I'm just unlucky but I recently bought ZE and VE boards and a (what looks like) a plugin TFT (3.2" ILI9341) display.
The display is totally compatible with the ZE board but the rows on the VE TFT connector seem to be mirrored and pin 32 is at 3v3 rather than ground hence a very warm regulator on the VE board.
I'll check the version numbers of the PCBs as soon as I have them in front of me again but in the meantime thought maybe I'm not alone in having incompatible compatible boards!
A somewhat older ZG board I have seems to be set up for a totally different LCD.
Hello,
First, thank you for compiling this package!
I found a minor bug in your build instructions, and the MicroPython build system is a bit too involved for me to quickly fix.
I have to run "make BOARD=BLACK_F407VE" twice to complete the build successfully. For some reason the HAL drivers are not built during the first pass.
Here is the relevant stack trace:
LINK build-BLACK_F407VE/firmware.elf
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dac.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dac_ex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc_ex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sd.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_sdmmc.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o: No such file or directory
arm-none-eabi-ld: cannot find build-BLACK_F407VE/lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.o: No such file or directory
Makefile:439: recipe for target 'build-BLACK_F407VE/firmware.elf' failed
make: *** [build-BLACK_F407VE/firmware.elf] Error 1
me@NONCE:/micropython/ports/stm32$ make BOARD=BLACK_F407VE/micropython/ports/stm32$
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dac.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dac_ex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rtc_ex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_sd.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_sdmmc.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c
CC ../../lib/stm32lib/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c
LINK build-BLACK_F407VE/firmware.elf
arm-none-eabi-ld: warning: cannot find entry symbol _start; defaulting to 0000000000008000
text data bss dec hex filename
0 0 0 0 0 build-BLACK_F407VE/firmware.elf
Create build-BLACK_F407VE/firmware.dfu
GEN build-BLACK_F407VE/firmware.hex
me@NONCE:
Hello @mcauser Thanks for the driver I have compiled with your code. However I could not run the ethernet interface
import network
lan = network.LAN()
lan.active(True)
After I run the code I get the error below.
MicroPython v1.18-602-gf63b4f85a on 2022-06-10; MCUDEV STM32F407VE with STM32F407VE
Type "help()" for more information.
>>> import network
>>> lan = network.LAN()
>>> lan.active(True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 110] ETIMEDOUT
>>>
This may be due to how I am deploying to the board. The mac keeps erroring out on deploy:
[~/micropython/ports/stm32]$ make BOARD=BLACK_F407VE deploy
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Writing build-BLACK_F407VE/firmware.dfu to the board
Traceback (most recent call last):
File "../../tools/pydfu.py", line 20, in <module>
import usb.core
ImportError: No module named usb.core
make: *** [deploy] Error 1
The only way I have found is to use 'dfu-util' which can easily be installed with brew.
[/micropython/ports/stm32]$ make USE_PYDFU=0 BOARD=BLACK_F407VE deploy
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Writing build-BLACK_F407VE/firmware.dfu to the board
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (2 elements, total size = 315148)
parsing element 1, address = 0x08000000, size = 14712
Download [=========================] 100% 14712 bytes
Download done.
parsing element 2, address = 0x08020000, size = 300420
Download [=========================] 100% 300420 bytes
Download done.
done parsing DfuSe file
So I can attach to the board via the expected port of "/dev/cu.usbmodem1422" ( mac adds the cu.)
Traceback (most recent call last):
File "main.py", line 1, in <module>
NameError: name 'ˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇˇ' is not defined
MicroPython v1.9.3-588-g6b4b6d38-dirty on 2018-05-01; BLACK STM32F407VE with STM32F407VE
Type "help()" for more information.
>>>
On first mount of the FS all the files contained garbage text. I can manually place boot.py and main.py on the mount and it seems to work. Just not sure if that's the right way to go.
Is there any way to re-flash the FS? Any suggestions?
Hi All,
Please need help in getting USB Drivers to work on windows 10 64bit.
Tried with my macbook pro and no success too.
Please help!!.
Thanks
Hi
I've got this error when compiling.
make V=1 BOARD=BLACK_F407VE make: *** No rule to make target 'lib/mbedtls/library/aes.c', needed by 'build-BLACK_F407VE/genhdr/qstr.i.last'. Stop.
Any help will be greatly appreciated.
Thanks
Hello,
I found one more issue when attempting to deploy the firmware.
I can compile and successfully deploy firmware created for one of the stock boards.
C:\Users\me\Downloads\dfu-util-0.9-win64>dfu-util -a 0 -D ....\firmware.dfu
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Match vendor ID from file: 0483
Match product ID from file: df11
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (1 elements, total size = 8)
parsing element 1, address = 0x08000000, size = 0
Last page at 0x07ffffff is not writeable
commit 12468d1 (HEAD -> master, origin/master, origin/HEAD)
Merge: 14d612b 6ab7fb6
Author: Mike Causer [email protected]
Date: Tue Apr 10 09:51:00 2018 +1000
When I follow the step "make BOARD=BLACK_F407VE" I get the follow errors:
$ make BOARD=BLACK_F407VE
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
GEN build-BLACK_F407VE/genhdr/qstr.i.last
In file included from ./mpconfigport.h:32:0,
from ../../py/mpconfig.h:45,
from ../../py/mpstate.h:31,
from ../../py/mpstate.c:27:
./mpconfigboard_common.h:175:0: error: "MICROPY_HW_ENABLE_CAN" redefined [-Werror]
#define MICROPY_HW_ENABLE_CAN (0)
In file included from ./mpconfigport.h:31:0,
from ../../py/mpconfig.h:45,
from ../../py/mpstate.h:31,
from ../../py/mpstate.c:27:
boards/BLACK_F407VE/mpconfigboard.h:12:0: note: this is the location of the previous definition
#define MICROPY_HW_ENABLE_CAN (1)
cc1: all warnings being treated as errors
In file included from ./mpconfigport.h:32:0,
from ../../py/mpconfig.h:45,
from ../../py/malloc.c:31:
./mpconfigboard_common.h:175:0: error: "MICROPY_HW_ENABLE_CAN" redefined [-Werror]
#define MICROPY_HW_ENABLE_CAN (0)
In file included from ./mpconfigport.h:31:0,
from ../../py/mpconfig.h:45,
from ../../py/malloc.c:31:
boards/BLACK_F407VE/mpconfigboard.h:12:0: note: this is the location of the previous definition
#define MICROPY_HW_ENABLE_CAN (1)
...
cc1: all warnings being treated as errors
In file included from ./mpconfigport.h:32:0,
from ../../py/mpconfig.h:45,
from ../../py/obj.h:29,
from ../../extmod/modonewire.c:30:
./mpconfigboard_common.h:175:0: error: "MICROPY_HW_ENABLE_CAN" redefined [-Werror]
#define MICROPY_HW_ENABLE_CAN (0)
In file included from ./mpconfigport.h:31:0,
from ../../py/mpconfig.h:45,
from ../../py/obj.h:29,
from ../../extmod/modonewire.c:30:
boards/BLACK_F407VE/mpconfigboard.h:12:0: note: this is the location of the previous definition
#define MICROPY_HW_ENABLE_CAN (1)
cc1: all warnings being treated as errors
make: *** [build-BLACK_F407VE/genhdr/qstr.i.last] Error 1
make: *** Deleting file `build-BLACK_F407VE/genhdr/qstr.i.last'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.