diff --git a/platformio.ini b/platformio.ini
index 7689aea3c3257693a0482e18060758c06b6834cf..9cf2c918ed71867cb99b0dc2477e5ac624af4344 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -483,11 +483,14 @@ lib_ignore    = Adafruit NeoPixel, SPI
 [env:mks_robin_nano]
 platform      = ststm32
 board         = genericSTM32F103VE
+platform_packages = tool-stm32duino
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
-  ${common.build_flags} -std=gnu++14
+  ${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL -DSS_TIMER=4
 build_unflags = -std=gnu++11
 extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano.py
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
+lib_deps =
+  SoftwareSerialM=https://github.com/FYSETC/SoftwareSerialM/archive/master.zip
 lib_ignore    = Adafruit NeoPixel, SPI
 
 #