Skip to content
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

drivers: build as static library #37512

Merged
merged 34 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1a39fa9
arm64: smp: arm64_smp_init to be done at PRE_KERNEL_2
dcpleung Aug 8, 2021
32ee069
drivers: interrupt_controller: build as static library
dcpleung Aug 4, 2021
a5a1bf3
cmake: add zephyr_library_include_directories_ifdef()
dcpleung Aug 4, 2021
0c54532
drivers: timer: build as static library
dcpleung Aug 4, 2021
c7e41a0
console: native_posix: change init priority to 99
dcpleung Aug 8, 2021
1ddbe0e
console: semihosting: remove unused include
dcpleung Aug 11, 2021
0d6447c
drivers: console: build as static library
dcpleung Aug 4, 2021
e276247
drivers: i2c: slave: group into i2c static library
dcpleung Aug 4, 2021
740dc80
drivers: pcie: build as static library
dcpleung Aug 4, 2021
cff1391
drivers: wifi: build as static library
dcpleung Aug 4, 2021
e93cf92
bluetooth: audio: build as static library
dcpleung Aug 4, 2021
564d81e
drivers: bluetooth: build as static library
dcpleung Aug 4, 2021
8004561
drivers: sensors: build as static libraries
dcpleung Aug 4, 2021
5eac434
drivers: can: build as static library
dcpleung Aug 4, 2021
8d4cc5f
drivers: clock_control: build as static library
dcpleung Aug 4, 2021
8765e20
drivers: disk: build as static library
dcpleung Aug 4, 2021
23f789f
drivers: edac: build as static library
dcpleung Aug 4, 2021
cd761a5
drivers: ethernet: build as static library
dcpleung Aug 4, 2021
0c89ba1
drivers: flash: build as static library
dcpleung Aug 4, 2021
96de8bb
drivers: hwinfo: build as static library
dcpleung Aug 4, 2021
f53293e
drivers: ieee802154: build as static library
dcpleung Aug 4, 2021
3c5a1f3
drivers: led: build as static library
dcpleung Aug 4, 2021
39adc50
drivers: led_strip: build as static library
dcpleung Aug 4, 2021
3939d1f
drivers: memc: build as static library
dcpleung Aug 4, 2021
12fc20a
drivers: modem: build as static library
dcpleung Aug 4, 2021
5bd9101
drivers: net: build as static library
dcpleung Aug 4, 2021
545b005
drivers: pinmux: build as static library
dcpleung Aug 4, 2021
231255f
drivers: ptp_clock: build as static library
dcpleung Aug 4, 2021
5aa4b73
drivers: usb: build as static library
dcpleung Aug 4, 2021
32b0281
drivers: watchdog: build as static library
dcpleung Aug 4, 2021
300b6c1
drivers: sys_con: build as static library
dcpleung Aug 6, 2021
56aa254
drivers: pm_cpu_ops: build as static library
dcpleung Aug 6, 2021
0625eac
display: change init priority config to 85
dcpleung Aug 8, 2021
2d4cefb
drivers: display: build as static library
dcpleung Aug 4, 2021
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
2 changes: 1 addition & 1 deletion arch/arm64/core/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,6 @@ static int arm64_smp_init(const struct device *dev)

