🎄⛄❄️🎁 It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! 🎄⛄❄️🎁
0

stm32f405 arrives, but can't upload sketch
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

stm32f405 arrives, but can't upload sketch

by manitou on Mon Nov 04, 2019 7:19 pm

My STM32F405 feather arrived. I plugged it on and neopixel LED is cycling through colors and tiny yellow LED is flashing. I have updated the arduino IDE to sucessfully compile sketches for stm32f405. But I haven't figured out how to upload the blink sketch.

i'm running 64-bit linux, ubuntu 16.04. with Arduino 1.8.10. When I jumper B0 to 3v3 (also tried 5v), only the yellow LED is flashing. But under tools I can't get any of the options to upload the sketch?? Tried SWD, dfu, serial, HID ??? With SWD , IDE says

.arduino15/packages/STM32/tools/STM32Tools/1.3.1/tools/linux/stm32CubeProg.sh 0 /tmp/arduino_build_943155/Blink.ino.bin -g
-------------------------------------------------------------------
STM32CubeProgrammer v2.2.0
-------------------------------------------------------------------

Error: No debug probe detected.


Please provide details on proper way to upload new sketch to stm32f405.

manitou
 
Posts: 24
Joined: Fri Jan 06, 2012 6:25 pm

Re: stm32f405 arrives, but can't upload sketch

by microcarl on Mon Nov 04, 2019 8:16 pm

Hi,

My name is Carl and this is my first post here at Adafruit.

I to, received my STM32F405 Feather controllers today.

First, I do not use the Arduino software so I cant offer any assistance there.

However, as I learned with the Circuit Playground boards, Circuitpython needs to be installed upon arrival. The pretty colored cycling LEDs seem to be a demo program. I was able to successfully install Circuitpython in the Circuit Playground boards.

In fact, I was also able to install Micropython on the STM32F405 Feather controller by following the detailed procedure on the Micropython web-site.

But, as yet, I have not been able to find a procedure on the Adafruit web-site that describes how to load a .bin file on to the STM32F405 Feather controller.

I hope some procedure/tutorial will be available of soon.

I'm sorry I can't provide more help, as it seems I'm also stuck on getting Circuitpython onto the STM32F405 Feather.

I'll check back in a day or so and see if anything cale to light.

microcarl
 
Posts: 11
Joined: Sun Sep 15, 2019 7:55 pm

Re: stm32f405 arrives, but can't upload sketch

by manitou on Mon Nov 04, 2019 8:32 pm

visit https://circuitpython.org/board/feather ... 5_express/
it has a circuitpython v5 .bin that you can download ... but then we're still faced with how to upload a .bin to the stm32f405

manitou
 
Posts: 24
Joined: Fri Jan 06, 2012 6:25 pm

Re: stm32f405 arrives, but can't upload sketch

by microcarl on Mon Nov 04, 2019 8:54 pm

I tried using the same DFU-UTIL software used to flash Micropython to the STM32F405, to also flash Circuitpython to the STM32F405. it comes back with "-s --dfuse-address <address> ST DfuSe mode, specify target address for raw file download or upload."

So it seem that a starting address is needed fo flash a binary file, using the DFU-UTIL utility.

Edited to correct typo's...

microcarl
 
Posts: 11
Joined: Sun Sep 15, 2019 7:55 pm

Re: stm32f405 arrives, but can't upload sketch

by microcarl on Mon Nov 04, 2019 9:28 pm

Got it!

If not already installed, install the DFU-UTIL program using:

sudo apt install dfu-util, at the command line.

Once the dfu-util program is installed:

Connect the "B0" pin on the STM32F405 controller to 3V3.
Connect the STM32F405 controller to the USB host device.

Then type:
sudo dfu-util --alt 0 -D adafruit-circuitpython-feather_stm32f405_express-en_US-5.0.0-alpha.5.bin --dfuse-address 0x8000000

I got the starting address (0x80000000) from the Micropython installation document.

I hope this helps.

microcarl
 
Posts: 11
Joined: Sun Sep 15, 2019 7:55 pm

Re: stm32f405 arrives, but can't upload sketch

by microcarl on Mon Nov 04, 2019 9:55 pm

I guess more properly, we need to add the product and vendor ID:

"-d 0483:df11"

The full command line entry is:
sudo dfu-util --alt 0 -D adafruit-circuitpython-feather_stm32f405_express-en_US-5.0.0-alpha.5.bin -d 0483:df11 --dfuse-address 0x8000000

microcarl
 
Posts: 11
Joined: Sun Sep 15, 2019 7:55 pm

Re: stm32f405 arrives, but can't upload sketch

by rlgjr562 on Thu Nov 07, 2019 11:20 pm

Microcarl thanks for the tips, I am almost getting there.

I am running the DFU-UTIL on a windows PC and I am seeing the error "Cannot open DFU device 0483:df11" I am running the CMD as an administrator and I am running

Code: Select all | TOGGLE FULL SIZE
dfu-util --alt 0 -D adafruit-circuitpython-feather_stm32f405_express-en_US-5.0.0-alpha.5.bin -d 0483:df11 --dfuse-address 0x8000000


Anyone else seeing this and have you found a solution?

rlgjr562
 
Posts: 51
Joined: Sun Jan 21, 2018 5:02 pm

Re: stm32f405 arrives, but can't upload sketch

by microcarl on Fri Nov 08, 2019 12:10 pm

