Skip to content

Commit

Permalink
Merge pull request #2522 from fpistm/weact_H562RGT
Browse files Browse the repository at this point in the history
variant(h5): add WeAct H562RGT support
  • Loading branch information
fpistm authored Sep 23, 2024
2 parents c888cf9 + dbde66e commit 40d50d3
Show file tree
Hide file tree
Showing 11 changed files with 1,580 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CI/build/conf/cores_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@
"GENERIC_G4A1REIX",
"GENERIC_G4A1RETX",
"GENERIC_H503CBTX",
"GENERIC_H562RGTX",
"GENERIC_H563IIKXQ",
"GENERIC_H563RGTX",
"GENERIC_H563RITX",
Expand Down Expand Up @@ -813,6 +814,13 @@
"GENERIC_MP157AACX",
"GENERIC_MP157CACX",
"GENERIC_MP157DACX",
"GENERIC_U073R8IX",
"GENERIC_U073R8TX",
"GENERIC_U073RBIX",
"GENERIC_U073RBTX",
"GENERIC_U073RCIX",
"GENERIC_U073RCTX",
"GENERIC_U083RCIX",
"GENERIC_U575AGIXQ",
"GENERIC_U575AIIXQ",
"GENERIC_U575CGTX",
Expand Down
8 changes: 8 additions & 0 deletions CI/build/conf/cores_config_ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@
"GENERIC_G4A1REIX",
"GENERIC_G4A1RETX",
"GENERIC_H503CBTX",
"GENERIC_H562RGTX",
"GENERIC_H563IIKXQ",
"GENERIC_H563RGTX",
"GENERIC_H563RITX",
Expand Down Expand Up @@ -813,6 +814,13 @@
"GENERIC_MP157AACX",
"GENERIC_MP157CACX",
"GENERIC_MP157DACX",
"GENERIC_U073R8IX",
"GENERIC_U073R8TX",
"GENERIC_U073RBIX",
"GENERIC_U073RBTX",
"GENERIC_U073RCIX",
"GENERIC_U073RCTX",
"GENERIC_U083RCIX",
"GENERIC_U575AGIXQ",
"GENERIC_U575AIIXQ",
"GENERIC_U575CGTX",
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
| :yellow_heart: | STM32H503CB | Generic Board | **2.9.0** | |
| :green_heart: | STM32H503KB | Generic Board | *2.8.1* | |
| :green_heart: | STM32H503RB | Generic Board | *2.7.0* | |
| :yellow_heart: | STM32H562RGT | WeAct H562RGT | **2.9.0** | |
| :yellow_heart: | STM32H562RGT<br>STM32H562RIT | Generic Board | **2.9.0** | |
| :green_heart: | STM32H563IIKxQ | Generic Board | *2.6.0* | |
| :green_heart: | STM32H563RG<br>STM32H563RI | Generic Board | *2.8.1* | |
| :green_heart: | STM32H563ZG<br>STM32H563ZI | Generic Board | *2.6.0* | |
Expand Down
29 changes: 29 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8442,6 +8442,17 @@ GenH5.upload.maximum_data_size=0
GenH5.vid.0=0x0483
GenH5.pid.0=0x5740

# WeAct H562RGT
GenH5.menu.pnum.WEACT_H562RG=WeAct H562RGT
GenH5.menu.pnum.WEACT_H562RG.upload.maximum_size=1048576
GenH5.menu.pnum.WEACT_H562RG.upload.maximum_data_size=655360
GenH5.menu.pnum.WEACT_H562RG.build.board=WEACT_H562RG
GenH5.menu.pnum.WEACT_H562RG.build.product_line=STM32H562xx
GenH5.menu.pnum.WEACT_H562RG.build.variant=STM32H5xx/H562R(G-I)T
GenH5.menu.pnum.WEACT_H562RG.build.variant_h=variant_WEACT_H562RG.h
GenH5.menu.pnum.WEACT_H562RG.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
GenH5.menu.pnum.WEACT_H562RG.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32H5xx/STM32H562.svd

# Generic H503CBTx
GenH5.menu.pnum.GENERIC_H503CBTX=Generic H503CBTx
GenH5.menu.pnum.GENERIC_H503CBTX.upload.maximum_size=131072
Expand Down Expand Up @@ -8478,6 +8489,24 @@ GenH5.menu.pnum.GENERIC_H503RBTX.build.product_line=STM32H503xx
GenH5.menu.pnum.GENERIC_H503RBTX.build.variant=STM32H5xx/H503RBT
GenH5.menu.pnum.GENERIC_H503RBTX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32H5xx/STM32H503.svd