return 0;
}
SYS_INIT(arm64_smp_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
SYS_INIT(arm64_smp_init, PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change have to do with building drivers as a static library?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arm64_smp_init() has the same init level and priority as the GICv3 interrupt controller. The linking order is affected by the interrupt controller driver being inside a static library, resulting in the interrupt controller being initialized later than arm64_smp_init(). There are hard faults running arm64_smp_init() as it is setting up IRQs for IPI. This change is simply to make sure the interrupt controller is initialized first.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, thanks. Could you mention in the commit message that you found this while converting the interrupt controller drivers to build in a static library?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is under a separate commit (1c15674) with explanation in the commit message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message doesn't mention why the link order changed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... because that commit is before the changes on driver. I have updated the commit message to say that it is in preparation for the driver changes. Does this work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks


#endif
6 changes: 6 additions & 0 deletions cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,12 @@ function(zephyr_library_compile_definitions_ifdef feature_toggle item)
endif()
endfunction()

function(zephyr_library_include_directories_ifdef feature_toggle)
if(${${feature_toggle}})
zephyr_library_include_directories(${ARGN})
endif()
endfunction()

function(zephyr_library_compile_options_ifdef feature_toggle item)
if(${${feature_toggle}})
zephyr_library_compile_options(${item} ${ARGN})
Expand Down
3 changes: 2 additions & 1 deletion drivers/bluetooth/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_include_directories(${ZEPHYR_BASE}/subsys/bluetooth)
zephyr_library()
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/bluetooth)
add_subdirectory(hci)
16 changes: 8 additions & 8 deletions drivers/bluetooth/hci/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_BT_H4 h4.c)
zephyr_sources_ifdef(CONFIG_BT_H5 h5.c)
zephyr_sources_ifdef(CONFIG_BT_SPI spi.c)
zephyr_sources_ifdef(CONFIG_BT_RPMSG rpmsg.c)
zephyr_sources_ifdef(CONFIG_BT_RPMSG_NRF53 rpmsg_nrf53.c)
zephyr_sources_ifdef(CONFIG_BT_STM32_IPM ipm_stm32wb.c)
zephyr_sources_ifdef(CONFIG_BT_USERCHAN userchan.c)
zephyr_sources_ifdef(CONFIG_BT_ESP32 hci_esp32.c)
zephyr_library_sources_ifdef(CONFIG_BT_ESP32 hci_esp32.c)
zephyr_library_sources_ifdef(CONFIG_BT_H4 h4.c)
zephyr_library_sources_ifdef(CONFIG_BT_H5 h5.c)
zephyr_library_sources_ifdef(CONFIG_BT_RPMSG rpmsg.c)
zephyr_library_sources_ifdef(CONFIG_BT_RPMSG_NRF53 rpmsg_nrf53.c)
zephyr_library_sources_ifdef(CONFIG_BT_SPI spi.c)
zephyr_library_sources_ifdef(CONFIG_BT_STM32_IPM ipm_stm32wb.c)
zephyr_library_sources_ifdef(CONFIG_BT_USERCHAN userchan.c)
24 changes: 13 additions & 11 deletions drivers/can/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_CAN can_common.c)
zephyr_sources_ifdef(CONFIG_CAN_LOOPBACK can_loopback.c)
zephyr_sources_ifdef(CONFIG_CAN_MCP2515 can_mcp2515.c)
zephyr_sources_ifdef(CONFIG_CAN_STM32 can_stm32.c)
zephyr_sources_ifdef(CONFIG_CAN_STM32FD can_stm32fd.c)
zephyr_sources_ifdef(CONFIG_CAN_MCAN can_mcan.c)
zephyr_sources_ifdef(CONFIG_CAN_MCUX_FLEXCAN can_mcux_flexcan.c)
zephyr_sources_ifdef(CONFIG_CAN_RCAR can_rcar.c)
zephyr_library()

zephyr_sources_ifdef(CONFIG_USERSPACE can_handlers.c)
zephyr_sources_ifdef(CONFIG_CAN_SHELL can_shell.c)
zephyr_sources_ifdef(CONFIG_CAN_NET can_net.c)
zephyr_library_sources_ifdef(CONFIG_CAN can_common.c)
zephyr_library_sources_ifdef(CONFIG_CAN_LOOPBACK can_loopback.c)
zephyr_library_sources_ifdef(CONFIG_CAN_MCAN can_mcan.c)
zephyr_library_sources_ifdef(CONFIG_CAN_MCP2515 can_mcp2515.c)
zephyr_library_sources_ifdef(CONFIG_CAN_MCUX_FLEXCAN can_mcux_flexcan.c)
zephyr_library_sources_ifdef(CONFIG_CAN_STM32 can_stm32.c)
zephyr_library_sources_ifdef(CONFIG_CAN_STM32FD can_stm32fd.c)
zephyr_library_sources_ifdef(CONFIG_CAN_RCAR can_rcar.c)

