Skip to content

Commit

Permalink
Added configuration for BTT SRK CR6
Browse files Browse the repository at this point in the history
  • Loading branch information
Rukongai committed Jan 16, 2023
1 parent 34587ef commit e0a86ce
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ For your convenience, you can find [here](https://github.com/Serasidis/STM32_HID

## Installing the HID bootloader to STM32 devices

### (BTT SKR CR6)


### (ST-Link version)

1. Download the [latest HID Bootloader](https://github.com/Serasidis/STM32_HID_Bootloader/releases) release
Expand Down
21 changes: 21 additions & 0 deletions bootloader/F1/Inc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,27 @@
#define CHECK_BOOT 0
#endif

#ifdef PAGE_SIZE
#undef PAGE_SIZE
#define PAGE_SIZE 2048
#endif
#elif defined TARGET_BTT_SKR_CR6
#define LED1_CLOCK RCC_APB2ENR_IOPAEN
#define LED1_BIT_0
#define LED1_BIT_1
#define LED1_MODE INIT_REG(GPIOA->CRH, 13, GPIO_CRH_MODE13)
#define LED1_ON WRITE_REG(GPIOA->BSRR, GPIO_BSRR_BS13)
#define LED1_OFF WRITE_REG(GPIOA->BSRR, GPIO_BSRR_BR13)

#define DISC_CLOCK RCC_APB2ENR_IOPAEN
#define DISC_BIT_0
#define DISC_BIT_1
#define DISC_MODE INIT_REG(GPIOA->CRH, 14, GPIO_CRH_CNF14_0 | GPIO_CRH_MODE14)
#define DISC_HIGH WRITE_REG(GPIOA->BSRR, GPIO_BSRR_BS14)
#define DISC_LOW WRITE_REG(GPIOA->BRR, GPIO_BRR_BR14)

#define DISABLE_DEBUG AFIO_MAPR_SWJ_CFG_DISABLE
#define AFIO_CLOCK RCC_APB2ENR_AFIOEN
#ifdef PAGE_SIZE
#undef PAGE_SIZE
#define PAGE_SIZE 2048
Expand Down
8 changes: 8 additions & 0 deletions bootloader/F1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ mini-stm32v3: $(SRCS) clean gccversion build_mini-stm32v3 copy_mini-stm32v3 info
btt-skr-mini-e3: $(SRCS) clean gccversion build_btt-skr-mini-e3 copy_btt-skr-mini-e3 info size
btt-skr-mini-e3_no-btn: $(SRCS) clean gccversion build_btt-skr-mini-e3_no-btn copy_btt-skr-mini-e3_no-btn info size
btt-skr-mini-e3-2point0: $(SRCS) clean gccversion build_btt-skr-mini-e3-2point0 copy_btt-skr-mini-e3-2point0 info size
btt-skr-cr6: $(SRCS) clean gccversion build_btt-skr-cr6 copy_btt-skr-cr6 info size
btt-skr-mini-e3-2point0_no-btn: $(SRCS) clean gccversion build_btt-skr-mini-e3-2point0_no-btn copy_btt-skr-mini-e3-2point0_no-btn info size

build_maple-mini: TARGETFLAGS= -DTARGET_MAPLE_MINI
Expand Down Expand Up @@ -200,6 +201,13 @@ copy_btt-skr-mini-e3-2point0: $(BIN_DIR)
$(ECHO) "COPY $(BIN_DIR)/hid_btt_skr_mini_e3_2point0.bin"
$(Q)$(CP) $(BUILD_DIR)/$(TARGET).bin $(BIN_DIR)/hid_btt_skr_mini_e3_2point0.bin

build_btt-skr-cr6 : TARGETFLAGS= -DTARGET_BTT_SKR_CR6
build_btt-skr-cr6 : LINKER_SCRIPT=STM32F103C8T6.ld
build_btt-skr-cr6 : $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).bin
copy_btt-skr-cr6: $(BIN_DIR)
$(ECHO) "COPY $(BIN_DIR)/hid_btt_skr_cr6.bin"
$(Q)$(CP) $(BUILD_DIR)/$(TARGET).bin $(BIN_DIR)/hid_btt_skr_cr6.bin

build_btt-skr-mini-e3-2point0_no-btn : TARGETFLAGS= -DTARGET_BTT_SKR_MINI_E3_2POINT0
build_btt-skr-mini-e3-2point0_no-btn : LINKER_SCRIPT=STM32F103C8T6.ld
build_btt-skr-mini-e3-2point0_no-btn : $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).bin
Expand Down

0 comments on commit e0a86ce

Please sign in to comment.