# Generic H562RGTx
GenH5.menu.pnum.GENERIC_H562RGTX=Generic H562RGTx
GenH5.menu.pnum.GENERIC_H562RGTX.upload.maximum_size=1048576
GenH5.menu.pnum.GENERIC_H562RGTX.upload.maximum_data_size=655360
GenH5.menu.pnum.GENERIC_H562RGTX.build.board=GENERIC_H562RGTX
GenH5.menu.pnum.GENERIC_H562RGTX.build.product_line=STM32H562xx
GenH5.menu.pnum.GENERIC_H562RGTX.build.variant=STM32H5xx/H562R(G-I)T
GenH5.menu.pnum.GENERIC_H562RGTX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32H5xx/STM32H562.svd

# Generic H562RITx
GenH5.menu.pnum.GENERIC_H562RITX=Generic H562RITx
GenH5.menu.pnum.GENERIC_H562RITX.upload.maximum_size=2097152
GenH5.menu.pnum.GENERIC_H562RITX.upload.maximum_data_size=655360
GenH5.menu.pnum.GENERIC_H562RITX.build.board=GENERIC_H562RITX
GenH5.menu.pnum.GENERIC_H562RITX.build.product_line=STM32H562xx
GenH5.menu.pnum.GENERIC_H562RITX.build.variant=STM32H5xx/H562R(G-I)T
GenH5.menu.pnum.GENERIC_H562RITX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32H5xx/STM32H562.svd

# Generic H563IIKxQ
GenH5.menu.pnum.GENERIC_H563IIKXQ=Generic H563IIKxQ
GenH5.menu.pnum.GENERIC_H563IIKXQ.upload.maximum_size=2097152
Expand Down
246 changes: 246 additions & 0 deletions cmake/boards_db.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73502,6 +73502,170 @@ target_compile_options(GENERIC_H503RBTX_xusb_HSFS INTERFACE
"SHELL:-DUSE_USB_HS -DUSE_USB_HS_IN_FS"
)

# GENERIC_H562RGTX
# -----------------------------------------------------------------------------

set(GENERIC_H562RGTX_VARIANT_PATH "${CMAKE_CURRENT_LIST_DIR}/../variants/STM32H5xx/H562R(G-I)T")
set(GENERIC_H562RGTX_MAXSIZE 1048576)
set(GENERIC_H562RGTX_MAXDATASIZE 655360)
set(GENERIC_H562RGTX_MCU cortex-m33)
set(GENERIC_H562RGTX_FPCONF "-")
add_library(GENERIC_H562RGTX INTERFACE)
target_compile_options(GENERIC_H562RGTX INTERFACE
"SHELL:-DSTM32H562xx "
"SHELL:"
"SHELL:"
"SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${GENERIC_H562RGTX_MCU}
)
target_compile_definitions(GENERIC_H562RGTX INTERFACE
"STM32H5xx"
"ARDUINO_GENERIC_H562RGTX"
"BOARD_NAME=\"GENERIC_H562RGTX\""
"BOARD_ID=GENERIC_H562RGTX"
"VARIANT_H=\"variant_generic.h\""
)
target_include_directories(GENERIC_H562RGTX INTERFACE
${CMAKE_CURRENT_LIST_DIR}/../system/STM32H5xx
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32H5xx_HAL_Driver/Inc
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32H5xx_HAL_Driver/Src
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32H5xx/Source/Templates/gcc/
${GENERIC_H562RGTX_VARIANT_PATH}
)

target_link_options(GENERIC_H562RGTX INTERFACE
"LINKER:--default-script=${GENERIC_H562RGTX_VARIANT_PATH}/ldscript.ld"
"LINKER:--defsym=LD_FLASH_OFFSET=0x0"
"LINKER:--defsym=LD_MAX_SIZE=1048576"
"LINKER:--defsym=LD_MAX_DATA_SIZE=655360"
"SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${GENERIC_H562RGTX_MCU}
)

