Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Build CircuitPython with STM32F407VGT6 board.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Build CircuitPython with STM32F407VGT6 board.

by water35 on Fri Jul 24, 2020 9:11 pm

I try to install CircuitPython STM32F407 Discovery kit firmware
(https://downloads.circuitpython.org/bin ... -5.3.1.bin)
to this STM32F407VGT6 board,
https://www.aliexpress.com/item/32985219862.html
but it not work;

Board major features:
SPI Flash: W25Q16
High speed crystal oscillator: 8MHz
Low frequency crystal: 32.768K
TF-Card

Which parameter should I change in mpconfigboard.h when I build it ? please give some suggestion, thanks!

water35
 
Posts: 6
Joined: Sun Mar 17, 2019 7:12 am

Re: Build CircuitPython with STM32F407VGT6 board.

by hierophect on Mon Jul 27, 2020 5:26 pm

Hi, can you provide more details about what is failing for you?

There are a couple of reasons this might not be working - the board you shared will not have the built in STLink programmer that the Discovery does and will need to be programmed over DFU or SWD, the two boards have different oscillators, and of course the pin names will be different. There are also some other settings that sometimes need to be added, such as whether the VBUS detector pin for USB is connected.

You're also welcome to add an issue or submit a board profile on github: https://github.com/adafruit/circuitpython

hierophect
 
Posts: 9
Joined: Fri Jul 13, 2018 10:24 pm

Re: Build CircuitPython with STM32F407VGT6 board.

by water35 on Wed Jul 29, 2020 6:30 am

I connect the board via USB (BOOT0 connect to 3.3V in DFU mode),
All build and flash step looks like correct, but can't boot (no respond) when rePower in normal mode (BOOT0 connect to GND),
I don't have "stm32f4_discovery" board, this STM32F407VGT6 board looks like has same Crystal oscillator (8 MHz).
Code: Select all | TOGGLE FULL SIZE
make BOARD=stm32f4_discovery

Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated

345196 bytes used, 637844 bytes free in flash firmware space out of 983040 bytes (960.0kB).
69240 bytes used, 61832 bytes free in ram for stack and heap out of 131072 bytes (128.0kB).

Create build-stm32f4_discovery/firmware.uf2
python3 ../../tools/uf2/utils/uf2conv.py -f 0x57755a57 -b 0x8000000 -c -o "build-stm32f4_discovery/firmware.uf2" build-stm32f4_discovery/firmware.hex
Converting to uf2, output size: 690688, start address: 0x8000000
Wrote 690688 bytes to build-stm32f4_discovery/firmware.uf2


Code: Select all | TOGGLE FULL SIZE
make BOARD=stm32f4_discovery flash


Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
Writing build-stm32f4_discovery/firmware.bin to the board
dfu-util -a 0 --dfuse-address 0x08000000 -D build-stm32f4_discovery/firmware.bin
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/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
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 "
Downloading to address = 0x08000000, size = 410340
Download [=========================] 100% 410340 bytes
Download done.
File downloaded successfully


Image
Image

water35
 
Posts: 6
Joined: Sun Mar 17, 2019 7:12 am

Please be positive and constructive with your questions and comments.