From e5fed33f7766aa9c5f02c98dcf63915fe902b3ca Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Wed, 22 Jan 2025 16:57:48 +0100 Subject: [PATCH] chore: update cmake Signed-off-by: Frederic Pillon --- cmake/boards_db.cmake | 108 +++++++++++++++--- .../H7A3Z(G-I)TxQ_H7B3ZITxQ/CMakeLists.txt | 1 + 2 files changed, 96 insertions(+), 13 deletions(-) diff --git a/cmake/boards_db.cmake b/cmake/boards_db.cmake index 4db190a96b..40181d8660 100644 --- a/cmake/boards_db.cmake +++ b/cmake/boards_db.cmake @@ -89928,7 +89928,7 @@ set(GENERIC_L100C6UXA_MCU cortex-m3) set(GENERIC_L100C6UXA_FPCONF "-") add_library(GENERIC_L100C6UXA INTERFACE) target_compile_options(GENERIC_L100C6UXA INTERFACE - "SHELL:-DSTM32L100xB " + "SHELL:-DSTM32L100xBA " "SHELL:" "SHELL:" "SHELL: " @@ -90068,7 +90068,7 @@ set(GENERIC_L151C6TXA_MCU cortex-m3) set(GENERIC_L151C6TXA_FPCONF "-") add_library(GENERIC_L151C6TXA INTERFACE) target_compile_options(GENERIC_L151C6TXA INTERFACE - "SHELL:-DSTM32L151xB " + "SHELL:-DSTM32L151xBA " "SHELL:" "SHELL:" "SHELL: " @@ -90208,7 +90208,7 @@ set(GENERIC_L151C6UXA_MCU cortex-m3) set(GENERIC_L151C6UXA_FPCONF "-") add_library(GENERIC_L151C6UXA INTERFACE) target_compile_options(GENERIC_L151C6UXA INTERFACE - "SHELL:-DSTM32L151xB " + "SHELL:-DSTM32L151xBA " "SHELL:" "SHELL:" "SHELL: " @@ -90348,7 +90348,7 @@ set(GENERIC_L151C8TXA_MCU cortex-m3) set(GENERIC_L151C8TXA_FPCONF "-") add_library(GENERIC_L151C8TXA INTERFACE) target_compile_options(GENERIC_L151C8TXA INTERFACE - "SHELL:-DSTM32L151xB " + "SHELL:-DSTM32L151xBA " "SHELL:" "SHELL:" "SHELL: " @@ -90488,7 +90488,7 @@ set(GENERIC_L151C8UXA_MCU cortex-m3) set(GENERIC_L151C8UXA_FPCONF "-") add_library(GENERIC_L151C8UXA INTERFACE) target_compile_options(GENERIC_L151C8UXA INTERFACE - "SHELL:-DSTM32L151xB " + "SHELL:-DSTM32L151xBA " "SHELL:" "SHELL:" "SHELL: " @@ -90628,7 +90628,7 @@ set(GENERIC_L151CBTXA_MCU cortex-m3) set(GENERIC_L151CBTXA_FPCONF "-") add_library(GENERIC_L151CBTXA INTERFACE) target_compile_options(GENERIC_L151CBTXA INTERFACE - "SHELL:-DSTM32L151xB " + "SHELL:-DSTM32L151xBA " "SHELL:" "SHELL:" "SHELL: " @@ -90768,7 +90768,7 @@ set(GENERIC_L151CBUXA_MCU cortex-m3) set(GENERIC_L151CBUXA_FPCONF "-") add_library(GENERIC_L151CBUXA INTERFACE) target_compile_options(GENERIC_L151CBUXA INTERFACE - "SHELL:-DSTM32L151xB " + "SHELL:-DSTM32L151xBA " "SHELL:" "SHELL:" "SHELL: " @@ -91048,7 +91048,7 @@ set(GENERIC_L152C6TXA_MCU cortex-m3) set(GENERIC_L152C6TXA_FPCONF "-") add_library(GENERIC_L152C6TXA INTERFACE) target_compile_options(GENERIC_L152C6TXA INTERFACE - "SHELL:-DSTM32L152xB " + "SHELL:-DSTM32L152xBA " "SHELL:" "SHELL:" "SHELL: " @@ -91188,7 +91188,7 @@ set(GENERIC_L152C6UXA_MCU cortex-m3) set(GENERIC_L152C6UXA_FPCONF "-") add_library(GENERIC_L152C6UXA INTERFACE) target_compile_options(GENERIC_L152C6UXA INTERFACE - "SHELL:-DSTM32L152xB " + "SHELL:-DSTM32L152xBA " "SHELL:" "SHELL:" "SHELL: " @@ -91328,7 +91328,7 @@ set(GENERIC_L152C8TXA_MCU cortex-m3) set(GENERIC_L152C8TXA_FPCONF "-") add_library(GENERIC_L152C8TXA INTERFACE) target_compile_options(GENERIC_L152C8TXA INTERFACE - "SHELL:-DSTM32L152xB " + "SHELL:-DSTM32L152xBA " "SHELL:" "SHELL:" "SHELL: " @@ -91468,7 +91468,7 @@ set(GENERIC_L152C8UXA_MCU cortex-m3) set(GENERIC_L152C8UXA_FPCONF "-") add_library(GENERIC_L152C8UXA INTERFACE) target_compile_options(GENERIC_L152C8UXA INTERFACE - "SHELL:-DSTM32L152xB " + "SHELL:-DSTM32L152xBA " "SHELL:" "SHELL:" "SHELL: " @@ -91608,7 +91608,7 @@ set(GENERIC_L152CBTXA_MCU cortex-m3) set(GENERIC_L152CBTXA_FPCONF "-") add_library(GENERIC_L152CBTXA INTERFACE) target_compile_options(GENERIC_L152CBTXA INTERFACE - "SHELL:-DSTM32L152xB " + "SHELL:-DSTM32L152xBA " "SHELL:" "SHELL:" "SHELL: " @@ -91748,7 +91748,7 @@ set(GENERIC_L152CBUXA_MCU cortex-m3) set(GENERIC_L152CBUXA_FPCONF "-") add_library(GENERIC_L152CBUXA INTERFACE) target_compile_options(GENERIC_L152CBUXA INTERFACE - "SHELL:-DSTM32L152xB " + "SHELL:-DSTM32L152xBA " "SHELL:" "SHELL:" "SHELL: " @@ -106350,6 +106350,88 @@ target_compile_options(NUCLEO_H753ZI_xusb_HSFS INTERFACE "SHELL:-DUSE_USB_HS -DUSE_USB_HS_IN_FS" ) +# NUCLEO_H7A3ZI_Q +# ----------------------------------------------------------------------------- + +set(NUCLEO_H7A3ZI_Q_VARIANT_PATH "${CMAKE_CURRENT_LIST_DIR}/../variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ") +set(NUCLEO_H7A3ZI_Q_MAXSIZE 2097152) +set(NUCLEO_H7A3ZI_Q_MAXDATASIZE 1048576) +set(NUCLEO_H7A3ZI_Q_MCU cortex-m7) +set(NUCLEO_H7A3ZI_Q_FPCONF "fpv4-sp-d16-hard") +add_library(NUCLEO_H7A3ZI_Q INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q INTERFACE + "SHELL:-DSTM32H7A3xxQ " + "SHELL:" + "SHELL:" + "SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard" + -mcpu=${NUCLEO_H7A3ZI_Q_MCU} +) +target_compile_definitions(NUCLEO_H7A3ZI_Q INTERFACE + "STM32H7xx" + "ARDUINO_NUCLEO_H7A3ZI_Q" + "BOARD_NAME=\"NUCLEO_H7A3ZI_Q\"" + "BOARD_ID=NUCLEO_H7A3ZI_Q" + "VARIANT_H=\"variant_NUCLEO_H7A3ZI_Q.h\"" +) +target_include_directories(NUCLEO_H7A3ZI_Q INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/../system/STM32H7xx + ${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32H7xx_HAL_Driver/Inc + ${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/STM32H7xx_HAL_Driver/Src + ${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32H7xx/Include/ + ${CMAKE_CURRENT_LIST_DIR}/../system/Drivers/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/ + ${NUCLEO_H7A3ZI_Q_VARIANT_PATH} +) + +target_link_options(NUCLEO_H7A3ZI_Q INTERFACE + "LINKER:--default-script=${NUCLEO_H7A3ZI_Q_VARIANT_PATH}/ldscript.ld" + "LINKER:--defsym=LD_FLASH_OFFSET=0x0" + "LINKER:--defsym=LD_MAX_SIZE=2097152" + "LINKER:--defsym=LD_MAX_DATA_SIZE=1048576" + "SHELL:-mfpu=fpv4-sp-d16 -mfloat-abi=hard" + -mcpu=${NUCLEO_H7A3ZI_Q_MCU} +) + +add_library(NUCLEO_H7A3ZI_Q_serial_disabled INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_serial_disabled INTERFACE + "SHELL:" +) +add_library(NUCLEO_H7A3ZI_Q_serial_generic INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_serial_generic INTERFACE + "SHELL:-DHAL_UART_MODULE_ENABLED" +) +add_library(NUCLEO_H7A3ZI_Q_serial_none INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_serial_none INTERFACE + "SHELL:-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE" +) +add_library(NUCLEO_H7A3ZI_Q_usb_CDC INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_usb_CDC INTERFACE + "SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB" +) +add_library(NUCLEO_H7A3ZI_Q_usb_CDCgen INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_usb_CDCgen INTERFACE + "SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC" +) +add_library(NUCLEO_H7A3ZI_Q_usb_HID INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_usb_HID INTERFACE + "SHELL:-DUSBCON -DUSBD_VID=0x0483 -DUSBD_PID=0x5740 -DHAL_PCD_MODULE_ENABLED -DUSBD_USE_HID_COMPOSITE" +) +add_library(NUCLEO_H7A3ZI_Q_usb_none INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_usb_none INTERFACE + "SHELL:" +) +add_library(NUCLEO_H7A3ZI_Q_xusb_FS INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_xusb_FS INTERFACE + "SHELL:" +) +add_library(NUCLEO_H7A3ZI_Q_xusb_HS INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_xusb_HS INTERFACE + "SHELL:-DUSE_USB_HS" +) +add_library(NUCLEO_H7A3ZI_Q_xusb_HSFS INTERFACE) +target_compile_options(NUCLEO_H7A3ZI_Q_xusb_HSFS INTERFACE + "SHELL:-DUSE_USB_HS -DUSE_USB_HS_IN_FS" +) + # NUCLEO_L010RB # ----------------------------------------------------------------------------- diff --git a/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/CMakeLists.txt b/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/CMakeLists.txt index 2a4d55b6b1..f91ab0ed5d 100644 --- a/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/CMakeLists.txt +++ b/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/CMakeLists.txt @@ -22,6 +22,7 @@ add_library(variant_bin STATIC EXCLUDE_FROM_ALL generic_clock.c PeripheralPins.c variant_generic.cpp + variant_NUCLEO_H7A3ZI_Q.cpp ) target_link_libraries(variant_bin PUBLIC variant_usage)