add_library(GENERIC_H562RGTX_serial_disabled INTERFACE)
target_compile_options(GENERIC_H562RGTX_serial_disabled INTERFACE
"SHELL:"
)
add_library(GENERIC_H562RGTX_serial_generic INTERFACE)
target_compile_options(GENERIC_H562RGTX_serial_generic INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED"
)
add_library(GENERIC_H562RGTX_serial_none INTERFACE)
target_compile_options(GENERIC_H562RGTX_serial_none INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE"
)
add_library(GENERIC_H562RGTX_usb_CDC INTERFACE)
target_compile_options(GENERIC_H562RGTX_usb_CDC INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB"
)
add_library(GENERIC_H562RGTX_usb_CDCgen INTERFACE)
target_compile_options(GENERIC_H562RGTX_usb_CDCgen INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC"
)
add_library(GENERIC_H562RGTX_usb_HID INTERFACE)
target_compile_options(GENERIC_H562RGTX_usb_HID INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_HID_COMPOSITE"
)
add_library(GENERIC_H562RGTX_usb_none INTERFACE)
target_compile_options(GENERIC_H562RGTX_usb_none INTERFACE
"SHELL:"
)
add_library(GENERIC_H562RGTX_xusb_FS INTERFACE)
target_compile_options(GENERIC_H562RGTX_xusb_FS INTERFACE
"SHELL:"
)
add_library(GENERIC_H562RGTX_xusb_HS INTERFACE)
target_compile_options(GENERIC_H562RGTX_xusb_HS INTERFACE
"SHELL:-DUSE_USB_HS"
)
add_library(GENERIC_H562RGTX_xusb_HSFS INTERFACE)
target_compile_options(GENERIC_H562RGTX_xusb_HSFS INTERFACE
"SHELL:-DUSE_USB_HS -DUSE_USB_HS_IN_FS"
)

# GENERIC_H562RITX
# -----------------------------------------------------------------------------

set(GENERIC_H562RITX_VARIANT_PATH "${CMAKE_CURRENT_LIST_DIR}/../variants/STM32H5xx/H562R(G-I)T")
set(GENERIC_H562RITX_MAXSIZE 2097152)
set(GENERIC_H562RITX_MAXDATASIZE 655360)
set(GENERIC_H562RITX_MCU cortex-m33)
set(GENERIC_H562RITX_FPCONF "-")
add_library(GENERIC_H562RITX INTERFACE)
target_compile_options(GENERIC_H562RITX INTERFACE
"SHELL:-DSTM32H562xx "
"SHELL:"
"SHELL:"
"SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${GENERIC_H562RITX_MCU}
)
target_compile_definitions(GENERIC_H562RITX INTERFACE
"STM32H5xx"
"ARDUINO_GENERIC_H562RITX"
"BOARD_NAME=\"GENERIC_H562RITX\""
"BOARD_ID=GENERIC_H562RITX"
"VARIANT_H=\"variant_generic.h\""
)
target_include_directories(GENERIC_H562RITX INTERFACE
${CMAKE_CURRENT_LIST_DIR}/../system/STM32H5xx
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32H5xx_HAL_Driver/Inc
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32H5xx_HAL_Driver/Src
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32H5xx/Source/Templates/gcc/
${GENERIC_H562RITX_VARIANT_PATH}
)

target_link_options(GENERIC_H562RITX INTERFACE
"LINKER:--default-script=${GENERIC_H562RITX_VARIANT_PATH}/ldscript.ld"
"LINKER:--defsym=LD_FLASH_OFFSET=0x0"
"LINKER:--defsym=LD_MAX_SIZE=2097152"
"LINKER:--defsym=LD_MAX_DATA_SIZE=655360"
"SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${GENERIC_H562RITX_MCU}
)

add_library(GENERIC_H562RITX_serial_disabled INTERFACE)
target_compile_options(GENERIC_H562RITX_serial_disabled INTERFACE
"SHELL:"
)
add_library(GENERIC_H562RITX_serial_generic INTERFACE)
target_compile_options(GENERIC_H562RITX_serial_generic INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED"
)
add_library(GENERIC_H562RITX_serial_none INTERFACE)
target_compile_options(GENERIC_H562RITX_serial_none INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE"
)
add_library(GENERIC_H562RITX_usb_CDC INTERFACE)
target_compile_options(GENERIC_H562RITX_usb_CDC INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB"
)
add_library(GENERIC_H562RITX_usb_CDCgen INTERFACE)
target_compile_options(GENERIC_H562RITX_usb_CDCgen INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC"
)
add_library(GENERIC_H562RITX_usb_HID INTERFACE)
target_compile_options(GENERIC_H562RITX_usb_HID INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_HID_COMPOSITE"
)
add_library(GENERIC_H562RITX_usb_none INTERFACE)
target_compile_options(GENERIC_H562RITX_usb_none INTERFACE
"SHELL:"
)
add_library(GENERIC_H562RITX_xusb_FS INTERFACE)
target_compile_options(GENERIC_H562RITX_xusb_FS INTERFACE
"SHELL:"
)
add_library(GENERIC_H562RITX_xusb_HS INTERFACE)
target_compile_options(GENERIC_H562RITX_xusb_HS INTERFACE
"SHELL:-DUSE_USB_HS"
)
add_library(GENERIC_H562RITX_xusb_HSFS INTERFACE)
target_compile_options(GENERIC_H562RITX_xusb_HSFS INTERFACE
"SHELL:-DUSE_USB_HS -DUSE_USB_HS_IN_FS"
)

