diff --git a/Makefile b/Makefile index 0c9290b..6117051 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,10 @@ STPROG_CLI ?= ~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Prog OPTFLAGS ?= -Os ifeq ($(OS),Windows_NT) - RM = del /Q - fixpath = $(strip $(subst /,\, $1)) + ifneq ($(MSYSTEM),MINGW64) + RM = del /Q + fixpath = $(strip $(subst /,\, $1)) + endif else RM = rm -f fixpath = $(strip $1) @@ -54,6 +56,7 @@ help all: @echo ' stm32f429xi CDC loopback demo for STM32F429xI based boards' @echo ' stm32f401xc CDC loopback demo for STM32F401xC based boards' @echo ' stm32f401xe CDC loopback demo for STM32F401xE based boards' + @echo ' stm32h750xx CDC loopback demo for STM32H750xx based boards' @echo ' cmsis Download CMSIS 5 and stm32.h into a $$(CMSIS) directory' @echo ' doc DOXYGEN documentation' @echo ' module static library module using following envars (defaults)' @@ -292,6 +295,12 @@ stm32h743xx: clean DEFINES='STM32H7 STM32H743xx USBD_VBUS_DETECT USBD_SOF_DISABLED' \ CFLAGS='-mcpu=cortex-m7' +stm32h750xx: clean + @$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s' \ + LDSCRIPT='demo/stm32h750xx.ld' \ + DEFINES='STM32H7 STM32H750xx USBD_SOF_DISABLED' \ + CFLAGS='-mcpu=cortex-m7' + stm32f411xe stm32f411e-disco: clean @$(MAKE) demo STARTUP='$(CMSISDEV)/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f411xe.s' \ LDSCRIPT='demo/stm32f401xe.ld' \ diff --git a/demo/cdc_loop.c b/demo/cdc_loop.c index 788d5b9..6efb2d4 100644 --- a/demo/cdc_loop.c +++ b/demo/cdc_loop.c @@ -504,7 +504,7 @@ static void cdc_init_usbd(void) { #elif defined(STM32L476xx) || defined(STM32F429xx) || \ defined(STM32F105xC) || defined(STM32F107xC) || \ defined(STM32F446xx) || defined(STM32F411xE) || \ - defined(STM32H743xx) + defined(STM32H743xx) || defined(STM32H750xx) #define USB_HANDLER OTG_FS_IRQHandler #define USB_NVIC_IRQ OTG_FS_IRQn #elif defined(STM32F103x6) diff --git a/demo/cdc_startup.c b/demo/cdc_startup.c index 42b02c3..3d9a0cb 100644 --- a/demo/cdc_startup.c +++ b/demo/cdc_startup.c @@ -288,7 +288,7 @@ static void cdc_init_rcc (void) { _BST(GPIOA->AFR[1], (0x0A << 12) | (0x0A << 16)); /* Disabling USB Vddusb power isolation. Vusb connected to Vdd */ _BST(PWR->CR2, PWR_CR2_USV); -#elif defined(STM32H743xx) +#elif defined(STM32H743xx) || defined(STM32H750xx) /* Enable USB supply */ _BST(PWR->CR3, PWR_CR3_SCUEN | PWR_CR3_LDOEN | PWR_CR3_USB33DEN); diff --git a/demo/stm32h750xx.ld b/demo/stm32h750xx.ld new file mode 100644 index 0000000..7f26ebc --- /dev/null +++ b/demo/stm32h750xx.ld @@ -0,0 +1,8 @@ +ENTRY(Reset_Handler) +MEMORY +{ + ROM (rx): ORIGIN = 0x08000000, LENGTH = 128K + RAM (rwx): ORIGIN = 0x20000000, LENGTH = 128K +} + +INCLUDE sections.ld diff --git a/hardware.md b/hardware.md index 88c0e41..e6506fd 100644 --- a/hardware.md +++ b/hardware.md @@ -23,6 +23,7 @@ | stm32f745xe | NUCO-V-F745VE + NUCLEO2USB | | | stm32f401xe | WeAct STM32F401CEU6 | | | stm32h743vt | Boring Tech STM32H743 | USB 5v connected to A9 | +| stm32h750xbh6 | FK750M5-XBH6 | | [NUCLEO2USB SHIELD](https://github.com/dmitrystu/Nucleo2USB) [NUCO-V](https://github.com/dmitrystu/nuco-v) diff --git a/inc/usb.h b/inc/usb.h index 5c3e589..b947ed3 100644 --- a/inc/usb.h +++ b/inc/usb.h @@ -159,7 +159,7 @@ #define usbd_hw usbd_devfs #endif -#elif defined(STM32H743xx) +#elif defined(STM32H743xx) || defined(STM32H750xx) #define USBD_STM32H743FS #if !defined(__ASSEMBLER__) diff --git a/readme.md b/readme.md index 504c87d..00ed9fa 100644 --- a/readme.md +++ b/readme.md @@ -108,7 +108,7 @@ All requirements can be downloaded into a directory specified in environment var usbd_stm32f446_otghs.c - STM32H743 + STM32H743 STM32H750 Doublebuffered
6 endpoints
VBUS detection
SOF output usbd_otgfs usbd_stm32h743_otgfs.c @@ -125,7 +125,7 @@ All requirements can be downloaded into a directory specified in environment var 3. Tested with STM32L052K8, STM32L100RC, STM32L476RG, STM32F072C8, STM32F103C8, STM32F103CB, STM32F303CC, STM32F303RE, STM32F429ZI, STM32F105RBT6, STM32F107VCT6, STM32L433CCT6, STM32F070CBT6, STM32G431RB, STM32F411CEUx, STM32F405RG, STM32F446RE, STM32F373CC, STM32L053R8, GD32F103C8T6, -STM32F745VE, STM32F401CE, STM32H743. +STM32F745VE, STM32F401CE, STM32H743, STM32H750. See [hardware.md](hardware.md) for details. ### Don't copy-paste the startup code from the demo without considering RCC and USB clock requirements.