zephyr_library_sources_ifdef(CONFIG_USERSPACE can_handlers.c)
zephyr_library_sources_ifdef(CONFIG_CAN_SHELL can_shell.c)
zephyr_library_sources_ifdef(CONFIG_CAN_NET can_net.c)
72 changes: 37 additions & 35 deletions drivers/clock_control/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_BEETLE beetle_clock_control.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_LPC11U6X clock_control_lpc11u6x.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_CCM clock_control_mcux_ccm.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_CCM_REV2 clock_control_mcux_ccm_rev2.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_MCG clock_control_mcux_mcg.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_PCC clock_control_mcux_pcc.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_SCG clock_control_mcux_scg.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_SIM clock_control_mcux_sim.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_SYSCON clock_control_mcux_syscon.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_NPCX clock_control_npcx.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF clock_control_nrf.c)
zephyr_library()

zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_BEETLE beetle_clock_control.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_ESP32 clock_control_esp32.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_LITEX clock_control_litex.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_LPC11U6X clock_control_lpc11u6x.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCHP_XEC clock_control_mchp_xec.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_CCM clock_control_mcux_ccm.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_CCM_REV2 clock_control_mcux_ccm_rev2.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_MCG clock_control_mcux_mcg.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_PCC clock_control_mcux_pcc.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_SCG clock_control_mcux_scg.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_SIM clock_control_mcux_sim.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_SYSCON clock_control_mcux_syscon.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NPCX clock_control_npcx.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF clock_control_nrf.c)
if(CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION AND NOT CONFIG_CLOCK_CONTROL_NRF_FORCE_ALT)
zephyr_sources(nrf_clock_calibration.c)
zephyr_library_sources(nrf_clock_calibration.c)
endif()
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_RV32M1_PCC clock_control_rv32m1_pcc.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_ESP32 clock_control_esp32.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_LITEX clock_control_litex.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_RCAR_CPG_MSSR clock_control_rcar_cpg_mssr.c)
zephyr_sources_ifdef(CONFIG_CLOCK_CONTROL_MCHP_XEC clock_control_mchp_xec.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_RCAR_CPG_MSSR clock_control_rcar_cpg_mssr.c)
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_RV32M1_PCC clock_control_rv32m1_pcc.c)