# GENERIC_H563IIKXQ
# -----------------------------------------------------------------------------

Expand Down Expand Up @@ -109800,6 +109964,88 @@ target_link_options(VCCGND_F407ZG_MINI_hid INTERFACE
)


# WEACT_H562RG
# -----------------------------------------------------------------------------

set(WEACT_H562RG_VARIANT_PATH "${CMAKE_CURRENT_LIST_DIR}/../variants/STM32H5xx/H562R(G-I)T")
set(WEACT_H562RG_MAXSIZE 1048576)
set(WEACT_H562RG_MAXDATASIZE 655360)
set(WEACT_H562RG_MCU cortex-m33)
set(WEACT_H562RG_FPCONF "-")
add_library(WEACT_H562RG INTERFACE)
target_compile_options(WEACT_H562RG INTERFACE
"SHELL:-DSTM32H562xx "
"SHELL:-DCUSTOM_PERIPHERAL_PINS"
"SHELL:"
"SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${WEACT_H562RG_MCU}
)
target_compile_definitions(WEACT_H562RG INTERFACE
"STM32H5xx"
"ARDUINO_WEACT_H562RG"
"BOARD_NAME=\"WEACT_H562RG\""
"BOARD_ID=WEACT_H562RG"
"VARIANT_H=\"variant_WEACT_H562RG.h\""
)
target_include_directories(WEACT_H562RG INTERFACE
${CMAKE_CURRENT_LIST_DIR}/../system/STM32H5xx
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32H5xx_HAL_Driver/Inc
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32H5xx_HAL_Driver/Src
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32H5xx/Include/
${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32H5xx/Source/Templates/gcc/
${WEACT_H562RG_VARIANT_PATH}
)

target_link_options(WEACT_H562RG INTERFACE
"LINKER:--default-script=${WEACT_H562RG_VARIANT_PATH}/ldscript.ld"
"LINKER:--defsym=LD_FLASH_OFFSET=0x0"
"LINKER:--defsym=LD_MAX_SIZE=1048576"
"LINKER:--defsym=LD_MAX_DATA_SIZE=655360"
"SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard"
-mcpu=${WEACT_H562RG_MCU}
)

add_library(WEACT_H562RG_serial_disabled INTERFACE)
target_compile_options(WEACT_H562RG_serial_disabled INTERFACE
"SHELL:"
)
add_library(WEACT_H562RG_serial_generic INTERFACE)
target_compile_options(WEACT_H562RG_serial_generic INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED"
)
add_library(WEACT_H562RG_serial_none INTERFACE)
target_compile_options(WEACT_H562RG_serial_none INTERFACE
"SHELL:-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE"
)
add_library(WEACT_H562RG_usb_CDC INTERFACE)
target_compile_options(WEACT_H562RG_usb_CDC INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB"
)
add_library(WEACT_H562RG_usb_CDCgen INTERFACE)
target_compile_options(WEACT_H562RG_usb_CDCgen INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC"
)
add_library(WEACT_H562RG_usb_HID INTERFACE)
target_compile_options(WEACT_H562RG_usb_HID INTERFACE
"SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_HID_COMPOSITE"
)
add_library(WEACT_H562RG_usb_none INTERFACE)
target_compile_options(WEACT_H562RG_usb_none INTERFACE
"SHELL:"
)
add_library(WEACT_H562RG_xusb_FS INTERFACE)
target_compile_options(WEACT_H562RG_xusb_FS INTERFACE
"SHELL:"
)
add_library(WEACT_H562RG_xusb_HS INTERFACE)
target_compile_options(WEACT_H562RG_xusb_HS INTERFACE
"SHELL:-DUSE_USB_HS"
)
add_library(WEACT_H562RG_xusb_HSFS INTERFACE)
target_compile_options(WEACT_H562RG_xusb_HSFS INTERFACE
"SHELL:-DUSE_USB_HS -DUSE_USB_HS_IN_FS"
)

# WeActMiniH743VITX
# -----------------------------------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions variants/STM32H5xx/H562R(G-I)T/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ target_link_libraries(variant INTERFACE variant_usage)
add_library(variant_bin STATIC EXCLUDE_FROM_ALL
generic_clock.c
PeripheralPins.c
PeripheralPins_WEACT_H562RG.c
variant_generic.cpp
variant_WEACT_H562RG.cpp
)
target_link_libraries(variant_bin PUBLIC variant_usage)

Expand Down
Loading

0 comments on commit 40d50d3

Please sign in to comment.