Skip to content

Commit

Permalink
Fix compilation problem on up-to-date ststm32 platform
Browse files Browse the repository at this point in the history
  • Loading branch information
jmz52 committed Mar 26, 2019
1 parent e24a41f commit cc39d62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion buildroot/share/PlatformIO/scripts/mks_robin.py
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
3 changes: 2 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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} +<src/HAL/HAL_STM32F1>
lib_deps = ${common.lib_deps}
lib_ignore = c1921b4
Expand Down

1 comment on commit cc39d62

@pinchies
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh that's a clever solution

Please sign in to comment.