Skip to content

Add support for Nucleo U5A5ZJ-Q #63144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions boards/arm/nucleo_u5a5zj_q/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: Apache-2.0

if(${ZEPHYR_TOOLCHAIN_VARIANT} STREQUAL "zephyr")
set(COMPILER_FULL_PATH ${ZEPHYR_SDK_INSTALL_DIR}/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc)
elseif(${ZEPHYR_TOOLCHAIN_VARIANT} STREQUAL "gnuarmemb")
set(COMPILER_FULL_PATH ${GNUARMEMB_TOOLCHAIN_PATH}/bin/arm-none-eabi-gcc)
endif()

if(CONFIG_BUILD_WITH_TFM)
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
#Execute post build script postbuild.sh
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
)
endif()
8 changes: 8 additions & 0 deletions boards/arm/nucleo_u5a5zj_q/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# STM32U5A5ZJ Q Nucleo board configuration

# Copyright (c) 2023 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0

config BOARD_NUCLEO_U5A5ZJ_Q
bool "Nucleo U5A5ZJ Q Development Board"
depends on SOC_STM32U5A5XX
11 changes: 11 additions & 0 deletions boards/arm/nucleo_u5a5zj_q/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# STM32U5A5ZJ Q Nucleo board configuration

# Copyright (c) 2023 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0

if BOARD_NUCLEO_U5A5ZJ_Q

config BOARD
default "nucleo_u5a5zj_q"

endif # BOARD_NUCLEO_U5A5ZJ_Q
40 changes: 40 additions & 0 deletions boards/arm/nucleo_u5a5zj_q/arduino_r3_connector.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2023 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
arduino_header: connector {
compatible = "arduino-header-r3";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpioa 3 0>, /* A0 */
<1 0 &gpioa 2 0>, /* A1 */
<2 0 &gpioc 3 0>, /* A2 */
<3 0 &gpiob 0 0>, /* A3 */
<4 0 &gpioc 1 0>, /* A4 */
<5 0 &gpioc 0 0>, /* A5 */
<6 0 &gpiog 8 0>, /* D0 */
<7 0 &gpiog 7 0>, /* D1 */
<8 0 &gpiof 15 0>, /* D2 */
<9 0 &gpioe 13 0>, /* D3 */
<10 0 &gpiof 14 0>, /* D4 */
<11 0 &gpioe 11 0>, /* D5 */
<12 0 &gpioe 9 0>, /* D6 */
<13 0 &gpiof 13 0>, /* D7 */
<14 0 &gpiof 12 0>, /* D8 */
<15 0 &gpiod 15 0>, /* D9 */
<16 0 &gpiod 14 0>, /* D10 */
<17 0 &gpioa 7 0>, /* D11 */
<18 0 &gpioa 6 0>, /* D12 */
<19 0 &gpioa 5 0>, /* D13 */
<20 0 &gpiob 9 0>, /* D14 */
<21 0 &gpiob 8 0>; /* D15 */
};
};

arduino_i2c: &i2c1 {};
arduino_spi: &spi1 {};
arduino_serial: &lpuart1 {};
14 changes: 14 additions & 0 deletions boards/arm/nucleo_u5a5zj_q/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")

board_runner_args(openocd "--tcl-port=6666")
board_runner_args(openocd --cmd-pre-init "gdb_report_data_abort enable")
board_runner_args(openocd "--no-halt")

board_runner_args(pyocd "--target=stm32u5a5zjtx")

board_runner_args(jlink "--device=STM32U5A5ZJ" "--reset-after-load")

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Loading