Skip to content

Commit af0dd77

Browse files
committed
Merge remote-tracking branch 'origin/default' into feature/integrate-bacnet-settings-into-samples
2 parents 1c97d20 + 78b993f commit af0dd77

File tree

11 files changed

+321
-32
lines changed

11 files changed

+321
-32
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: Zephyr OS BACnet Sample Builds
2+
# For Zephyr 3.7 LTS, use the v0.26-branch
3+
# or the latest v0.26.x release Docker image.
4+
# Docker image was built on Ubuntu 22.04
5+
6+
on:
7+
push:
8+
branches: [ "default" ]
9+
pull_request:
10+
branches:
11+
- '*'
12+
workflow_dispatch:
13+
14+
jobs:
15+
sample-hello-world:
16+
name: Build Hello BACnet Stack
17+
runs-on: ubuntu-22.04
18+
container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch
19+
env:
20+
CMAKE_PREFIX_PATH: /opt/toolchains
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
path: bacnet
26+
- name: Initialize
27+
working-directory: bacnet
28+
run: |
29+
west init -l .
30+
west update
31+
- name: Samples - Hello World
32+
working-directory: bacnet
33+
run: |
34+
pwd
35+
west build -p always -b native_posix ./zephyr/samples/hello_bacnet_stack
36+
- name: Archive Firmware
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: hello_bacnet_stack
40+
path: bacnet/build
41+
42+
sample-bacnet-profile-b-ss:
43+
name: Build BACnet Sample Profile B-SS
44+
runs-on: ubuntu-22.04
45+
container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch
46+
env:
47+
CMAKE_PREFIX_PATH: /opt/toolchains
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
with:
52+
path: bacnet
53+
- name: Initialize
54+
working-directory: bacnet
55+
run: |
56+
west init -l .
57+
west update
58+
- name: Sample - BACnet Profile B-SS
59+
working-directory: bacnet
60+
run: |
61+
pwd
62+
west build -b nucleo_f429zi -p always ./zephyr/samples/profiles/b-ss
63+
- name: Archive Firmware
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: b-ss
67+
path: bacnet/build
68+
69+
sample-bacnet-profile-b-sa:
70+
name: Build BACnet Sample Profile B-SA
71+
runs-on: ubuntu-22.04
72+
container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch
73+
env:
74+
CMAKE_PREFIX_PATH: /opt/toolchains
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
with:
79+
path: bacnet
80+
- name: Initialize
81+
working-directory: bacnet
82+
run: |
83+
west init -l .
84+
west update
85+
- name: Sample - BACnet Profile B-SA
86+
working-directory: bacnet
87+
run: |
88+
pwd
89+
west build -b nucleo_f429zi -p always ./zephyr/samples/profiles/b-sa
90+
- name: Archive Firmware
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: b-sa
94+
path: bacnet/build
95+
96+
sample-bacnet-profile-b-ld:
97+
name: Build BACnet Sample Profile B-LD
98+
runs-on: ubuntu-22.04
99+
container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch
100+
env:
101+
CMAKE_PREFIX_PATH: /opt/toolchains
102+
steps:
103+
- name: Checkout
104+
uses: actions/checkout@v4
105+
with:
106+
path: bacnet
107+
- name: Initialize
108+
working-directory: bacnet
109+
run: |
110+
west init -l .
111+
west update
112+
- name: Sample - BACnet Profile B-LD
113+
working-directory: bacnet
114+
run: |
115+
pwd
116+
west build -b nucleo_f429zi -p always ./zephyr/samples/profiles/b-ld
117+
- name: Archive Firmware
118+
uses: actions/upload-artifact@v4
119+
with:
120+
name: b-ld
121+
path: bacnet/build
122+
123+
sample-bacnet-profile-b-ls:
124+
name: Build BACnet Sample Profile B-LS
125+
runs-on: ubuntu-22.04
126+
container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch
127+
env:
128+
CMAKE_PREFIX_PATH: /opt/toolchains
129+
steps:
130+
- name: Checkout
131+
uses: actions/checkout@v4
132+
with:
133+
path: bacnet
134+
- name: Initialize
135+
working-directory: bacnet
136+
run: |
137+
west init -l .
138+
west update
139+
- name: Sample - BACnet Profile B-LS
140+
working-directory: bacnet
141+
run: |
142+
pwd
143+
west build -b nucleo_f429zi -p always ./zephyr/samples/profiles/b-ls
144+
- name: Archive Firmware
145+
uses: actions/upload-artifact@v4
146+
with:
147+
name: b-ls
148+
path: bacnet/build

