WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SCL TRISB4 // I2C bus | |
#define SDA TRISB1 // | |
#define SCL_IN RB4 // | |
#define SDA_IN RB1 // | |
// initialize | |
SDA = SCL = 1 ; | |
SCL_IN = SDA_IN = 0 ; | |
// make master wait |