khoih-prog / WebSockets2_Generic

A WebSocket Server and Client library for Arduino, based on RFC6455, for writing modern Websockets applications. Now support ESP8266, ESP32 (including ESP32-S2 Saola, AI-Thinker ESP-12K, WT32_ETH01, etc.), nRF52, SAMD21, SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, Teensy, RP2040-based, etc. boards, with WiFiNINA, Teensy 4.1 NativeEthernet/QNEthernet, Ethernet W5x00 / ENC28J60 / LAN8742A / LAN8720, ESP8266 / ESP32-AT modules/shields, as well as SINRIC / Alexa / Google Home
GNU General Public License v3.0
81 stars 30 forks source link

VSCode + PIO for Teensy4.1 compilation error. Complaining stm32_eth.h missing! #33

Closed dattasaurabh82 closed 2 years ago

dattasaurabh82 commented 2 years ago

Setup and Target information:

Note: The library was installed using platformio's library manager

Simplest platformio.ini file content:

[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
lib_deps = khoih-prog/WebSockets2_Generic@^1.8.1

Simplest main.cpp content:

#include <Arduino.h>

void setup()
{
  // put your setup code here, to run once:
}

void loop()
{
  // put your main code here, to run repeatedly:
}

The problem:

Screenshot 2021-10-15 at 4 13 26 PM

While trying to compile against Teensy4.1 with built in Ethernet, it not compiling but throwing errors complaining that:

  1. In <proj_dir>/.pi/libdeps/teensy41/STM32Ethernet/src/utility/stm32_eth.h, the reference stm32_def.h can not be located. Screenshot 2021-10-15 at 4 32 59 PM

  2. And that in <proj_dir>/.pio/build/teensy41/lib24a/STM32Ethernet/utility/, the stm32_eth.cpp is also missing.

Don't know what's happening 😶 I guessing no need to use any patch files like in case of Arduino IDE installation, mentioned in the README? (That's one reason for me to choose PIO in VS code over Arduino IDE)

Any pointers?

khoih-prog commented 2 years ago

I suggest, while not having enough research and test, you'd better try with Arduino IDE first to have knowledge about the board and library before going to more sophisticated PIO, which requires lot more skills and better knowledge to use.

You also have to know Teensy 4.1 has no relation to STM32 at all.

Check Missing stm32_def.h for Teensy 4.1 #14

If having more issue, I suggest you ask for help in PIO forum and no more pointer will be provided.

Good Luck,