diff --git a/buildroot/share/PlatformIO/scripts/mks_robin.py b/buildroot/share/PlatformIO/scripts/mks_robin.py index e4109635c85d..742f4cd17379 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin.py @@ -1,7 +1,9 @@ Import("env") # Relocate firmware from 0x08000000 to 0x08007000 -env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728)) +for define in env['CPPDEFINES']: + if define[0] == "VECT_TAB_ADDR": + env['CPPDEFINES'].remove(define) env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/mks_robin.ld") diff --git a/platformio.ini b/platformio.ini index 15b8e6c24d2d..f23ac3e54638 100644 --- a/platformio.ini +++ b/platformio.ini @@ -297,12 +297,13 @@ monitor_speed = 250000 # MKS Robin (STM32F103ZET6) # [env:mks_robin] -platform = ststm32@<4.4.0 +platform = ststm32 framework = arduino board = genericSTM32F103ZE extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin.py build_flags = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py ${common.build_flags} + -DSTM32F1 -DdigitalPinHasPWM(P)='(PIN_MAP[P].timer_device != NULL)' src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} lib_ignore = c1921b4