Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 45 additions & 44 deletions .github/workflows/ci.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,71 +1,72 @@
name: CI

on:
workflow_dispatch:
inputs:
name:
description: "Manual trigger"
pull_request:
branches:
- '**'
branches: ["rolling", "jazzy", "humble"]

jobs:

micro_ros_zephyr_module:
runs-on: ubuntu-latest
container: ubuntu:22.04
strategy:
fail-fast: false
matrix:
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"]
include:
- zephyr_version: zephyr-v2.7.2
zephyr_sdk: 0.14.2
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz
- zephyr_version: zephyr-v3.1.0
zephyr_sdk: 0.14.2
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz
zephyr_version: ["v4.0.0", "v4.1.0"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
path: micro_ros_zephyr_module

- name: Build
shell: bash
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo docker image prune --all --force

- name: Create build script
run: |
# Install dependencies
apt update
export DEBIAN_FRONTEND=noninteractive
apt install -y --no-install-recommends wget git cmake ninja-build gperf \
ccache dfu-util device-tree-compiler wget \
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
make gcc gcc-multilib g++-multilib libsdl2-dev
cat << 'EOF' > build.sh
#!/bin/bash
set -e

# Install Zephyr environment
pip3 install --user -U west
export PATH=~/.local/bin:/github/home/.local/bin:"$PATH"
west init zephyrproject
cd zephyrproject
# Zephyr setup
apt -y update
west init
cd zephyr
git checkout ${{ matrix.zephyr_version }}
cd ..
west update
west zephyr-export
pip3 install --user -r zephyr/scripts/requirements.txt
cd ..
export TOOLCHAIN_VERSION=${{ matrix.zephyr_sdk }}
export TOOLCHAIN_FILE_NAME=${{ matrix.sdk_filename }}
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$TOOLCHAIN_VERSION/$TOOLCHAIN_FILE_NAME
tar xvf $TOOLCHAIN_FILE_NAME
cd zephyr-sdk-$TOOLCHAIN_VERSION
./setup.sh -h -t arm-zephyr-eabi -c
git checkout $ZEPHYR_VERSION
cd ..
source zephyr-sdk-$TOOLCHAIN_VERSION/environment-setup-x86_64-pokysdk-linux
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=$(pwd)/zephyr-sdk-$TOOLCHAIN_VERSION
source zephyrproject/zephyr/zephyr-env.sh
west update --narrow

# Installing micro-ROS prerequisites
pip3 install catkin_pkg lark-parser empy colcon-common-extensions

if [[ "$REF_NAME" == "humble" ]] || [[ "$HEAD_REF" == *"humble"* ]]; then
# Use empy version 3.3.4 for Humble
pip3 install empy==3.3.4
fi

# Build with Serial USB transport
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y
west build -b disco_l475_iot1 /github/workspace/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y

# Build with Serial transport
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y
west build -b disco_l475_iot1 /github/workspace/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y
EOF
chmod +x build.sh

- name: Build
run: |
sudo docker run --rm \
--user root \
-v ${{ github.workspace }}:/github/workspace \
-w /github/workspace \
-e CMAKE_PREFIX_PATH=/opt/toolchains \
-e ZEPHYR_VERSION=${{ matrix.zephyr_version }} \
-e REF_NAME=${{ github.ref_name }} \
-e HEAD_REF=${{ github.head_ref }} \
zephyrprojectrtos/ci:v0.26.17 \
/github/workspace/build.sh
90 changes: 44 additions & 46 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,73 +10,71 @@ on:

jobs:

micro_ros_zephyr_module:
nightly_micro_ros_zephyr_module:
runs-on: ubuntu-latest
container: ubuntu:22.04
strategy:
fail-fast: false
matrix:
zephyr_version: ["zephyr-v3.1.0", "zephyr-v2.7.2"]
distro: ["iron", "humble", "rolling"]
zephyr_version: ["v4.0.0", "v4.1.0"]
distro: ["rolling", "jazzy", "humble"]
include:
- distro: iron
branch: iron
- distro: rolling
branch: rolling
- distro: jazzy
branch: jazzy
- distro: humble
branch: humble
- zephyr_version: zephyr-v2.7.2
zephyr_sdk: 0.14.2
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz
- zephyr_version: zephyr-v3.1.0
zephyr_sdk: 0.14.2
sdk_filename: zephyr-sdk-$TOOLCHAIN_VERSION\_linux-x86_64_minimal.tar.gz
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
path: micro_ros_zephyr_module
branch: ${{ matrix.branch }}
ref: ${{ matrix.branch }}

- name: Build
shell: bash
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo docker image prune --all --force

- name: Create build script
run: |
# Install dependencies
apt update
export DEBIAN_FRONTEND=noninteractive
apt install -y --no-install-recommends wget git cmake ninja-build gperf \
ccache dfu-util device-tree-compiler wget \
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
make gcc gcc-multilib g++-multilib libsdl2-dev
cat << 'EOF' > build.sh
#!/bin/bash
set -e

# Install Zephyr environment
pip3 install --user -U west
export PATH=~/.local/bin:/github/home/.local/bin:"$PATH"
west init zephyrproject
cd zephyrproject
# Zephyr setup
apt -y update
west init
cd zephyr
git checkout ${{ matrix.zephyr_version }}
cd ..
west update
west zephyr-export
pip3 install --user -r zephyr/scripts/requirements.txt
cd ..
export TOOLCHAIN_VERSION=${{ matrix.zephyr_sdk }}
export TOOLCHAIN_FILE_NAME=${{ matrix.sdk_filename }}
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v$TOOLCHAIN_VERSION/$TOOLCHAIN_FILE_NAME
tar xvf $TOOLCHAIN_FILE_NAME
cd zephyr-sdk-$TOOLCHAIN_VERSION
./setup.sh -h -t arm-zephyr-eabi -c
git checkout $ZEPHYR_VERSION
cd ..
source zephyr-sdk-$TOOLCHAIN_VERSION/environment-setup-x86_64-pokysdk-linux
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=$(pwd)/zephyr-sdk-$TOOLCHAIN_VERSION
source zephyrproject/zephyr/zephyr-env.sh
west update --narrow

# Installing micro-ROS prerequisites
pip3 install catkin_pkg lark-parser empy colcon-common-extensions

if [[ "$BRANCH_NAME" == "humble" ]]; then
# Use empy version 3.3.4 for Humble
pip3 install empy==3.3.4
fi

# Build with Serial USB transport
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y
west build -b disco_l475_iot1 /github/workspace/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL_USB=y

# Build with Serial transport
west build -b disco_l475_iot1 micro_ros_zephyr_module -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y
west build -b disco_l475_iot1 /github/workspace/micro_ros_zephyr_module -p -- -DCONFIG_MICROROS_TRANSPORT_SERIAL=y
EOF
chmod +x build.sh

- name: Build
run: |
sudo docker run --rm \
--user root \
-v ${{ github.workspace }}:/github/workspace \
-w /github/workspace \
-e CMAKE_PREFIX_PATH=/opt/toolchains \
-e ZEPHYR_VERSION=${{ matrix.zephyr_version }} \
-e BRANCH_NAME=${{ matrix.branch }} \
zephyrprojectrtos/ci:v0.26.17 \
/github/workspace/build.sh
31 changes: 31 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@
Changelog for package micro_ros_zephyr
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

5.0.1 (2024-06-03)
------------------
* Bump jazzy (`#139 <https://github.com/micro-ROS/micro_ros_zephyr_module/issues/139>`_)
* Ignore lttngpy (`#135 <https://github.com/micro-ROS/micro_ros_zephyr_module/issues/135>`_)
* Fix of unknown Ringbuffer and not found USB-Serial Device (`#125 <https://github.com/micro-ROS/micro_ros_zephyr_module/issues/125>`_) (`#130 <https://github.com/micro-ROS/micro_ros_zephyr_module/issues/130>`_)
* Added Ringbuffer-config in prj.conf for eliminating error
* Added Label CDC_ACM_0 label with an overlay so "modules/libmicroros/microros_transports/serial-usb/microros_transports.c" can find the device
* Update app.overlay
* Update app.overlay
A fix for backwards compability
* Update app.overlay
* Update app.overlay
* Update prj.conf
* Better comments
* Changed settings to conditional from transport choice
* Update prj.conf
Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
* Update modules/libmicroros/Kconfig
Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
---------
Co-authored-by: scrapforge <rumpelcode@gmx.de>
Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit 7c5edcdf9e0a6c6e131d9e45ad357fa0757a5584)
Co-authored-by: scrapforge <99104728+scrapforge@users.noreply.github.com>
* Update CI with Serial USB build (`#126 <https://github.com/micro-ROS/micro_ros_zephyr_module/issues/126>`_) (`#128 <https://github.com/micro-ROS/micro_ros_zephyr_module/issues/128>`_)
(cherry picked from commit e1e23407664625c5cb145c791561007fe6d51df9)
Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
* Fix Nightly
* Remove micro-ROS fork (`#123 <https://github.com/micro-ROS/micro_ros_zephyr_module/issues/123>`_)
* Contributors: Antonio Cuadros, Pablo Garrido, mergify[bot]

