File tree Expand file tree Collapse file tree 6 files changed +96
-0
lines changed
tests/drivers/build_all/flash Expand file tree Collapse file tree 6 files changed +96
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2024 TOKITA Hiroshi
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ cmake_minimum_required (VERSION 3.20.0 )
5
+ find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
6
+ project (build_all )
7
+
8
+ target_sources (app PRIVATE src/main.c )
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024 TOKITA Hiroshi
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ / {
7
+ test {
8
+ #address-cells = <1>;
9
+ #size-cells = <1>;
10
+
11
+ test_gpio: gpio@deadbeef {
12
+ compatible = "vnd,gpio";
13
+ gpio-controller;
14
+ reg = <0xdeadbeef 0x1000>;
15
+ #gpio-cells = <0x2>;
16
+ status = "okay";
17
+ };
18
+
19
+ test_spi: spi@33334444 {
20
+ #address-cells = <1>;
21
+ #size-cells = <0>;
22
+ compatible = "vnd,spi";
23
+ reg = <0x33334444 0x1000>;
24
+ status = "okay";
25
+ clock-frequency = <2000000>;
26
+
27
+ /* one entry for every devices at spi.dtsi */
28
+ cs-gpios = <&test_gpio 0 0>,
29
+ <&test_gpio 0 0>,
30
+ <&test_gpio 0 0>,
31
+ <&test_gpio 0 0>,
32
+ <&test_gpio 0 0>;
33
+
34
+ #include "spi.dtsi"
35
+ };
36
+ };
37
+ };
Original file line number Diff line number Diff line change
1
+ CONFIG_FLASH=y
2
+ CONFIG_GPIO=y
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024 TOKITA Hiroshi
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ at45@0 {
7
+ compatible = "atmel,at45";
8
+ reg = <0x0>;
9
+ status = "okay";
10
+ spi-max-frequency = <5000000>;
11
+ jedec-id = [00 11 22];
12
+ size = <1048576>;
13
+ sector-size = <1>;
14
+ sector-0a-pages = <1>;
15
+ block-size = <1>;
16
+ page-size = <1>;
17
+ };
18
+
19
+ spi-nor@1 {
20
+ compatible = "jedec,spi-nor";
21
+ reg = <0x1>;
22
+ status = "okay";
23
+ spi-max-frequency = <5000000>;
24
+ size = <1048576>;
25
+ jedec-id = [00 11 22];
26
+ };
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024 TOKITA Hiroshi
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ /* It is okay if main() is not included since just checking the build. */
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2024 TOKITA hiroshi
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ common :
5
+ build_only : true
6
+ tags :
7
+ - drivers
8
+ - flash
9
+ tests :
10
+ drivers.flash.build :
11
+ platform_allow :
12
+ - native_sim
13
+ drivers.flash.emul.build :
14
+ platform_allow :
15
+ - native_sim
16
+ extra_configs :
17
+ - CONFIG_EMUL=y
You can’t perform that action at this time.
0 commit comments