From 7cb286bb6e28fec1e202a6e0b4b77204e58802c4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 25 Feb 2021 00:56:15 -0600 Subject: [PATCH] Expose more env builds in PlatformIO extension --- Marlin/src/pins/pins.h | 2 +- platformio.ini | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 62545037d..f5b80fd4d 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -603,7 +603,7 @@ #elif MB(MKS_ROBIN_PRO_V2) #include "stm32f4/pins_MKS_ROBIN_PRO_V2.h" // STM32F4 env:mks_robin_pro2 #elif MB(MKS_ROBIN_NANO_V3) - #include "stm32f4/pins_MKS_ROBIN_NANO_V3.h" // STM32F4 env:mks_robin_nano_v3 env:mks_robin_nano_v3_usb_flash_drive + #include "stm32f4/pins_MKS_ROBIN_NANO_V3.h" // STM32F4 env:mks_robin_nano_v3 env:mks_robin_nano_v3_usb_flash_drive env:mks_robin_nano_v3_usb_flash_drive_msc #elif MB(ANET_ET4) #include "stm32f4/pins_ANET_ET4.h" // STM32F4 env:Anet_ET4_OpenBLT #elif MB(ANET_ET4P) diff --git a/platformio.ini b/platformio.ini index d2ed8a4a5..5b2e5cd3b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1376,6 +1376,7 @@ build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUS # Lerdge X # [env:LERDGEX] +platform = ${lerdge_common.platform} extends = lerdge_common board_build.firmware = Lerdge_X_firmware_force.bin @@ -1383,6 +1384,7 @@ board_build.firmware = Lerdge_X_firmware_force.bin # Lerdge X with USB Flash Drive Support # [env:LERDGEX_usb_flash_drive] +platform = ${LERDGEX.platform} extends = LERDGEX platform_packages = ${stm32_flash_drive.platform_packages} build_flags = ${stm32_flash_drive.build_flags} @@ -1391,6 +1393,7 @@ build_flags = ${stm32_flash_drive.build_flags} # Lerdge S # [env:LERDGES] +platform = ${lerdge_common.platform} extends = lerdge_common board_build.firmware = Lerdge_firmware_force.bin @@ -1398,6 +1401,7 @@ board_build.firmware = Lerdge_firmware_force.bin # Lerdge S with USB Flash Drive Support # [env:LERDGES_usb_flash_drive] +platform = ${LERDGES.platform} extends = LERDGES platform_packages = ${stm32_flash_drive.platform_packages} build_flags = ${stm32_flash_drive.build_flags} @@ -1406,6 +1410,7 @@ build_flags = ${stm32_flash_drive.build_flags} # Lerdge K # [env:LERDGEK] +platform = ${lerdge_common.platform} extends = lerdge_common board_build.firmware = Lerdge_K_firmware_force.bin build_flags = ${lerdge_common.build_flags} @@ -1415,6 +1420,7 @@ build_flags = ${lerdge_common.build_flags} # Lerdge K with USB Flash Drive Support # [env:LERDGEK_usb_flash_drive] +platform = ${LERDGEK.platform} extends = LERDGEK platform_packages = ${stm32_flash_drive.platform_packages} build_flags = ${stm32_flash_drive.build_flags} @@ -1480,13 +1486,19 @@ extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py +# +# This SPI is used by Robin Nano V3 +# +[stm32f4_I2C1] +build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 + # # MKS Robin Nano V3 # [env:mks_robin_nano_v3] platform = ${common_stm32.platform} extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 +build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC board = genericSTM32F407VGT6 board_build.core = stm32 board_build.variant = MARLIN_F4x7Vx @@ -1508,8 +1520,7 @@ extra_scripts = ${common.extra_scripts} [env:mks_robin_nano_v3_usb_flash_drive] extends = env:mks_robin_nano_v3 platform_packages = ${stm32_flash_drive.platform_packages} -build_flags = ${stm32_flash_drive.build_flags} - -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 +build_flags = ${stm32_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} -DUSBCON -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 @@ -1522,11 +1533,11 @@ build_flags = ${stm32_flash_drive.build_flags} # Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged # [env:mks_robin_nano_v3_usb_flash_drive_msc] +platform = ${common_stm32.platform} extends = env:mks_robin_nano_v3 platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC -build_flags = ${stm32_flash_drive.build_flags} - -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 +build_flags = ${stm32_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} -DUSBCON -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5