5.0.0 (2023-06-12)
------------------
* Update branches to rolling (`#121 <https://github.com/micro-ROS/micro_ros_zephyr_module/issues/121>`_)
Expand Down
3 changes: 3 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
#
# Please keep the list sorted.

Aliensense
Kristina Kisiuk <kisyuk.kristina@gmail.com>

eProsima
Pablo Garrido <pablogarrido@eprosima.com>
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# micro-ROS module for Zephyr

This module has been tested in Zephyr RTOS v2.7.0 (SDK 0.14.2) and v3.1.0 (SDK 0.14.2).
This module has been tested in Zephyr RTOS v4.0.0 (SDK 0.16.9-rc3), and v4.1.0 (SDK 0.16.9-rc3), using a docker image based on `zephyrprojectrtos/zephyr-build:v0.26.17`.

## Dependencies

Expand All @@ -18,7 +18,7 @@ pip3 install catkin_pkg lark-parser empy colcon-common-extensions
For example for `disco_l475_iot1` board:

```bash
west build -b disco_l475_iot1 micro_ros_zephyr_module
west build -b disco_l475_iot1 -p
```

Some configuration parameters can be found using:
Expand All @@ -32,10 +32,10 @@ Is possible to use a micro-ROS Agent just with this docker command:

```bash
# Serial micro-ROS Agent
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:rolling serial --dev [YOUR BOARD PORT] -v6
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:jazzy serial --dev [YOUR BOARD PORT] -v6

# UDPv4 micro-ROS Agent
docker run -it --rm --net=host microros/micro-ros-agent:rolling udp4 --port 8888 -v6
docker run -it --rm --net=host microros/micro-ros-agent:jazzy udp4 --port 8888 -v6

```

Expand Down
4 changes: 1 addition & 3 deletions modules/libmicroros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ externalproject_add(libmicroros_project
BUILD_BYPRODUCTS ${MICROROS_DIR}/libmicroros.a
)

zephyr_library_import(libmicroros ${MICROROS_DIR}/libmicroros.a)
zephyr_link_libraries(${MICROROS_DIR}/libmicroros.a)

zephyr_interface_library_named(microros)
add_dependencies(microros libmicroros)
add_dependencies(microros libmicroros_project)
target_include_directories(microros INTERFACE ${MICROROS_DIR}/include)

Expand Down Expand Up @@ -96,7 +95,6 @@ zephyr_library_sources(

add_dependencies(microros microros_transports)
add_dependencies(microros_transports libmicroros_project)
add_dependencies(microros_transports libmicroros)

# Cleaning

Expand Down
Loading