Add example stm32 bluepill setup
This commit is contained in:
parent
1dad7799ef
commit
d949cbf29a
2 changed files with 23 additions and 5 deletions
|
|
@ -39,4 +39,12 @@ build_flags = -D MCU_PICO
|
||||||
platform = ststm32
|
platform = ststm32
|
||||||
board = bluepill_f103c8
|
board = bluepill_f103c8
|
||||||
upload_protocol = stlink
|
upload_protocol = stlink
|
||||||
build_flags = -D MCU_BLUEPILL
|
build_flags =
|
||||||
|
-D MCU_BLUEPILL
|
||||||
|
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
|
||||||
|
-D USBCON
|
||||||
|
-D USBD_VID=0x0483
|
||||||
|
-D USBD_PID=0x5740
|
||||||
|
-D USB_MANUFACTURER="Unknown"
|
||||||
|
-D USB_PRODUCT="\"BLUEPILL_F103C8\""
|
||||||
|
-D HAL_PCD_MODULE_ENABLED
|
||||||
18
src/boards.h
18
src/boards.h
|
|
@ -1,10 +1,12 @@
|
||||||
#ifdef BOARD_AUTO
|
#ifdef BOARD_AUTO
|
||||||
#ifdef MCU_LEONARDO
|
#ifdef MCU_LEONARDO
|
||||||
#define BOARD_SANGABOARDv3
|
#define BOARD_SANGABOARDv3
|
||||||
#define BOARD_STRING "Sangaboard v0.3"
|
#elif defined(MCU_NANO)
|
||||||
#elif defined(MCU_NANO) || defined(MCU_PICO) || defined(MCU_BLUEPILL)
|
|
||||||
#define BOARD_SANGABOARDv2
|
#define BOARD_SANGABOARDv2
|
||||||
#define BOARD_STRING "Sangaboard v0.2"
|
#elif defined(MCU_BLUEPILL)
|
||||||
|
#define BOARD_CUSTOM_BLUEPILL
|
||||||
|
#elif defined(MCU_PICO)
|
||||||
|
#define BOARD_CUSTOM
|
||||||
#else
|
#else
|
||||||
#error "Invalid build config - must specify MCU type"
|
#error "Invalid build config - must specify MCU type"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -28,8 +30,16 @@
|
||||||
#define ENDSTOPS_PULLUPS true
|
#define ENDSTOPS_PULLUPS true
|
||||||
#define WIRING_ENDSTOPS_MIN {A0,A1,A2}
|
#define WIRING_ENDSTOPS_MIN {A0,A1,A2}
|
||||||
#define WIRING_ENDSTOPS_MAX {A3,A4,A5}
|
#define WIRING_ENDSTOPS_MAX {A3,A4,A5}
|
||||||
|
#elif defined(BOARD_CUSTOM_BLUEPILL)
|
||||||
|
#define BOARD_STRING "Custom Bluepill board"
|
||||||
|
#define WIRING_MOTOR_X PB11, PB10, PB1, PB0
|
||||||
|
#define WIRING_MOTOR_Y PA7, PA6, PA5, PA4
|
||||||
|
#define WIRING_MOTOR_Z PA3, PA2, PA1, PA0
|
||||||
|
#define ENDSTOPS_INVERT false
|
||||||
|
#define ENDSTOPS_PULLUPS true
|
||||||
|
#define WIRING_ENDSTOPS_MIN {A0,A1,A2}
|
||||||
|
#define WIRING_ENDSTOPS_MAX {A3,A4,A5}
|
||||||
#else
|
#else
|
||||||
//custom board
|
|
||||||
#define BOARD_STRING "Custom board"
|
#define BOARD_STRING "Custom board"
|
||||||
#define WIRING_MOTOR_X 13, 12, 11, 10
|
#define WIRING_MOTOR_X 13, 12, 11, 10
|
||||||
#define WIRING_MOTOR_Y 9, 8, 7, 6
|
#define WIRING_MOTOR_Y 9, 8, 7, 6
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue