cancel
Showing results for 
Search instead for 
Did you mean: 

Can't connect STM32F407VGT6 Discovery Board to Arduino IDE

SElli.11
Associate III

Originally a comment on the How to program and debug the STM32 using the Arduino IDE Knowledge base article.

Moved to main forum for better visibility & discussion.


Hi,

I'm trying to get an STM32F407VGT6-based Discovery board up and running using Arduino IDE v 2.3.5 on Debian Bookworm (fully updated). I am having a problem in that the status line of the Arduino IDE  states that "Discovery [not connected]". In the Arduino IDE/Tools menu, the Port option is greyed out.

I have two(!) wires connected between the Discovery board and the laptop's usb ports. I have also ensured that the laptop has libusb-1.0-0(v2:1.0.26-1) which is the latest version, according to Synaptic. I have also ensured that I am a member of the dialout group.

I tried to install STM32CubeProgrammer but, during this install, the laptop reported that there was no more space left on the device. I cannot remember quite what the error message was but I think that it referenced the /tmp partition. I have checked this 83.5 MiB partition and found that it is only 19% used.

Where do I go from here ?

13 REPLIES 13

@Andrei Chichak wrote:

The Discovery-F4 board has two USB ports, one for the debugger module (ST-Link), and the other connected to the '407 processor.


Indeed.

@SElli.11 this is all described in the User Manual:

AndrewNeil_0-1744271797432.png

https://www.st.com/resource/en/user_manual/um1472-discovery-kit-with-stm32f407vg-mcu-stmicroelectronics.pdf#page=10

via: https://www.st.com/en/evaluation-tools/stm32f4discovery.html#documentation

 

AndrewNeil_2-1744271984553.png

 

On this board, note that the ST-Link's Virtual COM Port (VCP) is not connected to the Target MCU - you have to wire that manually yourself:

AndrewNeil_3-1744272271356.png

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Thank you for your recent replies and please accept my apologies for my tardiness in getting back to you.

I now have only one cable connected to the Discovery board. It is connected to the board's usb  port CN1. This is this cable's first usage so should still be in good condition/operable.

I am still having a problem with the Arduino IDE version 1.8.19 Tools menu Port option still(!) being greyed out. A user in the Arduino community forum managed to overcome this problem by installing either v2.7.1 or v2.9.0 of STMDuino into the V1.8.19 IDE. I have tried both. The IDE Port option is still greyed out. As I also get the same problem with v2.3.5 of the IDE I was thinking that perhaps the cause lay at a lower level, within Debian Bookworm itself. I am currently in discussions with the Debian forum to see if this is the case and what, if any, remedial action needs to be carried out.


@SElli.11 wrote:

I now have only one cable connected to the Discovery board. It is connected to the board's usb  port CN1.


So connected to the ST-Link, and providing power to the board.

 


@SElli.11 wrote:

This is this cable's first usage so should still be in good condition/operable.


Are you sure that it's a data cable - not just a charging cable?

 


@SElli.11 wrote:

I am still having a problem with the Arduino IDE version 1.8.19 Tools menu Port option still(!) being greyed out. out.


As noted above, remember that the VCP is not connected to the Target MCU on this board - you have to manually wire it.

Is the port actually being detected by the PC:

https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/tac-p/698105/highlight/true#M956

Can you connect with STM32CubeIDE and/or CubeProgrammer?

 

Again, Arduino-specific issues would be best posted to the Arduino forums:

https://forum.arduino.cc/c/development-tools/ide-2-x/93

and/or the STM32duino forum: https://www.stm32duino.com/

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

 

>>> Are you sure that it's a data cable - not just a charging cable?


Yes, it is a data cable. Looking inside the front of the type A plug, I can clearly see 4 small metal-strip connectors.

 

I'm also having a problem with STM32CubeIDE. I have put together a small "blinky" program. This compiles cleanly with zero errors or warnings. However, when I try to upload this to the board, the IDE generates the following dialog.

SElli11_0-1744726189844.png

When I click the OK button the following dialog appears.

SElli11_1-1744726282923.png

As can be seen, the update button has been greyed out. How then do I upgrade this ST-LINK/V2 ? Also, is this a piece of hardware or software ? If hardware, this might be the source of my problems all along. if it is software, I do(!) have ST LINK (Stlink Tools) installed, if that is any help.

It is a pure shame that I cannot(!!) just drop in to STM's Edinburgh location. All of this could probably be fixed within an hour face-to-face session with a knowledgeable engineer. Yes, I do realise that staff are fully employed in their various tasks. Still, though...