Skip to content

Commit 8fb29d9

Browse files
authored
Merge pull request #10846 from tannewt/zephyr_gpio_input_test
Add input testing based on perfetto traces
2 parents 64afc2c + 5a49c52 commit 8fb29d9

37 files changed

+1217
-176
lines changed

ports/zephyr-cp/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
- The files (not folders) in `boards/` directory are used by Zephyr.
44
- To flash it on a board do `make BOARD=<vendor>_<board_name> flash`.
55
- Zephyr board docs are at `zephyr/boards/<vendor>/<board_name>`.
6+
- Run zephyr-cp tests with `make test`.

ports/zephyr-cp/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ if(CONFIG_BOARD_NATIVE_SIM)
1010
target_sources(app PRIVATE native_sim_i2c_emul_control.c)
1111
endif()
1212

13+
if(CONFIG_TRACING_PERFETTO)
14+
zephyr_include_directories(${ZEPHYR_BINARY_DIR}/subsys/tracing/perfetto/proto)
15+
endif()
16+
1317
# From: https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/application_development/external_lib/CMakeLists.txt
1418
# The external static library that we are linking with does not know
1519
# how to build for this platform so we export all the flags used in

ports/zephyr-cp/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ BUILD ?= build-$(BOARD)
88

99
TRANSLATION ?= en_US
1010

11+
.DEFAULT_GOAL := $(BUILD)/zephyr-cp/zephyr/zephyr.elf
12+
1113
.PHONY: $(BUILD)/zephyr-cp/zephyr/zephyr.elf flash recover debug run run-sim clean menuconfig all clean-all test fetch-port-submodules
1214

1315
$(BUILD)/zephyr-cp/zephyr/zephyr.elf:
@@ -23,6 +25,9 @@ $(BUILD)/firmware.hex: $(BUILD)/zephyr-cp/zephyr/zephyr.elf
2325
$(BUILD)/firmware.exe: $(BUILD)/zephyr-cp/zephyr/zephyr.elf
2426
cp $(BUILD)/zephyr-cp/zephyr/zephyr.exe $@
2527

