Browse Source

🐛 Followup to HAL/STM32 targets (Longer3D timers) (#22369)

Tanguy Pruvot 4 years ago
parent
commit
5b43795f54
No account linked to committer's email address
2 changed files with 13 additions and 11 deletions
  1. 6
    2
      buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h
  2. 7
    9
      ini/stm32f1.ini

+ 6
- 2
buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h View File

132
 
132
 
133
 // Timer Definitions (optional)
133
 // Timer Definitions (optional)
134
 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
134
 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
135
-#define TIMER_TONE              TIM3
136
-#define TIMER_SERVO             TIM2
135
+#ifndef TIMER_TONE
136
+  #define TIMER_TONE            TIM6
137
+#endif
138
+#ifndef TIMER_SERVO
139
+  #define TIMER_SERVO           TIM7
140
+#endif
137
 
141
 
138
 // UART Definitions
142
 // UART Definitions
139
 // Define here Serial instance number to map on Serial generic name
143
 // Define here Serial instance number to map on Serial generic name

+ 7
- 9
ini/stm32f1.ini View File

194
 [env:flsun_hispeedv1]
194
 [env:flsun_hispeedv1]
195
 platform             = ${common_stm32.platform}
195
 platform             = ${common_stm32.platform}
196
 extends              = common_stm32
196
 extends              = common_stm32
197
-build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
197
+build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
198
 board                = genericSTM32F103VE
198
 board                = genericSTM32F103VE
199
 board_build.core     = stm32
199
 board_build.core     = stm32
200
 board_build.variant  = MARLIN_F103Vx
200
 board_build.variant  = MARLIN_F103Vx
210
 [env:mks_robin_nano35]
210
 [env:mks_robin_nano35]
211
 platform             = ${common_stm32.platform}
211
 platform             = ${common_stm32.platform}
212
 extends              = common_stm32
212
 extends              = common_stm32
213
-build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3
213
+build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
214
 board                = genericSTM32F103VE
214
 board                = genericSTM32F103VE
215
 board_build.core     = stm32
215
 board_build.core     = stm32
216
 board_build.variant  = MARLIN_F103Vx
216
 board_build.variant  = MARLIN_F103Vx
272
 board_build.variant = MARLIN_F103Vx
272
 board_build.variant = MARLIN_F103Vx
273
 board_build.offset  = 0x7000
273
 board_build.offset  = 0x7000
274
 board_build.encrypt = Robin_mini.bin
274
 board_build.encrypt = Robin_mini.bin
275
-build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE
275
+build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
276
 board_upload.offset_address = 0x08007000
276
 board_upload.offset_address = 0x08007000
277
 extra_scripts       = ${stm32f1_variant.extra_scripts}
277
 extra_scripts       = ${stm32f1_variant.extra_scripts}
278
 
278
 
326
 board_build.variant = MARLIN_F103Vx
326
 board_build.variant = MARLIN_F103Vx
327
 board_build.offset  = 0x7000
327
 board_build.offset  = 0x7000
328
 board_build.encrypt = Robin_e3p.bin
328
 board_build.encrypt = Robin_e3p.bin
329
-build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4
329
+build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2
330
 board_upload.offset_address = 0x08007000
330
 board_upload.offset_address = 0x08007000
331
 extra_scripts       = ${stm32f1_variant.extra_scripts}
331
 extra_scripts       = ${stm32f1_variant.extra_scripts}
332
 debug_tool          = jlink
332
 debug_tool          = jlink
369
 extends             = common_stm32
369
 extends             = common_stm32
370
 board               = genericSTM32F103VE
370
 board               = genericSTM32F103VE
371
 board_build.core    = stm32
371
 board_build.core    = stm32
372
-board_build.variant = MARLIN_F103Zx
372
+board_build.variant = MARLIN_F103Vx
373
 board_build.offset  = 0x1000
373
 board_build.offset  = 0x1000
374
 board_build.address = 0x08010000
374
 board_build.address = 0x08010000
375
-build_flags         = ${common_stm32.build_flags}
376
-  -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
377
-build_unflags       = ${common_stm32.build_unflags}
378
-  -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
375
+build_flags         = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12
376
+build_unflags       = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
379
 extra_scripts       = ${stm32f1_variant.extra_scripts}
377
 extra_scripts       = ${stm32f1_variant.extra_scripts}
380
   buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
378
   buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
381
 
379
 

Loading…
Cancel
Save