2021-02-03 14:54:00 +03:00
|
|
|
# SPI Flash board definitions
|
|
|
|
#
|
|
|
|
# Copyright (C) 2021 Eric Callahan <arksine.code@gmail.com>
|
|
|
|
#
|
|
|
|
# This file may be distributed under the terms of the GNU GPLv3 license.
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
#
|
|
|
|
# Board Definitions
|
|
|
|
#
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
BOARD_DEFS = {
|
|
|
|
'generic-lpc1768': {
|
|
|
|
'mcu': "lpc1768",
|
|
|
|
'spi_bus': "ssp1",
|
|
|
|
"cs_pin": "P0.6"
|
|
|
|
},
|
|
|
|
'generic-lpc1769': {
|
|
|
|
'mcu': "lpc1769",
|
|
|
|
'spi_bus': "ssp1",
|
|
|
|
"cs_pin": "P0.6"
|
|
|
|
},
|
|
|
|
'btt-skr-mini': {
|
|
|
|
'mcu': "stm32f103xe",
|
|
|
|
'spi_bus': "spi1",
|
|
|
|
"cs_pin": "PA4"
|
|
|
|
},
|
2021-12-19 21:06:18 +03:00
|
|
|
'btt-skr-mini-v3': {
|
|
|
|
'mcu': "stm32g0b1xx",
|
|
|
|
'spi_bus': "spi1",
|
|
|
|
"cs_pin": "PA4"
|
|
|
|
},
|
2021-02-03 14:54:00 +03:00
|
|
|
'flyboard-mini': {
|
|
|
|
'mcu': "stm32f103xe",
|
|
|
|
'spi_bus': "spi2",
|
|
|
|
"cs_pin": "PB12",
|
|
|
|
"current_firmware_path": "FLY.CUR"
|
|
|
|
},
|
|
|
|
'mks-robin-e3': {
|
|
|
|
'mcu': "stm32f103xe",
|
|
|
|
'spi_bus': "spi2",
|
|
|
|
"cs_pin": "PA15",
|
|
|
|
"firmware_path": "Robin_e3.bin",
|
|
|
|
"current_firmware_path": "Robin_e3.cur"
|
|
|
|
},
|
2022-08-18 07:19:40 +03:00
|
|
|
'btt-octopus-f407-v1': {
|
|
|
|
'mcu': "stm32f407xx",
|
|
|
|
'spi_bus': "swspi",
|
|
|
|
'spi_pins': "PC8,PD2,PC12",
|
|
|
|
'cs_pin': "PC11",
|
|
|
|
'skip_verify': True
|
|
|
|
},
|
|
|
|
'btt-octopus-f429-v1': {
|
|
|
|
'mcu': "stm32f429xx",
|
|
|
|
'spi_bus': "swspi",
|
|
|
|
'spi_pins': "PC8,PD2,PC12",
|
|
|
|
'cs_pin': "PC11",
|
|
|
|
'skip_verify': True
|
|
|
|
},
|
|
|
|
'btt-octopus-f446-v1': {
|
|
|
|
'mcu': "stm32f446xx",
|
|
|
|
'spi_bus': "swspi",
|
|
|
|
'spi_pins': "PC8,PD2,PC12",
|
|
|
|
'cs_pin': "PC11",
|
|
|
|
'skip_verify': True
|
|
|
|
},
|
2021-02-03 14:54:00 +03:00
|
|
|
'btt-skr-pro': {
|
|
|
|
'mcu': "stm32f407xx",
|
|
|
|
'spi_bus': "swspi",
|
|
|
|
'spi_pins': "PA6,PB5,PA5",
|
|
|
|
"cs_pin": "PA4"
|
|
|
|
},
|
|
|
|
'btt-gtr': {
|
|
|
|
'mcu': "stm32f407xx",
|
|
|
|
'spi_bus': "spi1",
|
|
|
|
"cs_pin": "PA4"
|
2021-05-03 16:03:45 +03:00
|
|
|
},
|
|
|
|
'fysetc-spider': {
|
|
|
|
'mcu': "stm32f446xx",
|
|
|
|
'spi_bus': "spi1",
|
|
|
|
"cs_pin": "PA4",
|
|
|
|
"current_firmware_path": "OLD.BIN"
|
2022-01-29 21:32:48 +03:00
|
|
|
},
|
|
|
|
'btt-skr-se-bx': {
|
|
|
|
'mcu': 'stm32h743xx',
|
|
|
|
'spi_bus': 'spi3a',
|
|
|
|
'cs_pin': 'PA15'
|
2022-06-18 20:08:30 +03:00
|
|
|
},
|
2022-10-05 22:05:58 +03:00
|
|
|
'btt-skr-3': {
|
|
|
|
'mcu': 'stm32h743xx',
|
2022-10-14 02:35:07 +03:00
|
|
|
'spi_bus': 'swspi',
|
|
|
|
'spi_pins': "PC8,PD2,PC12",
|
|
|
|
'cs_pin': 'PC11',
|
2022-10-05 22:05:58 +03:00
|
|
|
'skip_verify': True
|
|
|
|
},
|
|
|
|
'creality-v4.2.2': {
|
|
|
|
'mcu': "stm32f103xe",
|
|
|
|
'spi_bus': "swspi",
|
|
|
|
'spi_pins': "PC8,PD2,PC12",
|
|
|
|
'cs_pin': "PC11",
|
|
|
|
'skip_verify': True
|
|
|
|
},
|
2022-06-18 20:08:30 +03:00
|
|
|
'monster8': {
|
|
|
|
'mcu': "stm32f407xx",
|
|
|
|
'spi_bus': "spi3a",
|
|
|
|
"cs_pin": "PC9"
|
2022-07-21 04:57:08 +03:00
|
|
|
},
|
|
|
|
'fly-gemini-v2': {
|
|
|
|
'mcu': "stm32f405xx",
|
|
|
|
'spi_bus': "spi1",
|
|
|
|
"cs_pin": "PA4"
|
2023-01-01 02:26:30 +03:00
|
|
|
},
|
|
|
|
'fysetc-cheetah': {
|
|
|
|
'mcu': "stm32f401xc",
|
|
|
|
'spi_bus': "spi1",
|
|
|
|
"cs_pin": "PA4",
|
|
|
|
"current_firmware_path": "OLD.BIN"
|
2023-06-29 18:42:07 +03:00
|
|
|
},
|
|
|
|
'btt-skrat': {
|
|
|
|
'mcu': "stm32g0b1xx",
|
|
|
|
'spi_bus': "spi1",
|
|
|
|
"cs_pin": "PB8"
|
2021-02-03 14:54:00 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
#
|
|
|
|
# Board Definition Aliases
|
|
|
|
#
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
BOARD_ALIASES = {
|
|
|
|
'btt-skr-v1.1': BOARD_DEFS['generic-lpc1768'],
|
|
|
|
'btt-skr-v1.3': BOARD_DEFS['generic-lpc1768'],
|
|
|
|
'btt-skr-v1.4': BOARD_DEFS['generic-lpc1768'],
|
|
|
|
'mks-sgenl-v1': BOARD_DEFS['generic-lpc1768'],
|
|
|
|
'mks-sbase': BOARD_DEFS['generic-lpc1768'],
|
|
|
|
'smoothieboard-v1': BOARD_DEFS['generic-lpc1769'],
|
|
|
|
'btt-skr-turbo-v1.4': BOARD_DEFS['generic-lpc1769'],
|
|
|
|
'btt-skr-e3-turbo': BOARD_DEFS['generic-lpc1769'],
|
|
|
|
'mks-sgenl-v2': BOARD_DEFS['generic-lpc1769'],
|
|
|
|
'btt-skr-mini-v1.1': BOARD_DEFS['btt-skr-mini'],
|
|
|
|
'btt-skr-mini-e3-v1': BOARD_DEFS['btt-skr-mini'],
|
|
|
|
'btt-skr-mini-e3-v1.2': BOARD_DEFS['btt-skr-mini'],
|
|
|
|
'btt-skr-mini-e3-v2': BOARD_DEFS['btt-skr-mini'],
|
2021-12-19 21:06:18 +03:00
|
|
|
'btt-skr-mini-e3-v3': BOARD_DEFS['btt-skr-mini-v3'],
|
2021-02-03 14:54:00 +03:00
|
|
|
'btt-skr-mini-mz': BOARD_DEFS['btt-skr-mini'],
|
|
|
|
'btt-skr-e3-dip': BOARD_DEFS['btt-skr-mini'],
|
|
|
|
'btt002-v1': BOARD_DEFS['btt-skr-mini'],
|
2022-10-05 22:05:58 +03:00
|
|
|
'creality-v4.2.7': BOARD_DEFS['creality-v4.2.2'],
|
2023-01-04 20:01:28 +03:00
|
|
|
'btt-skr-2-f407': BOARD_DEFS['btt-octopus-f407-v1'],
|
|
|
|
'btt-skr-2-f429': BOARD_DEFS['btt-octopus-f429-v1'],
|
2022-08-18 07:19:40 +03:00
|
|
|
'btt-octopus-f407-v1.0': BOARD_DEFS['btt-octopus-f407-v1'],
|
|
|
|
'btt-octopus-f407-v1.1': BOARD_DEFS['btt-octopus-f407-v1'],
|
|
|
|
'btt-octopus-f429-v1.0': BOARD_DEFS['btt-octopus-f429-v1'],
|
|
|
|
'btt-octopus-f429-v1.1': BOARD_DEFS['btt-octopus-f429-v1'],
|
|
|
|
'btt-octopus-f446-v1.0': BOARD_DEFS['btt-octopus-f446-v1'],
|
|
|
|
'btt-octopus-f446-v1.1': BOARD_DEFS['btt-octopus-f446-v1'],
|
|
|
|
'btt-octopus-pro-f429-v1.0': BOARD_DEFS['btt-octopus-f429-v1'],
|
|
|
|
'btt-octopus-pro-f446-v1.0': BOARD_DEFS['btt-octopus-f446-v1'],
|
2021-02-03 14:54:00 +03:00
|
|
|
'btt-skr-pro-v1.1': BOARD_DEFS['btt-skr-pro'],
|
|
|
|
'btt-skr-pro-v1.2': BOARD_DEFS['btt-skr-pro'],
|
|
|
|
'btt-gtr-v1': BOARD_DEFS['btt-gtr'],
|
|
|
|
'mks-robin-e3d': BOARD_DEFS['mks-robin-e3'],
|
2023-01-01 02:26:30 +03:00
|
|
|
'fysetc-cheetah-v2': BOARD_DEFS['fysetc-cheetah'],
|
2021-05-03 16:03:45 +03:00
|
|
|
'fysetc-spider-v1': BOARD_DEFS['fysetc-spider'],
|
|
|
|
'fysetc-s6-v1.2': BOARD_DEFS['fysetc-spider'],
|
2022-06-18 20:08:30 +03:00
|
|
|
'fysetc-s6-v2': BOARD_DEFS['fysetc-spider'],
|
2023-06-29 18:42:07 +03:00
|
|
|
'robin_v3': BOARD_DEFS['monster8'],
|
|
|
|
'btt-skrat-v1.0': BOARD_DEFS['btt-skrat']
|
2021-02-03 14:54:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
def list_boards():
|
|
|
|
return sorted(list(BOARD_DEFS.keys()) + list(BOARD_ALIASES.keys()))
|
|
|
|
|
|
|
|
def lookup_board(name):
|
|
|
|
name = name.lower()
|
|
|
|
bdef = BOARD_ALIASES.get(name, BOARD_DEFS.get(name, None))
|
|
|
|
if bdef is not None:
|
|
|
|
return dict(bdef)
|
|
|
|
return None
|