Skip to content

Commit 7817c72

Browse files
committed
drivers: stepper: adi_tmc: cmake reorg
reorganize CMakeLists for TMC5xxx support subsequent to the changes. Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
1 parent cd7fa66 commit 7817c72

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

drivers/stepper/adi_tmc/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ zephyr_library()
55
zephyr_library_property(ALLOW_EMPTY TRUE)
66

77
zephyr_library_sources_ifdef(CONFIG_STEPPER_ADI_TMC2209 tmc22xx.c)
8-
zephyr_library_sources_ifdef(CONFIG_STEPPER_ADI_TMC50XX tmc50xx.c)
9-
add_subdirectory_ifdef(CONFIG_STEPPER_ADI_TMC51XX tmc51xx)
8+
9+
if(CONFIG_STEPPER_ADI_TMC51XX OR CONFIG_STEPPER_ADI_TMC50XX)
10+
add_subdirectory(tmc5xxx)
11+
endif()
1012

1113
add_subdirectory_ifdef(CONFIG_STEPPER_ADI_TMC bus)

drivers/stepper/adi_tmc/tmc51xx/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 Dipak Shetty
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_library_sources(adi_tmc5xxx_core.c)
5+
6+
# Common bus implementation sources
7+
zephyr_library_sources_ifdef(CONFIG_STEPPER_ADI_TMC_SPI tmc5xxx_spi.c)
8+
zephyr_library_sources_ifdef(CONFIG_STEPPER_ADI_TMC_UART tmc5xxx_uart.c)
9+
10+
# Device-specific implementations
11+
zephyr_library_sources_ifdef(CONFIG_STEPPER_ADI_TMC50XX tmc50xx.c)
12+
zephyr_library_sources_ifdef(CONFIG_STEPPER_ADI_TMC51XX tmc51xx.c)
13+

0 commit comments

Comments
 (0)