.github/workflows/zephyr.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,32 @@
1-
name: Zephyr OS CMake
2-
1+
name: Zephyr OS Tests
2+
# For Zephyr 3.7 LTS, use the v0.26-branch
3+
# or the latest v0.26.x release Docker image.
4+
# Docker image was built on Ubuntu 22.04
35
on:
46
push:
57
branches: [ "default" ]
68
pull_request:
79
branches:
810
- '*'
11+
workflow_dispatch:
912

1013
jobs:
11-
build:
12-
runs-on: ubuntu-latest
13-
container: zephyrprojectrtos/ci:latest
14+
test:
15+
name: Twister Tests
16+
runs-on: ubuntu-22.04
17+
container: ghcr.io/zephyrproject-rtos/ci:v0.26-branch
1418
env:
1519
CMAKE_PREFIX_PATH: /opt/toolchains
1620
steps:
1721
- name: Checkout
1822
uses: actions/checkout@v4
1923
with:
2024
path: bacnet
21-
2225
- name: Initialize
2326
working-directory: bacnet
2427
run: |
2528
west init -l .
2629
west update
27-
28-
- name: Samples - Hello World
29-
working-directory: bacnet
30-
run: |
31-
pwd
32-
west build -p always -b native_posix ./zephyr/samples/hello_bacnet_stack
33-
34-
- name: Samples - BACnet Profile B-SS
35-
working-directory: bacnet
36-
run: |
37-
pwd
38-
west build -b nucleo_f429zi -p always ./zephyr/samples/profiles/b-ss
39-
40-
- name: Archive Firmware
41-
uses: actions/upload-artifact@v4
42-
with:
43-
name: firmware
44-
path: bacnet/build
45-
4630
- name: Twister Tests unit_testing
4731
working-directory: bacnet
4832
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Mkfile.old
5555
dkms.conf
5656

5757
# Zephyr OS
58+
build
5859
outdir
5960
outdir-*
6061
scripts/basic/fixdep

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ testing to produce robust C code.
1515

1616
[![Actions Status](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr.yml/badge.svg)](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr.yml) GitHub Workflow: BACnet Stack Zephyr Twister Unit Tests
1717

