Browse Source

PIO env for MKS Nano boards in STM32 (#19905)

Victor Oliveira 4 years ago
parent
commit
50ba20fe1f
No account linked to committer's email address
2 changed files with 28 additions and 6 deletions
  1. 1
    1
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h
  2. 27
    5
      platformio.ini

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h View File

@@ -25,7 +25,7 @@
25 25
  * MKS Robin nano (STM32F130VET6) board pin assignments
26 26
  */
27 27
 
28
-#if NOT_TARGET(__STM32F1__)
28
+#if NOT_TARGET(__STM32F1__, STM32F1)
29 29
   #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
30 30
 #elif HOTENDS > 2 || E_STEPPERS > 2
31 31
   #error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue."

+ 27
- 5
platformio.ini View File

@@ -1310,17 +1310,39 @@ build_flags          = ${lerdge_common.build_flags}
1310 1310
 # RUMBA32
1311 1311
 #
1312 1312
 [env:rumba32]
1313
-platform      = ${common_stm32.platform}
1314
-extends       = common_stm32
1315
-build_flags   = ${common_stm32.build_flags}
1313
+platform        = ${common_stm32.platform}
1314
+extends         = common_stm32
1315
+build_flags     = ${common_stm32.build_flags}
1316 1316
   -Os
1317 1317
   -DHAL_PCD_MODULE_ENABLED
1318 1318
   -DDISABLE_GENERIC_SERIALUSB
1319 1319
   -DHAL_UART_MODULE_ENABLED
1320 1320
   -DTIMER_SERIAL=TIM9
1321
-board         = rumba32_f446ve
1321
+board           = rumba32_f446ve
1322 1322
 upload_protocol = dfu
1323
-monitor_speed = 500000
1323
+monitor_speed   = 500000
1324
+
1325
+#
1326
+# MKS Robin Nano V1.2 and V2 using hal STM32
1327
+#
1328
+[env:mks_robin_nano35_stm32]
1329
+platform             = ${common_stm32.platform}
1330
+extends              = common_stm32
1331
+build_flags          = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
1332
+board                = genericSTM32F103VE
1333
+board_build.core     = stm32
1334
+board_build.variant  = MARLIN_F103Vx
1335
+board_build.ldscript = ldscript.ld
1336
+board_build.offset   = 0x7000
1337
+board_build.firmware = Robin_nano35.bin
1338
+board_upload.offset_address = 0x08007000
1339
+build_unflags        = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
1340
+debug_tool           = jlink
1341
+upload_protocol      = jlink
1342
+extra_scripts        = ${common.extra_scripts}
1343
+  pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
1344
+  buildroot/share/PlatformIO/scripts/stm32_bootloader.py
1345
+  buildroot/share/PlatformIO/scripts/mks_encrypt.py
1324 1346
 
1325 1347
 #################################
1326 1348
 #                               #

Loading…
Cancel
Save