ArduinoIDE conflicting with platformIO build. Not able to communicate with BTT E3 V3

Hi. I am relatively new to software development so please pardon any obvious look overs.

I am trying to compile a custom Marlin project for my BTT SKR E3 V3 board with runs the stm32g0 chip.

Until yesterday I tried multiple iterations of building my software and it worked fine. When compiled the same code today, the corresponding firmware behaved very weirdly.

Firstly, the Status LED on the board stopped blinking when the firmware was ready. The board was not able to communicate to my laptop via serial. And the command M17 times out and there is no input.

I tried comment and uncommenting my code line by line and it did not make sense. It was not working with variable I had defined just above. This was not happening until yesterday.

I have connected an external sensor with I2C to my board at PB8 (SDA) and PB9 (SCL).

I have tried uninstalling platformIO and deleting the .platformIO folder and then reinstalling everything but that only party fixed the problem.

The only change I made was to update my Arduino IDE on my PC.

I am out of ideas and I don’t really know what to do. Please help me.