I noticed yesterday that Lady Ada put a STM32F405 Feather help document on the web-site. You might try looking at that and see if there is a possible solution.

microcarl
 
Posts: 11
Joined: Sun Sep 15, 2019 7:55 pm

Re: stm32f405 arrives, but can't upload sketch

by microcarl on Fri Nov 08, 2019 12:44 pm

Try leaving out the Vendor and product ID (-d 0483:df11). It seems that it isn't necessarily needed.

microcarl
 
Posts: 11
Joined: Sun Sep 15, 2019 7:55 pm

Re: stm32f405 arrives, but can't upload sketch

by microcarl on Fri Nov 08, 2019 2:47 pm

I'm running Linux Ubuntu Mate' 18.04. I used the dfu-util utility. I shorted the B0 pin to the 3V3 pin.

Have you tried the document that Lady Ada created at the link:
https://learn.adafruit.com/adafruit-stm ... er-express

microcarl
 
Posts: 11
Joined: Sun Sep 15, 2019 7:55 pm

Re: stm32f405 arrives, but can't upload sketch

by microcarl on Fri Nov 08, 2019 8:35 pm

Did you follow the instructions as described in the document that I posted a web-link to?

While I did not use those particular instructions, I did use the instructions in the Micropython installation document for the Pyboard V1.1, and they worked fine.

With a little experimentation, I was able to figure out how to flash Circuitpython onto the STM32F405 Feather.

And isn't that what this is really all about - experimenting and learning? Nothing comes easy or is for free. The reward We get from this hobby is directly proportional to the effort we put into it.

Hang in there. Keep trying and you will figure it out.

microcarl
 
Posts: 11
Joined: Sun Sep 15, 2019 7:55 pm

Re: stm32f405 arrives, but can't upload sketch

by bbx10node on Fri Nov 08, 2019 10:43 pm

Ubuntu Linux 18.04, Arduino IDE 1.8.10

1. Install the STM32CubeProg package because it works on Linux, not just Windows. I am not sure if it works on Mac.

https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details#programming-firmware-5-8

2. See the Adafruit STM32 guide to get the board in DFU mode.

https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details#enabling-dfu-bootloader-mode-5-2

This is what appears in dmesg.

Code: Select all | TOGGLE FULL SIZE
usb 1-2: New USB device found, idVendor=0483, idProduct=df11
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: STM32  BOOTLOADER
usb 1-2: Manufacturer: STMicroelectronics
usb 1-2: SerialNumber: XXXXXXXXXXXX

3. In the IDE select Upload Method: STM32CubeProgrammer(DFU) Click on Upload.

The following appears in the lower pane of the IDE window.

Code: Select all | TOGGLE FULL SIZE
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.2.0                 
      -------------------------------------------------------------------



USB speed   : Full Speed (12MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : STM32  BOOTLOADER
SN          : xxxxxxxxxxxx
FW version  : 0x011a
Device ID   : 0x0413
Device name : STM32F405xx/F407xx/F415xx/F417xx
Device type : MCU
Device CPU  : Cortex-M4



Memory Programming ...
Opening and parsing file: ASCIITable.ino.bin
  File          : ASCIITable.ino.bin
  Size          : 17120 Bytes
  Address       : 0x08000000


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 1]
erasing sector 0000 @: 0x08000000 failed
erasing sector 0001 @: 0x08004000 failed
Download in Progress:


File download complete
Time elapsed during download operation: 00:00:00.616

RUNNING Program ...
  Address:      : 0x8000000
Start operation achieved successfully

bbx10node
 
Posts: 134
Joined: Sun Feb 22, 2015 4:14 pm

Re: stm32f405 arrives, but can't upload sketch

by johnsondavies on Mon Nov 11, 2019 10:29 am

My STM32F405 arrived today, and I'm trying to upload Blink using the Arduino IDE on a Mac. I get stuck on:

Code: Select all | TOGGLE FULL SIZE
STM32_Programmer_CLI not found.
Please install it or add '<STM32CubeProgrammer path>/bin' to your PATH environment:
https://www.st.com/en/development-tools/stm32cubeprog.html

I tried downloading SetupSTM32CubeProgrammer-2.2.0.app from the URL given above, but double-clicking it does nothing. Any suggestions?

johnsondavies
 
Posts: 32
Joined: Wed Sep 06, 2017 11:24 am

Re: stm32f405 arrives, but can't upload sketch

by johnsondavies on Mon Nov 11, 2019 1:51 pm

Further to my previous post above, I've done some more research and I believe:

  • To upload programs on a Mac from the Arduino IDE to the STM32F405 Feather you need the STM32CubeProgrammer.
  • To install STM32CubeProgrammer you need to download and run the SetupSTM32CubeProgrammer app from the STM website.
  • To install and run STM32CubeProgrammer the latest version 8.0 of Java has to be installed on the Mac.
Are these correct?

johnsondavies
 
Posts: 32
Joined: Wed Sep 06, 2017 11:24 am

Re: stm32f405 arrives, but can't upload sketch

by bbx10node on Mon Nov 11, 2019 2:38 pm

There is a section in this document on MacOS installations. I do not use a Mac so I don't know if this works or not.

https://www.st.com/content/ccc/resource ... 403500.pdf

bbx10node
 
Posts: 134
Joined: Sun Feb 22, 2015 4:14 pm

Please be positive and constructive with your questions and comments.