How to get Arduino IDE to recognise ports on Debian Bookworm

Hi,

I'm trying to use the Arduino IDE (both v1.8.19 and AppImage v2.3.5) to program up an STM32 microcontroller board but without success. Both of the IDEs have the Tools/Port option greyed out.

I have ensured that I am a member of the dialout group, that openocd, libusb, and java are all installed.

The command lsusb does seem to find the board, as shown below.

stuart@localhost:~$ lsusb
Bus 002 Device 007: ID 0483:3748 STMicroelectronics ST-LINK/V2
Bus 002 Device 003: ID 89e5:1001   USB OPTICAL MOUSE
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 0cf3:3005 Qualcomm Atheros Communications AR3011 Bluetooth
Bus 001 Device 003: ID 0c45:6436 Microdia Sony Visual Communication Camera
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
stuart@localhost:~$ 

Using the Board Manager, I have managed to get both IDEs to add the options for the STM32 boards. I can now select my board from the newly added list of STM32 boards.

Is there anything else I need to do ? For example, set a particular connection mode in the IDE Tools menu, something else ?

Stuart

I have decided to abandon this due to the vast amount of error messages generated when I tried to compile & download Files/Examples/Basic/Blinky to the board. If I knew how to attach a file to this posting, I would do so to let you see just how many errors there were.

Hi @mhoram.

I don't have much experience using 3rd party STM32 boards, but I can tell you that the ST-LINK/V2 alone is not a serial port device (though the STMicroelectronics dev boards with an integrated ST-LINK do have a serial port capability), so it is expected that you won't see a port in Arduino IDE from an ST-LINK/V2. However, you can still use Arduino IDE to upload to STM32 boards via an ST-LINK/V2 programmer. You only need to make sure to configure Arduino IDE for use with an ST-LINK/V2 programmer.

Try this (I'm assuming you are using the "STM32 MCU based boards" platform AKA "STM32duino"):

  1. Connect the STM32 board to your computer.
  2. Select the appropriate family from Arduino IDE's Tools > Board menu.
  3. Select the appropriate part number from Arduino IDE's Tools > Board part number menu.
  4. Select Tools > Upload method > OpenOCD STLink (SWD) from the Arduino IDE menus.
  5. Select Sketch > Upload from the Arduino IDE menus.

There is more information about uploading to STM32 boards here:

Do you mean File > Examples > 01.Basics > Blink?

Please do this:

  1. Select Sketch > Verify/Compile from the Arduino IDE menus.
  2. Wait for the compilation to fail.
  3. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  6. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  7. Move the cursor outside of the code block markup before you add any additional text to your reply.
  8. Click the "Reply" button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.

Click here for attachment instructions

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:

    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.