SEED SAMD21 project uses ESP32 core files

Hi,
I’m working with XIAO SAMD21 and ESP32 projects. I discover in my XIAO SAMD21 projects that Serial is not working as expected (so “Serial” is always true independed if a terminal is connected or not).
When I do a right click on “Serial” and to “Go to Definition” it liks to

C:\Users\name\.platformio\packages\framework-arduinoespressif32\cores\esp32\HWCDC.cpp

I would have expected it should go to Samd core and not ESP32:

.platformio/packages/framework-arduino-samd-seeed/cores/arduino/USB/USBAPI.h

Nothing special in the platformio.ini:

[env:seeed_xiao]
platform = atmelsam
board = seeed_xiao
framework = arduino

any hints ?
br

Do you have multiple projects open in your VSCode workspace? Make sure to use the project environment switcher to select your SAMD project, if so.

yes you a right ! without ESP32 projects in workspace its pointing to the right one :slight_smile:
Nebertheless any idea why the Flag “Serial” can not be evaluated like it is decribed in reference? Its always true (1) independent if a serial connection is established or not. What I what to archive is to detect if a serial terminal is connected to the device.