Skip to content

Commit 83510b1

Browse files
committed
Add input testing based on perfetto traces
Tests digital input and new rotaryio.
1 parent a7df997 commit 83510b1

37 files changed

+1215
-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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ BUILD ?= build-$(BOARD)
88

99
TRANSLATION ?= en_US
1010

11+
.DEFAULT_GOAL := $(BUILD)/zephyr-cp/zephyr/zephyr.elf
1112

1213
.PHONY: $(BUILD)/zephyr-cp/zephyr/zephyr.elf flash recover debug run clean menuconfig all clean-all test fetch-port-submodules
1314

@@ -24,6 +25,9 @@ $(BUILD)/firmware.hex: $(BUILD)/zephyr-cp/zephyr/zephyr.elf
2425
$(BUILD)/firmware.exe: $(BUILD)/zephyr-cp/zephyr/zephyr.elf
2526
cp $(BUILD)/zephyr-cp/zephyr/zephyr.exe $@
2627

28+
$(BUILD)/firmware.uf2: $(BUILD)/zephyr-cp/zephyr/zephyr.elf
29+
cp $(BUILD)/zephyr-cp/zephyr/zephyr.uf2 $@
30+
2731
flash: $(BUILD)/zephyr-cp/zephyr/zephyr.elf
2832
west flash -d $(BUILD)
2933

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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+
i2cdisplaybus = true # Zephyr board has busio
54+
i2cioexpander = false
55+
i2ctarget = false
56+
imagecapture = false
57+
ipaddress = false
58+
is31fl3741 = false
59+
jpegio = false
60+
keypad = false
61+
keypad_demux = false
62+
locale = false
63+
lvfontio = true # Zephyr board has busio
64+
math = false
65+
max3421e = false
66+
mdns = false
67+
memorymap = false
68+
memorymonitor = false
69+
microcontroller = true
70+
mipidsi = false
71+
msgpack = false
72+
neopixel_write = false
73+
nvm = false
74+
onewireio = false
75+
os = true
76+
paralleldisplaybus = false
77+
ps2io = false
78+
pulseio = false
79+
pwmio = false
80+
qrio = false
81+
rainbowio = true
82+
random = true
83+
rclcpy = false
84+
rgbmatrix = false
85+
rotaryio = true # Zephyr board has rotaryio
86+
rtc = false
87+
sdcardio = true # Zephyr board has busio
88+
sdioio = false
89+
sharpdisplay = true # Zephyr board has busio
90+
socketpool = false
91+
spitarget = false
92+
ssl = false
93+
storage = true # Zephyr board has flash
94+
struct = true
95+
supervisor = true
96+
synthio = false
97+
terminalio = true # Zephyr board has busio
98+
tilepalettemapper = true # Zephyr board has busio
99+
time = true
100+
touchio = false
101+
traceback = true
102+
uheap = false
103+
usb = false
104+
usb_cdc = true
105+
usb_hid = false
106+
usb_host = false
107+
usb_midi = false
108+
usb_video = false
109+
ustack = false
110+
vectorio = true # Zephyr board has busio
111+
warnings = true
112+
watchdog = false
113+
wifi = false
114+
zephyr_kernel = false
115+
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
@@ -82,7 +82,7 @@ rainbowio = true
8282
random = true
8383
rclcpy = false
8484
rgbmatrix = false
85-
rotaryio = false
85+
rotaryio = true # Zephyr board has rotaryio
8686
rtc = false
8787
sdcardio = true # Zephyr board has busio
8888
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
@@ -82,7 +82,7 @@ rainbowio = true
8282
random = true
8383
rclcpy = false
8484
rgbmatrix = false
85-
rotaryio = false
85+
rotaryio = true # Zephyr board has rotaryio
8686
rtc = false
8787
sdcardio = true # Zephyr board has busio
8888
sdioio = false

0 commit comments

Comments
 (0)