if(CONFIG_CLOCK_CONTROL_STM32_CUBE)
if(CONFIG_SOC_SERIES_STM32MP1X)
zephyr_sources(clock_stm32_ll_mp1.c)
zephyr_library_sources(clock_stm32_ll_mp1.c)
elseif(CONFIG_SOC_SERIES_STM32H7X)
zephyr_sources(clock_stm32_ll_h7.c)
zephyr_library_sources(clock_stm32_ll_h7.c)
elseif(CONFIG_SOC_SERIES_STM32U5X)
zephyr_sources(clock_stm32_ll_u5.c)
zephyr_library_sources(clock_stm32_ll_u5.c)
else()
zephyr_sources(clock_stm32_ll_common.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32F0X clock_stm32f0_f3.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32F1X clock_stm32f1.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32F2X clock_stm32f2_f4_f7.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32F3X clock_stm32f0_f3.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32F4X clock_stm32f2_f4_f7.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32F7X clock_stm32f2_f4_f7.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32G0X clock_stm32g0.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32L0X clock_stm32l0_l1.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32L1X clock_stm32l0_l1.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32L4X clock_stm32l4_l5_wb_wl.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32L5X clock_stm32l4_l5_wb_wl.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32WBX clock_stm32l4_l5_wb_wl.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32G4X clock_stm32g4.c)
zephyr_sources_ifdef(CONFIG_SOC_SERIES_STM32WLX clock_stm32l4_l5_wb_wl.c)
zephyr_library_sources(clock_stm32_ll_common.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32F0X clock_stm32f0_f3.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32F1X clock_stm32f1.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32F2X clock_stm32f2_f4_f7.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32F3X clock_stm32f0_f3.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32F4X clock_stm32f2_f4_f7.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32F7X clock_stm32f2_f4_f7.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32G0X clock_stm32g0.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32G4X clock_stm32g4.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32L0X clock_stm32l0_l1.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32L1X clock_stm32l0_l1.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32L4X clock_stm32l4_l5_wb_wl.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32L5X clock_stm32l4_l5_wb_wl.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32WBX clock_stm32l4_l5_wb_wl.c)
zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_STM32WLX clock_stm32l4_l5_wb_wl.c)
endif()
endif()
27 changes: 14 additions & 13 deletions drivers/console/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_UART_CONSOLE uart_console.c)
zephyr_sources_ifdef(CONFIG_RAM_CONSOLE ram_console.c)
zephyr_sources_ifdef(CONFIG_RTT_CONSOLE rtt_console.c)
zephyr_sources_ifdef(CONFIG_IPM_CONSOLE_RECEIVER ipm_console_receiver.c)
zephyr_sources_ifdef(CONFIG_IPM_CONSOLE_SENDER ipm_console_sender.c)
zephyr_sources_ifdef(CONFIG_IPM_CONSOLE ipm_console.c)
zephyr_sources_ifdef(CONFIG_UART_MCUMGR uart_mcumgr.c)
zephyr_sources_ifdef(CONFIG_UART_PIPE uart_pipe.c)
zephyr_sources_ifdef(CONFIG_XTENSA_SIM_CONSOLE xtensa_sim_console.c)
zephyr_sources_ifdef(CONFIG_NATIVE_POSIX_CONSOLE native_posix_console.c)
zephyr_sources_ifdef(CONFIG_UART_MUX uart_mux.c)
zephyr_sources_ifdef(CONFIG_GSM_MUX gsm_mux.c)
zephyr_sources_ifdef(CONFIG_SEMIHOST_CONSOLE semihost_console.c)
zephyr_library()
zephyr_library_sources_ifdef(CONFIG_GSM_MUX gsm_mux.c)
zephyr_library_sources_ifdef(CONFIG_IPM_CONSOLE_RECEIVER ipm_console_receiver.c)
zephyr_library_sources_ifdef(CONFIG_IPM_CONSOLE_SENDER ipm_console_sender.c)
zephyr_library_sources_ifdef(CONFIG_IPM_CONSOLE ipm_console.c)
zephyr_library_sources_ifdef(CONFIG_NATIVE_POSIX_CONSOLE native_posix_console.c)
zephyr_library_sources_ifdef(CONFIG_RAM_CONSOLE ram_console.c)
zephyr_library_sources_ifdef(CONFIG_RTT_CONSOLE rtt_console.c)
zephyr_library_sources_ifdef(CONFIG_SEMIHOST_CONSOLE semihost_console.c)
zephyr_library_sources_ifdef(CONFIG_UART_CONSOLE uart_console.c)
zephyr_library_sources_ifdef(CONFIG_UART_MCUMGR uart_mcumgr.c)
zephyr_library_sources_ifdef(CONFIG_UART_MUX uart_mux.c)
zephyr_library_sources_ifdef(CONFIG_UART_PIPE uart_pipe.c)
zephyr_library_sources_ifdef(CONFIG_XTENSA_SIM_CONSOLE xtensa_sim_console.c)
2 changes: 1 addition & 1 deletion drivers/console/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ config XTENSA_CONSOLE_INIT_PRIORITY

config NATIVE_POSIX_CONSOLE_INIT_PRIORITY
int "Init priority"
default 60
default 99
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change have to do with building drivers as a static library?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to linking order. For example, if both native POSIX console and UART console are enabled, the UART console driver takes over the printk hook which means there is nothing being printed to the terminal. Tests are failing due to empty outputs.

depends on NATIVE_POSIX_CONSOLE
help
Device driver initialization priority.
Expand Down
1 change: 0 additions & 1 deletion drivers/console/semihost_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <kernel.h>
#include <device.h>
#include <init.h>
#include <kernel_arch_interface.h>
gmarull marked this conversation as resolved.
Show resolved Hide resolved

extern void __stdout_hook_install(int (*fn)(int));