18+
[![Actions Status](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr-samples.yml/badge.svg)](https://github.com/bacnet-stack/bacnet-stack-zephyr/actions/workflows/zephyr-samples.yml) GitHub Workflow: BACnet Stack Samples Built
19+
20+
[![Actions Status](https://github.com/bacnet-stack/bacnet-stack-zephyr/workflows/CodeQL/badge.svg)](https://github.com/bacnet-stack-zephyr/bacnet-stack/actions/workflows/codeql-analysis.yml) GitHub Workflow: CodeQL Analysis
21+
1822
# What the code does
1923

2024
The Zephyr OS integration offers a collection of samples in the zephyr/samples

zephyr/samples/profiles/b-ld/README.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,25 @@ Compile this sample for the `rpi_pico` board:
5252
Compile this sample for the `adafruit_grand_central_m4_express` board with
5353

5454
west build -b adafruit_grand_central_m4_express -p always bacnet/zephyr/samples/profiles/b-ld/
55+
56+
Using the Shell
57+
***************
58+
59+
The shell is available on some boards via virtual communication port:
60+
61+
picocom --baud 115200 /dev/ttyACM0
62+
63+
Terminal ready
64+
*** Booting Zephyr OS build v3.7.0 ***
65+
[00:00:00.012,000] <inf> bacnet: BACnet Device: BACnet Lighting Device (B-LD)
66+
[00:00:00.012,000] <inf> bacnet: BACnet Stack Version 1.4.1
67+
[00:00:00.012,000] <inf> bacnet: BACnet Stack Max APDU: 1476
68+
uart:~$
69+
bacnet clear device devmem help history kernel net
70+
rem resize retval shell stats
71+
uart:~$ bacnet objects
72+
{"object-list": [
73+
{"object-identifier":{"device":4194303}},
74+
{"object-identifier":{"network-port":0}},
75+
{"object-identifier":{"lighting-output":1}}],
76+
"object-list-size": 3}

zephyr/samples/profiles/b-ls/README.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,29 @@ Compile this sample for the `rpi_pico` board:
5858

5959
Compile this sample for the `adafruit_grand_central_m4_express` board with
6060

61-
west build -b adafruit_grand_central_m4_express -p always bacnet/zephyr/samples/profiles/b-ld/
61+
west build -b adafruit_grand_central_m4_express -p always bacnet/zephyr/samples/profiles/b-ls/
62+
63+
Using the Shell
64+
***************
65+
66+
The shell is available on some boards via virtual communication port:
67+
68+
picocom --baud 115200 /dev/ttyACM0
69+
70+
Terminal ready
71+
*** Booting Zephyr OS build v3.7.0 ***
72+
[00:00:00.012,000] <inf> bacnet: BACnet Device: BACnet Lighting Supervisor (B-LS)
73+
[00:00:00.012,000] <inf> bacnet: BACnet Stack Version 1.4.1
74+
[00:00:00.012,000] <inf> bacnet: BACnet Stack Max APDU: 1476
75+
uart:~$
76+
bacnet clear device devmem help history kernel net
77+
rem resize retval shell stats
78+
uart:~$ bacnet objects
79+
{"object-list": [
80+
{"object-identifier":{"device":260126}},
81+
{"object-identifier":{"network-port":0}},
82+
{"object-identifier":{"lighting-output":1}},
83+
{"object-identifier":{"channel":1}},
84+
{"object-identifier":{"binary-lighting-output":1}}],
85+
"object-list-size": 5}
86+

zephyr/samples/profiles/b-sa/README.rst

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,26 @@ Compile this sample for the `rpi_pico` board:
3333

3434
Compile this sample for the `adafruit_grand_central_m4_express` board with
3535

36-
west build -b adafruit_grand_central_m4_express -p always bacnet/zephyr/samples/profiles/b-ld/
36+
west build -b adafruit_grand_central_m4_express -p always bacnet/zephyr/samples/profiles/b-sa/
37+
38+
Using the Shell
39+
***************
40+
41+
The shell is available on some boards via virtual communication port:
42+
43+
picocom --baud 115200 /dev/ttyACM0
44+
45+
Terminal ready
46+
*** Booting Zephyr OS build v3.7.0 ***
47+
[00:00:00.012,000] <inf> bacnet: BACnet Device: BACnet Smart Actuator (B-SA)
48+
[00:00:00.012,000] <inf> bacnet: BACnet Stack Version 1.4.1
49+
[00:00:00.012,000] <inf> bacnet: BACnet Stack Max APDU: 1476
50+
uart:~$
51+
bacnet clear device devmem help history kernel net
52+
rem resize retval shell stats
53+
uart:~$ bacnet objects
54+
{"object-list": [
55+
{"object-identifier":{"device":260124}},
56+
{"object-identifier":{"analog-output":1}},
57+
{"object-identifier":{"network-port":0}}],
58+
"object-list-size": 3}

zephyr/samples/profiles/b-ss/README.rst

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,26 @@ Compile this sample for the `rpi_pico` board:
3333

3434
Compile this sample for the `adafruit_grand_central_m4_express` board with
3535

36-
west build -b adafruit_grand_central_m4_express -p always bacnet/zephyr/samples/profiles/b-ld/
36+
west build -b adafruit_grand_central_m4_express -p always bacnet/zephyr/samples/profiles/b-ss/
37+
38+
Using the Shell
39+
***************
40+
41+
The shell is available on some boards via virtual communication port:
42+
43+
picocom --baud 115200 /dev/ttyACM0
44+
45+
Terminal ready
46+
*** Booting Zephyr OS build v3.7.0 ***
47+
[00:00:00.012,000] <inf> bacnet: BACnet Device: BACnet Smart Sensor (B-SS)
48+
[00:00:00.012,000] <inf> bacnet: BACnet Stack Version 1.4.1
49+
[00:00:00.012,000] <inf> bacnet: BACnet Stack Max APDU: 1476
50+
uart:~$
51+
bacnet clear device devmem help history kernel net
52+
rem resize retval shell stats
53+
uart:~$ bacnet objects
54+
{"object-list": [
55+
{"object-identifier":{"device":4194303}},
56+
{"object-identifier":{"analog-input":1}},
57+
{"object-identifier":{"network-port":0}}],
58+
"object-list-size": 3}

0 commit comments

Comments
 (0)