ESP8266 WiFi Shield on STM32

Hello,

I successfully managed to work with SparkFun ESP8266 WiFi Shield on STM32 Nucleo-64 dev board, using its HW Serial interface. I’m using the following definition to initialize ESP32 USART1:

HardwareSerial hwSerial1(USART1);

Now I would like to adapt SparkFunESP8266WiFi library to work with STM32, using HW Serial I/F. For this purpose, I have modified swSerial definition in SparkFunESP8266WiFi.h file, as below:

static HardwareSerial swSerial(USART1);
… so it will initialize USART1 by default, instead of SoftwareSerial.

Although it compiles without errors, it doesn’t works (the USART1 doesn’t initialized). Any idea what is wrong here?

Thanks a lot,

A2W