Expand Down
17 changes: 12 additions & 5 deletions drivers/disk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Copyright (c) 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_DISK_DRIVER_RAM ramdisk.c)
zephyr_sources_ifdef(CONFIG_DISK_DRIVER_FLASH flashdisk.c)
zephyr_sources_ifdef(CONFIG_SDMMC_OVER_SPI sdmmc_spi.c)
zephyr_sources_ifdef(CONFIG_SDMMC_USDHC usdhc.c)
zephyr_sources_ifdef(CONFIG_SDMMC_STM32 sdmmc_stm32.c)
if(CONFIG_DISK_DRIVERS)

zephyr_library()

zephyr_library_sources_ifdef(CONFIG_DISK_DRIVER_FLASH flashdisk.c)
zephyr_library_sources_ifdef(CONFIG_DISK_DRIVER_RAM ramdisk.c)

zephyr_library_sources_ifdef(CONFIG_SDMMC_OVER_SPI sdmmc_spi.c)
zephyr_library_sources_ifdef(CONFIG_SDMMC_STM32 sdmmc_stm32.c)
zephyr_library_sources_ifdef(CONFIG_SDMMC_USDHC usdhc.c)

endif()
36 changes: 17 additions & 19 deletions drivers/display/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_DISPLAY_MCUX_ELCDIF display_mcux_elcdif.c)
zephyr_sources_ifdef(CONFIG_GROVE_LCD_RGB grove_lcd_rgb.c)
zephyr_sources_ifdef(CONFIG_SSD1306 ssd1306.c)
zephyr_sources_ifdef(CONFIG_SSD16XX ssd16xx.c)
zephyr_sources_ifdef(CONFIG_SDL_DISPLAY display_sdl.c)
zephyr_sources_ifdef(CONFIG_DUMMY_DISPLAY display_dummy.c)
zephyr_sources_ifdef(CONFIG_FRAMEBUF_DISPLAY display_framebuf.c)
zephyr_sources_ifdef(CONFIG_ST7789V display_st7789v.c)
zephyr_sources_ifdef(CONFIG_ST7735R display_st7735r.c)
zephyr_sources_ifdef(CONFIG_GD7965 gd7965.c)
zephyr_sources_ifdef(CONFIG_LS0XX ls0xx.c)
zephyr_library()
zephyr_library_sources_ifdef(CONFIG_DISPLAY_MCUX_ELCDIF display_mcux_elcdif.c)
zephyr_library_sources_ifdef(CONFIG_DUMMY_DISPLAY display_dummy.c)
zephyr_library_sources_ifdef(CONFIG_FRAMEBUF_DISPLAY display_framebuf.c)
zephyr_library_sources_ifdef(CONFIG_GD7965 gd7965.c)
zephyr_library_sources_ifdef(CONFIG_GROVE_LCD_RGB grove_lcd_rgb.c)
zephyr_library_sources_ifdef(CONFIG_ILI9XXX display_ili9xxx.c)
zephyr_library_sources_ifdef(CONFIG_ILI9340 display_ili9340.c)
zephyr_library_sources_ifdef(CONFIG_ILI9341 display_ili9341.c)
zephyr_library_sources_ifdef(CONFIG_ILI9488 display_ili9488.c)
zephyr_library_sources_ifdef(CONFIG_LS0XX ls0xx.c)
zephyr_library_sources_ifdef(CONFIG_SDL_DISPLAY display_sdl.c)
zephyr_library_sources_ifdef(CONFIG_SSD1306 ssd1306.c)
zephyr_library_sources_ifdef(CONFIG_SSD16XX ssd16xx.c)
zephyr_library_sources_ifdef(CONFIG_ST7789V display_st7789v.c)
zephyr_library_sources_ifdef(CONFIG_ST7735R display_st7735r.c)

if (CONFIG_ILI9XXX)
zephyr_sources(display_ili9xxx.c)
endif()
zephyr_sources_ifdef(CONFIG_ILI9340 display_ili9340.c)
zephyr_sources_ifdef(CONFIG_ILI9341 display_ili9341.c)
zephyr_sources_ifdef(CONFIG_ILI9488 display_ili9488.c)

