Collect2.exe: error: ld returned 1 exit status *** [.pio\build\m5stack-core-esp32\firmware.elf] Error 1

unfortunately, still nothing works.
The mac can not connect to the M5stack core2. it remains at: Connecting ----…----…
Now I have switched back to my windows laptop and there comes this error.
Can anyone help me with either problem?

    Processing m5stack-core-esp32 (platform: espressif32@2.1.0; board: m5stack-core-esp32; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-core-esp32.html
PLATFORM: Espressif 32 (2.1.0) > M5Stack Core ESP32
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 3.10004.210126 (1.0.4)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <M5Core2> 0.0.6+sha.a42f1a2
|   |-- <Wire> 1.0.1
|   |-- <FS> 1.0
|   |-- <SD(esp32)> 1.0.5
|   |   |-- <FS> 1.0
|   |   |-- <SPI> 1.0
|   |-- <SPI> 1.0
|   |-- <HTTPClient> 1.2
|   |   |-- <WiFi> 1.0
|   |   |-- <WiFiClientSecure> 1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <SPIFFS> 1.0
|   |   |-- <FS> 1.0
|   |-- <M5Stack> 0.3.9
|   |   |-- <FS> 1.0
|   |   |-- <SPIFFS> 1.0
|   |   |   |-- <FS> 1.0
|   |   |-- <SPI> 1.0
|   |   |-- <HTTPClient> 1.2
|   |   |   |-- <WiFi> 1.0
|   |   |   |-- <WiFiClientSecure> 1.0
|   |   |   |   |-- <WiFi> 1.0
|   |   |-- <Wire> 1.0.1
|   |   |-- <SD(esp32)> 1.0.5
|   |   |   |-- <FS> 1.0
|   |   |   |-- <SPI> 1.0
|-- <ESPAsync_WiFiManager> 1.4.3+sha.f482bb8
|   |-- <AsyncTCP> 1.1.1
|   |-- <ESP Async WebServer> 1.2.3
|   |   |-- <AsyncTCP> 1.1.1
|   |   |-- <FS> 1.0
|   |   |-- <WiFi> 1.0
|   |   |-- <ArduinoJson> 6.17.2
|   |-- <LittleFS_esp32> 1.0.6
|   |   |-- <FS> 1.0
|   |-- <DNSServer> 1.1.0
|   |   |-- <WiFi> 1.0
|   |-- <WiFi> 1.0
|-- <SparkFun SCD30 Arduino Library> 1.0.10
|   |-- <Wire> 1.0.1
|-- <NTPClient> 3.1.0
|-- <ArduinoJson> 6.17.2
|-- <PubSubClient> 2.8.0
|-- <M5Stack> 0.3.9
|   |-- <FS> 1.0
|   |-- <SPIFFS> 1.0
|   |   |-- <FS> 1.0
|   |-- <SPI> 1.0
|   |-- <HTTPClient> 1.2
|   |   |-- <WiFi> 1.0
|   |   |-- <WiFiClientSecure> 1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <Wire> 1.0.1
|   |-- <SD(esp32)> 1.0.5
|   |   |-- <FS> 1.0
|   |   |-- <SPI> 1.0
|-- <M5Core2> 0.0.9
|   |-- <Wire> 1.0.1
|   |-- <SPIFFS> 1.0
|   |   |-- <FS> 1.0
|   |-- <FS> 1.0
|   |-- <SPI> 1.0
|   |-- <HTTPClient> 1.2
|   |   |-- <WiFi> 1.0
|   |   |-- <WiFiClientSecure> 1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <M5Stack> 0.3.9
|   |   |-- <FS> 1.0
|   |   |-- <SPIFFS> 1.0
|   |   |   |-- <FS> 1.0
|   |   |-- <SPI> 1.0
|   |   |-- <HTTPClient> 1.2
|   |   |   |-- <WiFi> 1.0
|   |   |   |-- <WiFiClientSecure> 1.0
|   |   |   |   |-- <WiFi> 1.0
|   |   |-- <Wire> 1.0.1
|   |   |-- <SD(esp32)> 1.0.5
|   |   |   |-- <FS> 1.0
|   |   |   |-- <SPI> 1.0
|   |-- <SD(esp32)> 1.0.5
|   |   |-- <FS> 1.0
|   |   |-- <SPI> 1.0
|   |-- <ArduinoJson> 6.17.2
|   |-- <ESPAsync_WiFiManager> 1.4.3+sha.f482bb8
|   |   |-- <AsyncTCP> 1.1.1
|   |   |-- <ESP Async WebServer> 1.2.3
|   |   |   |-- <AsyncTCP> 1.1.1
|   |   |   |-- <FS> 1.0
|   |   |   |-- <WiFi> 1.0
|   |   |   |-- <ArduinoJson> 6.17.2
|   |   |-- <LittleFS_esp32> 1.0.6
|   |   |   |-- <FS> 1.0
|   |   |-- <DNSServer> 1.1.0
|   |   |   |-- <WiFi> 1.0
|   |   |-- <WiFi> 1.0
|   |-- <NTPClient> 3.1.0
|   |-- <PubSubClient> 2.8.0
|   |-- <SparkFun SCD30 Arduino Library> 1.0.10
|   |   |-- <Wire> 1.0.1
|   |-- <Update> 1.0
|   |-- <WiFi> 1.0
|-- <FS> 1.0
|-- <HTTPClient> 1.2
|   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0
|-- <SD(esp32)> 1.0.5
|   |-- <FS> 1.0
|   |-- <SPI> 1.0
|-- <SPI> 1.0
|-- <SPIFFS> 1.0
|   |-- <FS> 1.0
|-- <Update> 1.0
|-- <WiFi> 1.0
Building in release mode
Linking .pio\build\m5stack-core-esp32\firmware.elf
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Core2.cpp.o):(.bss.M5+0x0): multiple definition of `M5'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Stack.cpp.o):(.bss.M5+0x0): first defined here
c:/users/jurid/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: Warning: size of symbol `M5' changed from 344 in .pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Stack.cpp.o) to 1872 in .pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Core2.cpp.o)
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::isPressed()':
C:\m5stack_co2_sensor_richtig\co2-sensor/.pio/libdeps/m5stack-core-esp32/M5Core2@src-ec70de5db1e83402e8bcc4844647679d/src/utility/M5Button.cpp:222: multiple definition of `Button::isPressed()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):C:\m5stack_co2_sensor_richtig\co2-sensor/.pio/libdeps/m5stack-core-esp32/M5Stack/src/utility/Button.cpp:87: first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::isReleased()':
M5Button.cpp:(.text._ZN6Button10isReleasedEv+0x0): multiple definition of `Button::isReleased()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):Button.cpp:(.text._ZN6Button10isReleasedEv+0x0): first defined here 
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::wasPressed()':
M5Button.cpp:(.text._ZN6Button10wasPressedEv+0x0): multiple definition of `Button::wasPressed()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):Button.cpp:(.text._ZN6Button10wasPressedEv+0x0): first defined here 
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::wasReleased()':
M5Button.cpp:(.text._ZN6Button11wasReleasedEv+0x0): multiple definition of `Button::wasReleased()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):Button.cpp:(.text._ZN6Button11wasReleasedEv+0x0): first defined here.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::wasReleasefor(unsigned int)':
M5Button.cpp:(.text._ZN6Button13wasReleaseforEj+0x0): multiple definition of `Button::wasReleasefor(unsigned int)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):Button.cpp:(.text._ZN6Button13wasReleaseforEj+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::pressedFor(unsigned int)':
M5Button.cpp:(.text._ZN6Button10pressedForEj+0x0): multiple definition of `Button::pressedFor(unsigned int)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):Button.cpp:(.text._ZN6Button10pressedForEj+0x0): first defined here 
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::pressedFor(unsigned int, unsigned int)':
M5Button.cpp:(.text._ZN6Button10pressedForEjj+0x0): multiple definition of `Button::pressedFor(unsigned int, unsigned int)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):Button.cpp:(.text._ZN6Button10pressedForEjj+0x0): first defined here.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::releasedFor(unsigned int)':
M5Button.cpp:(.text._ZN6Button11releasedForEj+0x0): multiple definition of `Button::releasedFor(unsigned int)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):Button.cpp:(.text._ZN6Button11releasedForEj+0x0): first defined here.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Button.cpp.o): In function `Button::lastChange()':
M5Button.cpp:(.text._ZN6Button10lastChangeEv+0x0): multiple definition of `Button::lastChange()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(Button.cpp.o):Button.cpp:(.text._ZN6Button10lastChangeEv+0x0): first defined here 
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o):(.data.jd_errors+0x0): multiple definition of `jd_errors'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):(.data.jd_errors+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::M5Display()':
M5Display.cpp:(.text._ZN9M5DisplayC2Ev+0x0): multiple definition of `M5Display::M5Display()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5DisplayC2Ev+0x0): first defined here  
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::M5Display()':
M5Display.cpp:(.text._ZN9M5DisplayC2Ev+0x0): multiple definition of `M5Display::M5Display()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5DisplayC2Ev+0x0): first defined here  
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::begin()':
M5Display.cpp:(.text._ZN9M5Display5beginEv+0x0): multiple definition of `M5Display::begin()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display5beginEv+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::sleep()':
M5Display.cpp:(.text._ZN9M5Display5sleepEv+0x0): multiple definition of `M5Display::sleep()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display5sleepEv+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::wakeup()':
M5Display.cpp:(.text._ZN9M5Display6wakeupEv+0x0): multiple definition of `M5Display::wakeup()'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display6wakeupEv+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::setBrightness(unsigned char)':
M5Display.cpp:(.text._ZN9M5Display13setBrightnessEh+0x0): multiple definition of `M5Display::setBrightness(unsigned char)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display13setBrightnessEh+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawBitmap(short, short, short, short, unsigned short const*, unsigned short)':
M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPKtt+0x0): multiple definition of `M5Display::drawBitmap(short, short, short, short, unsigned short const*, unsigned short)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPKtt+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawBitmap(short, short, short, short, unsigned char const*)':
M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPKh+0x0): multiple definition of `M5Display::drawBitmap(short, short, short, short, unsigned char const*)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPKh+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawBitmap(short, short, short, short, unsigned short const*)':
M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPKt+0x0): multiple definition of `M5Display::drawBitmap(short, short, short, short, unsigned short const*)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPKt+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawBitmap(short, short, short, short, unsigned char*)':
M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPh+0x0): multiple definition of `M5Display::drawBitmap(short, short, short, short, unsigned char*)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPh+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawBitmap(short, short, short, short, unsigned short*)':
M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPt+0x0): multiple definition of `M5Display::drawBitmap(short, short, short, short, unsigned short*)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display10drawBitmapEssssPt+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::progressBar(int, int, int, int, unsigned char)':
M5Display.cpp:(.text._ZN9M5Display11progressBarEiiiih+0x0): multiple definition of `M5Display::progressBar(int, int, int, int, unsigned char)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display11progressBarEiiiih+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::qrcode(char const*, unsigned short, unsigned short, unsigned char, unsigned char)':
M5Display.cpp:(.text._ZN9M5Display6qrcodeEPKctthh+0x0): multiple definition of `M5Display::qrcode(char const*, unsigned short, unsigned short, unsigned char, unsigned char)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display6qrcodeEPKctthh+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::qrcode(String const&, unsigned short, unsigned short, unsigned char, unsigned char)':
M5Display.cpp:(.text._ZN9M5Display6qrcodeERK6Stringtthh+0x0): multiple definition of `M5Display::qrcode(String const&, unsigned short, unsigned short, unsigned char, unsigned char)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display6qrcodeERK6Stringtthh+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `read16(fs::File&)':
M5Display.cpp:(.text._Z6read16RN2fs4FileE+0x0): multiple definition of `read16(fs::File&)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._Z6read16RN2fs4FileE+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `read32(fs::File&)':
M5Display.cpp:(.text._Z6read32RN2fs4FileE+0x0): multiple definition of `read32(fs::File&)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._Z6read32RN2fs4FileE+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawJpg(unsigned char const*, unsigned int, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, jpeg_div_t)':
M5Display.cpp:(.text._ZN9M5Display7drawJpgEPKhjtttttt10jpeg_div_t+0x0): multiple definition of `M5Display::drawJpg(unsigned char const*, unsigned int, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, jpeg_div_t)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display7drawJpgEPKhjtttttt10jpeg_div_t+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawPngUrl(char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, double, unsigned char)':
M5Display.cpp:(.text._ZN9M5Display10drawPngUrlEPKcttttttdh+0x0): multiple definition of `M5Display::drawPngUrl(char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, double, unsigned char)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display10drawPngUrlEPKcttttttdh+0x0): 
first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawBmpFile(fs::FS&, char const*, unsigned short, unsigned short)':
M5Display.cpp:(.text._ZN9M5Display11drawBmpFileERN2fs2FSEPKctt+0x0): multiple definition of `M5Display::drawBmpFile(fs::FS&, char const*, unsigned short, unsigned short)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display11drawBmpFileERN2fs2FSEPKctt+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawJpgFile(fs::FS&, char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, jpeg_div_t)':
M5Display.cpp:(.text._ZN9M5Display11drawJpgFileERN2fs2FSEPKctttttt10jpeg_div_t+0x0): multiple definition of `M5Display::drawJpgFile(fs::FS&, char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, jpeg_div_t)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display11drawJpgFileERN2fs2FSEPKctttttt10jpeg_div_t+0x0): first defined here
.pio\build\m5stack-core-esp32\lib8fd\libM5Core2@src-ec70de5db1e83402e8bcc4844647679d.a(M5Display.cpp.o): In function `M5Display::drawPngFile(fs::FS&, char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, double, unsigned char)':
M5Display.cpp:(.text._ZN9M5Display11drawPngFileERN2fs2FSEPKcttttttdh+0x0): multiple definition of `M5Display::drawPngFile(fs::FS&, char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, double, unsigned char)'
.pio\build\m5stack-core-esp32\libc19\libM5Stack.a(M5Display.cpp.o):M5Display.cpp:(.text._ZN9M5Display11drawPngFileERN2fs2FSEPKcttttttdh+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\m5stack-core-esp32\firmware.elf] Error 1
=================================================== [FAILED] Took 23.04 seconds ===================================================
Der Terminalprozess "C:\Users\jurid\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'm5stack-core-esp32'" wurde mit folgendem Exitcode beendet: 1.
[/quote]

Do not use both M5Stack & M5Core2 libraries, they conflict with each other – not sure how both would come in but you can add

lib_ignore = M5Stack

in the platformio.ini to try and work around that problem.