Skip to content

Commit 9988067

Browse files
robhancocksedcarlescufi
authored andcommitted
tests: drivers: build_all: add build for wdt_xilinx_axi
There is currently not an in-tree Zephyr board which enables the wdt_xilinx_axi driver as part of its standard configuration. (It can be enabled fairly easily with the Digilent Arty board, but that requires modifying the ARM-provided FPGA block design in Vivado and rebuilding the FPGA image, so it cannot be used with the default FPGA image.) Add a build_all target to provide build coverage for this driver. Signed-off-by: Robert Hancock <[email protected]>
1 parent e57bab5 commit 9988067

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(build_all)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright © 2023 Calian Ltd. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
watchdog: watchdog@88888888 {
9+
compatible = "xlnx,xps-timebase-wdt-1.00.a";
10+
reg = <0x88888888 0x10000>;
11+
clocks = <&sysclk>;
12+
xlnx,wdt-interval = <31>;
13+
xlnx,wdt-enable-once = <1>;
14+
};
15+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_TEST=y
2+
CONFIG_TEST_USERSPACE=y
3+
CONFIG_WATCHDOG=y
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright © 2023 Calian Ltd. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
void main(void)
8+
{
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
common:
2+
build_only: true
3+
tags: drivers watchdog
4+
tests:
5+
drivers.watchdog.build:
6+
# will cover drivers without in-tree boards
7+
platform_allow: qemu_cortex_m3
8+
tags: wdt_xilinx_axi
9+
extra_args: "CONFIG_WATCHDOG=y"

0 commit comments

Comments
 (0)