zephyr_sources_ifdef(CONFIG_MICROBIT_DISPLAY
zephyr_library_sources_ifdef(CONFIG_MICROBIT_DISPLAY
mb_display.c
mb_font.c
)
2 changes: 1 addition & 1 deletion drivers/display/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if DISPLAY

config DISPLAY_INIT_PRIORITY
int "Display devices init priority"
default 90
default 85
help
Display devices initialization priority.

Expand Down
6 changes: 4 additions & 2 deletions drivers/edac/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_EDAC_IBECC edac_ibecc.c)
zephyr_sources_ifdef(CONFIG_EDAC_SHELL shell.c)
zephyr_library()

zephyr_library_sources_ifdef(CONFIG_EDAC_IBECC edac_ibecc.c)
zephyr_library_sources_ifdef(CONFIG_EDAC_SHELL shell.c)
46 changes: 23 additions & 23 deletions drivers/ethernet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_include_directories(${ZEPHYR_BASE}/subsys/net/l2)
zephyr_library()

zephyr_sources_ifdef(CONFIG_ETH_SAM_GMAC
eth_sam_gmac.c
phy_sam_gmac.c
)

zephyr_sources_ifdef(CONFIG_ETH_GECKO
zephyr_library_sources_ifdef(CONFIG_ETH_GECKO
eth_gecko.c
phy_gecko.c
)

zephyr_sources_ifdef(CONFIG_ETH_XLNX_GEM
zephyr_library_sources_ifdef(CONFIG_ETH_SAM_GMAC
eth_sam_gmac.c
phy_sam_gmac.c
)

zephyr_library_sources_ifdef(CONFIG_ETH_XLNX_GEM
eth_xlnx_gem.c
phy_xlnx_gem.c
)

zephyr_sources_ifdef(CONFIG_ETH_STELLARIS eth_stellaris.c)
zephyr_sources_ifdef(CONFIG_ETH_E1000 eth_e1000.c)
zephyr_sources_ifdef(CONFIG_ETH_ENC28J60 eth_enc28j60.c)
zephyr_sources_ifdef(CONFIG_ETH_ENC424J600 eth_enc424j600.c)
zephyr_sources_ifdef(CONFIG_ETH_MCUX eth_mcux.c)
zephyr_sources_ifdef(CONFIG_ETH_SMSC911X eth_smsc911x.c)
zephyr_sources_ifdef(CONFIG_ETH_STM32_HAL eth_stm32_hal.c)
zephyr_sources_ifdef(CONFIG_ETH_LITEETH eth_liteeth.c)
zephyr_sources_ifdef(CONFIG_ETH_W5500 eth_w5500.c)
zephyr_sources_ifdef(CONFIG_DSA_KSZ8XXX dsa_ksz8xxx.c)
zephyr_library_sources_ifdef(CONFIG_ETH_E1000 eth_e1000.c)
zephyr_library_sources_ifdef(CONFIG_ETH_ENC28J60 eth_enc28j60.c)
zephyr_library_sources_ifdef(CONFIG_ETH_ENC424J600 eth_enc424j600.c)
zephyr_library_sources_ifdef(CONFIG_DSA_KSZ8XXX dsa_ksz8xxx.c)
zephyr_library_sources_ifdef(CONFIG_ETH_LITEETH eth_liteeth.c)
zephyr_library_sources_ifdef(CONFIG_ETH_MCUX eth_mcux.c)
zephyr_library_sources_ifdef(CONFIG_ETH_SMSC911X eth_smsc911x.c)
zephyr_library_sources_ifdef(CONFIG_ETH_STELLARIS eth_stellaris.c)
zephyr_library_sources_ifdef(CONFIG_ETH_STM32_HAL eth_stm32_hal.c)
zephyr_library_sources_ifdef(CONFIG_ETH_W5500 eth_w5500.c)

if(CONFIG_ETH_NATIVE_POSIX)
zephyr_library()
zephyr_library_named(drivers__ethernet__native_posix)
zephyr_library_compile_definitions(
NO_POSIX_CHEATS
_BSD_SOURCE
_DEFAULT_SOURCE
)
NO_POSIX_CHEATS
_BSD_SOURCE
_DEFAULT_SOURCE
)
zephyr_library_sources(
eth_native_posix.c
eth_native_posix_adapt.c
Expand Down
Loading