28+
$(BUILD)/firmware.uf2: $(BUILD)/zephyr-cp/zephyr/zephyr.elf
29+
cp $(BUILD)/zephyr-cp/zephyr/zephyr.uf2 $@
30+
2631
flash: $(BUILD)/zephyr-cp/zephyr/zephyr.elf
2732
west flash -d $(BUILD)
2833

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# This file is autogenerated when a board is built. Do not edit. Do commit it to git. Other scripts use its info.
2+
name = "Adafruit Industries LLC Feather nRF52840 (Express, Sense)"
3+
4+
[modules]
5+
__future__ = true
6+
_bleio = false
7+
_eve = false
8+
_pew = false
9+
_pixelmap = false
10+
_stage = false
11+
adafruit_bus_device = false
12+
adafruit_pixelbuf = false
13+
aesio = false
14+
alarm = false
15+
analogbufio = false
16+
analogio = false
17+
atexit = false
18+
audiobusio = false
19+
audiocore = false
20+
audiodelays = false
21+
audiofilters = false
22+
audiofreeverb = false
23+
audioio = false
24+
audiomixer = false
25+
audiomp3 = false
26+
audiopwmio = false
27+
aurora_epaper = false
28+
bitbangio = false
29+
bitmapfilter = true # Zephyr board has busio
30+
bitmaptools = true # Zephyr board has busio
31+
bitops = false
32+
board = false
33+
busdisplay = true # Zephyr board has busio
34+
busio = true # Zephyr board has busio
35+
camera = false
36+
canio = false
37+
codeop = false
38+
countio = false
39+
digitalio = true
40+
displayio = true # Zephyr board has busio
41+
dotclockframebuffer = false
42+
dualbank = false
43+
epaperdisplay = true # Zephyr board has busio
44+
floppyio = false
45+
fontio = true # Zephyr board has busio
46+
fourwire = true # Zephyr board has busio
47+
framebufferio = true # Zephyr board has busio
48+
frequencyio = false
49+
getpass = false
50+
gifio = false
51+
gnss = false
52+
hashlib = false
53+
hostnetwork = false
54+
i2cdisplaybus = true # Zephyr board has busio
55+
i2cioexpander = false
56+
i2ctarget = false
57+
imagecapture = false
58+
ipaddress = false
59+
is31fl3741 = false
60+
jpegio = false
61+
keypad = false
62+
keypad_demux = false
63+
locale = false
64+
lvfontio = true # Zephyr board has busio
65+
math = false
66+
max3421e = false
67+
mdns = false
68+
memorymap = false
69+
memorymonitor = false
70+
microcontroller = true
71+
mipidsi = false
72+
msgpack = false
73+
neopixel_write = false
74+
nvm = false
75+
onewireio = false
76+
os = true
77+
paralleldisplaybus = false
78+
ps2io = false
79+
pulseio = false
80+
pwmio = false
81+
qrio = false
82+
rainbowio = true
83+
random = true
84+
rclcpy = false
85+
rgbmatrix = false
86+
rotaryio = true # Zephyr board has rotaryio
87+
rtc = false
88+
sdcardio = true # Zephyr board has busio
89+
sdioio = false
90+
sharpdisplay = true # Zephyr board has busio
91+
socketpool = false
92+
spitarget = false
93+
ssl = false
94+
storage = true # Zephyr board has flash
95+
struct = true
96+
supervisor = true
97+
synthio = false
98+
terminalio = true # Zephyr board has busio
99+
tilepalettemapper = true # Zephyr board has busio
100+
time = true
101+
touchio = false
102+
traceback = true
103+
uheap = false
104+
usb = false
105+
usb_cdc = true
106+
usb_hid = false
107+
usb_host = false
108+
usb_midi = false
109+
usb_video = false
110+
ustack = false
111+
vectorio = true # Zephyr board has busio
112+
warnings = true
113+
watchdog = false
114+
wifi = false
115+
zephyr_kernel = false
116+
zlib = false
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CIRCUITPY_BUILD_EXTENSIONS = ["elf", "uf2"]
2+
USB_VID=0x239A
3+
USB_PID=0x802A
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CONFIG_BT=y
2+
CONFIG_BT_PERIPHERAL=y
3+
CONFIG_BT_CENTRAL=y
4+
CONFIG_BT_BROADCASTER=y
5+
CONFIG_BT_OBSERVER=y
6+
CONFIG_BT_EXT_ADV=y
7+
8+
CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n
9+
CONFIG_BOARD_REQUIRES_SERIAL_BACKEND_CDC_ACM=n
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/ {
2+
chosen {
3+
zephyr,console = &uart0;
4+
zephyr,shell-uart = &uart0;
5+
zephyr,uart-mcumgr = &uart0;
6+
zephyr,bt-mon-uart = &uart0;
7+
zephyr,bt-c2h-uart = &uart0;
8+
};
9+
};
10+
11+
&zephyr_udc0 {
12+
/delete-node/ board_cdc_acm_uart;
13+
};
14+
15+
16+
&gd25q16 {
17+
/delete-node/ partitions;
18+
};
19+
20+
&uart0 {
21+
status = "okay";
22+
};
23+
24+
#include "../app.overlay"

ports/zephyr-cp/boards/board_aliases.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
set(pca10056_BOARD_ALIAS nrf52840dk/nrf52840)
2+
set(adafruit_feather_nrf52840_zephyr_BOARD_ALIAS adafruit_feather_nrf52840/nrf52840/uf2)
23
set(renesas_ek_ra6m5_BOARD_ALIAS ek_ra6m5)
34
set(renesas_ek_ra8d1_BOARD_ALIAS ek_ra8d1)
45
set(renesas_da14695_dk_usb_BOARD_ALIAS da14695_dk_usb)

ports/zephyr-cp/boards/native/native_sim/autogen_board_info.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ rainbowio = true
8383
random = true
8484
rclcpy = false
8585
rgbmatrix = false
86-
rotaryio = false
86+
rotaryio = true # Zephyr board has rotaryio
8787
rtc = false
8888
sdcardio = true # Zephyr board has busio
8989
sdioio = false

ports/zephyr-cp/boards/native/nrf5340bsim/autogen_board_info.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ rainbowio = true
8383
random = true
8484
rclcpy = false
8585
rgbmatrix = false
86-
rotaryio = false
86+
rotaryio = true # Zephyr board has rotaryio
8787
rtc = false
8888
sdcardio = true # Zephyr board has busio
8989
sdioio = false

0 commit comments

Comments
 (0)