8000 Linking fails with STM32Duino platform >2.7.1 when USB CDC is used · Issue #1692 · Sloeber/arduino-eclipse-plugin · GitHub
[go: up one dir, main page]

Skip to content
Linking fails with STM32Duino platform >2.7.1 when USB CDC is used #1692
@arthurfprecht

Description

@arthurfprecht

Describe your environment
Sloeber roduct 4.4.3
OS: Linux Mint 22
Platform and Arduino configurations on section below

Describe the bug
Linking fails with STM32Duino platform >2.7.1, due to changes in the USB CDC code structure when STM32duino updated from 2.7.1 to 2.8.0

To Reproduce
Steps to reproduce the behavior:

  1. Download Sloeber Product 4.4.3
  2. Add Platform from STM32Duino version >2.7.1
  3. Try any code with USB Serial (USB support to CDC gerenic Serial Supersede USART)
  4. Add the srcWrapper library and try to compile (Errors during linking will occur)
    Snippets of the errors:
    Starting combiner
    blink_f401.ino:10:(.text.setup+0x24): undefined reference to SerialUSB'
    STMicroelectronics/hardware/stm32/2.8.0/libraries/SrcWrapper/src/stm32/hw_config.c:79:(.text.hw_config_init+0x20): undefined reference to USBD_CDC_init'
    STMicroelectronics/hardware/stm32/2.8.0/cores/arduino/WSerial.cpp:66:(.text._Z14serialEventRunv+0x18): undefined reference to USBSerial::available()'
  5. (workaround attempt) Add USBDevice library, compile and run (USB Serial will not work)

platform:
Arduino Core STM32

screenshot of project properties->arduino:
image

Expected behavior
The linking should work (i.e. the library should be added automatically) and no workaround (manually adding USBDevice.h) should be employed

Data to back up your claim
Even if the workaround of manually adding the USBDevice.h causes the code to compile, the Serial does not work, as explained in a similar issue that happened on Platformio

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0