You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Download Sloeber Product 4.4.3
Add Platform from STM32Duino version >2.7.1
Try any code with USB Serial (USB support to CDC gerenic Serial Supersede USART)
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()'
(workaround attempt) Add USBDevice library, compile and run (USB Serial will not work)
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
The text was updated successfully, but these errors were encountered:
I tried to reproduce this and I have very similar behavior in Sloeber V5 and stmDuino version 2.8.1
The only difference were: in step 4
1 )srcWrapper was automagically added after the first build.
2) I got a different error message during linking but also USB related.
Unfortunately the platformio issue does not contain any info on how they fixed it.
Hello jantje, first thank you very much for replicating and adding the issue as documented.
Today I tested a little more and I think I had another issue with the Serial happening alongside this one from USBDevice:
The serial monitor view unfortunately is not working on my setup (described in the original post).
If I use this very simple sketch and compile it with package version 2.7.1:
#include"Arduino.h"uint32_t lastBlink = 0;
bool previousLED = 0;
voidsetup()
{
pinMode(LED_BUILTIN, OUTPUT);
lastBlink = millis();
Serial.begin(115200);
while (!Serial);
}
voidloop()
{
if (millis()-lastBlink > 1000)
{
lastBlink = millis();
previousLED = !previousLED;
digitalWrite(LED_BUILTIN, previousLED);
Serial.println("Something to test the serial\n");
}
}
Then I upload and open the Serial monitor view, I get nothing:
But using other COM port visualizer, like minicom or picocom, I get the output:
I went ahead and tested the newest versions (tested up to 2.9.0). Applying the workaround (Adding USBDevice.h manually) is confirmed to work! 😄
Though now I need to figure out why the Serial monitor view is not working 🥴
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:
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()'
platform:
Arduino Core STM32
screenshot of project properties->arduino:
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
The text was updated successfully, but these errors were encountered: