Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the platformio.ini to compile SKR2 #182

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 99 additions & 21 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,21 @@ src_dir = Src
[common]
build_flags =
-I .
-I boards
-I FatFs
-I FatFs/STM
-I Drivers/FATFS/Target
-I Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc
-I Middlewares/ST/STM32_USB_Device_Library/Core/Inc
-I USB_DEVICE/App
-I Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc
-I Middlewares/ST/STM32_USB_Device_Library/Core/Inc
-I USB_DEVICE/Target
-D _USE_IOCTL=1
-D _USE_WRITE=1
-D _VOLUMES=1
-Wl,-u,_printf_float
-Wl,-u,_scanf_float
# Ignore all settings in Inc/my_machine.h (and instead use the below build flags)
-D OVERRIDE_MY_MACHINE
# Uncomment to enable debug builds
Expand All @@ -59,33 +70,55 @@ build_flags =
# Set to 1 or 2 (see Inc/my_machine.h)
#-D SPINDLE_HUANYANG=1
lib_deps =
boards
bluetooth
grbl
keypad
laser
motors
trinamic
odometer
fans
spindle
embroidery
Drivers/FATFS/App
Drivers/FATFS/Target
# USB serial support
Middlewares/ST/STM32_USB_Device_Library/Core
Middlewares/ST/STM32_USB_Device_Library/Class
USB_DEVICE/App
USB_DEVICE/Target
# To enable support for SD card, you must grab a copy FatFS:
# curl -O http://elm-chan.org/fsw/ff/arc/ff14b.zip
# unzip ff14b.zip 'source/*'
# mv source/* FatFS
# rm -fr ff14b.zip source FatFS/diskio.c
# Next, apply the changes outlined in FatFS/README.md and then
# uncomment `FatFS` and `sdcard` below.
#FatFs
#sdcard
spindle
FatFs
sdcard
# USB serial support
Core
Class
App
Target
# Core
# Class
# App
# Target
lib_extra_dirs =
.
boards
FatFs
Middlewares/ST/STM32_USB_Device_Library
USB_DEVICE

[eth_networking]
build_flags =
-I lwip/src/include
-I networking/wiznet
lib_deps =
lwip
networking
lib_extra_dirs =


[env]
platform = ststm32
platform_packages = framework-stm32cubef4 @ ~1.26.2
Expand Down Expand Up @@ -117,20 +150,27 @@ lib_extra_dirs = ${common.lib_extra_dirs}
# Untested and might not boot. Please report issues at:
# https://github.com/grblHAL/STM32F4xx/issues
board = genericSTM32F407VGT6
board_build.ldscript = STM32F407VGTX_FLASH.ld
board_build.ldscript = STM32F407VGTX_BL32K_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_BTT_SKR_20=
-D WEB_BUILD
-D BOARD_BTT_SKR_20
-D USE_HAL_DRIVER
-D STM32F407xx
-D HSE_VALUE=8000000
-D USB_SERIAL_CDC=1
# Boot loader offset (32K)
-D VECT_TAB_OFFSET=0x8000
# TMC2130 stepper drivers
-D PROBE_ENABLE=1
-D TRINAMIC_ENABLE=2130
-D TRINAMIC_UART_ENABLE=0
-D BLUETOOTH_ENABLE=0
-D NETWORKING_ENABLE=0
-D ESTOP_ENABLE=1
-D SPINDLE0_ENABLE=11
-D N_SPINDLE=1
lib_deps = ${common.lib_deps}
eeprom
trinamic

lib_extra_dirs = ${common.lib_extra_dirs}

# Upload is not supported for this board since BOOT0 is tied to GND.
# With the default boot loader, you must deploy new firmware by copying
# .pio/build/<env name>/firmware.bin (produced by `pio run`) to the SD card.
Expand All @@ -139,24 +179,62 @@ lib_extra_dirs = ${common.lib_extra_dirs}
# Untested and might not boot. Please report issues at:
# https://github.com/grblHAL/STM32F4xx/issues
board = genericSTM32F407VGT6
board_build.ldscript = STM32F407VGTX_FLASH.ld
board_build.ldscript = STM32F407VGTX_BL32K_FLASH.ld
build_flags = ${common.build_flags}
# See Inc/my_machine.h for options
-D BOARD_BTT_SKR_20=
-D WEB_BUILD
-D BOARD_BTT_SKR_20
-D USE_HAL_DRIVER
-D STM32F407xx
-D HSE_VALUE=8000000
-D USB_SERIAL_CDC=1
# Boot loader offset (32K)
-D VECT_TAB_OFFSET=0x8000
# TMC5160 stepper drivers
-D PROBE_ENABLE=1
-D TRINAMIC_ENABLE=5160
-D TRINAMIC_UART_ENABLE=0
-D BLUETOOTH_ENABLE=0
-D NETWORKING_ENABLE=0
-D ESTOP_ENABLE=1
-D SPINDLE0_ENABLE=11
-D N_SPINDLE=1

lib_deps = ${common.lib_deps}
eeprom
trinamic

lib_extra_dirs = ${common.lib_extra_dirs}

# Upload is not supported for this board since BOOT0 is tied to GND.
# With the default boot loader, you must deploy new firmware by copying
# .pio/build/<env name>/firmware.bin (produced by `pio run`) to the SD card.

[env:btt_skr_2_tmc2209]
# Untested and might not boot. Please report issues at:
# https://github.com/grblHAL/STM32F4xx/issues
board = genericSTM32F407VGT6
board_build.ldscript = STM32F407VGTX_BL32K_FLASH.ld
build_flags = ${common.build_flags}
-D WEB_BUILD
-D BOARD_BTT_SKR_20
-D USE_HAL_DRIVER
-D STM32F407xx
-D HSE_VALUE=8000000
-D USB_SERIAL_CDC=1
-D PROBE_ENABLE=1
-D TRINAMIC_ENABLE=2209
-D TRINAMIC_UART_ENABLE=2
-D BLUETOOTH_ENABLE=0
-D NETWORKING_ENABLE=0
-D ESTOP_ENABLE=1
-D SPINDLE0_ENABLE=11
-D N_SPINDLE=1
lib_deps = ${common.lib_deps}
eeprom

lib_extra_dirs = ${common.lib_extra_dirs}

# Upload is not supported for this board since BOOT0 is tied to GND.
# With the default boot loader, you must deploy new firmware by copying
# .pio/build/<env name>/firmware.bin (produced by `pio run`) to the SD card.


[env:fysetc_s6]
board = fysetc_s6
board_build.ldscript = STM32F446RETX_NO_BL_FLASH.ld
Expand Down