Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync fork #1

Merged
merged 32 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a344305
Update yaml_filter.py (#365) (#367)
mergify[bot] Jul 26, 2021
ae44150
Support for flashing Olimex STM32-E407 with STLINK v2 debuggers (#374)
bhavesh-sr Aug 31, 2021
e88dc37
Update standalone build tools section (backport #380) (#382)
mergify[bot] Sep 2, 2021
65f5349
Simplify micro-ROS Agent build (#378) (#384)
mergify[bot] Sep 13, 2021
b2a741d
Update README.md (#386) (#387)
mergify[bot] Sep 13, 2021
9c5f0ba
Add renesas RA6M5 (backport #390) (#391)
mergify[bot] Sep 20, 2021
7a2aeaf
openocd: added script to reset devices (#399)
dayjaby Oct 18, 2021
423bd6f
fix: use FW_TARGETDIR instead of firmware (#400)
dayjaby Oct 19, 2021
2f041a4
Temporal disable Rolling Agent CI (backport #408) (#410)
mergify[bot] Nov 10, 2021
9bbc109
Remove unnecessary rosdep (#411) (#412)
mergify[bot] Nov 11, 2021
176d933
Fix rosdep (backport #414) (#415)
mergify[bot] Nov 11, 2021
90d3988
Modify host build (#418) (#421)
mergify[bot] Nov 12, 2021
4b1fb09
Skip existing repos in vcs (#419) (#423)
mergify[bot] Nov 12, 2021
e920c89
Fix host src folder (#417) (#425)
mergify[bot] Nov 15, 2021
3636e96
Build dynamic lib of rosidl_typesupport _microxrcedds (backport #473)…
mergify[bot] Mar 15, 2022
0182d8f
Fix Zephyr CI (backport #480) (#482)
mergify[bot] Mar 28, 2022
54922da
Update changelog
pablogs9 Mar 28, 2022
ade3271
1.0.0
pablogs9 Mar 28, 2022
9cfcb3a
Enable rolling agent (backport #479) (#484)
mergify[bot] Mar 30, 2022
4dd7c49
Fix CI
pablogs9 Mar 30, 2022
da5ac8b
Fix CI
pablogs9 Mar 30, 2022
fdeff43
Fix Agent and host Rolling CI (backport #486) (#487)
mergify[bot] Mar 30, 2022
4a2e82c
Fix CI upgrade ROS docker (#489)
pablogs9 Mar 31, 2022
6e9402a
Remove Python 3.9 (backport #496) (#497)
mergify[bot] Apr 12, 2022
e3842c3
Modified zephyr create.sh to pull correct toolchain based on arch (#4…
mergify[bot] Apr 18, 2022
9d0c433
Fix readme rosdep (#506) (#507)
mergify[bot] Apr 26, 2022
b7e2ada
Add platformIO to Readme (#510) (#511)
mergify[bot] Apr 27, 2022
74480f2
Add renesas dummy meta (#516) (#517)
mergify[bot] May 13, 2022
97d9e04
Fix PyYaml unistall error (#521)
Acuadros95 May 23, 2022
0c9b620
Update changelog
pablogs9 May 25, 2022
a32ab5e
1.1.0
pablogs9 May 25, 2022
ca776e0
Remove unnessary check (#553) (#567)
mergify[bot] Aug 16, 2022
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
apt install -y python3-colcon-metadata python3-pip
rosdep update --rosdistro $ROS_DISTRO
rosdep install -y --from-paths src --ignore-src -y
apt install -y ros-${ROS_DISTRO}-rmw-fastrtps-cpp

- uses: actions/download-artifact@v1
with:
Expand Down Expand Up @@ -192,6 +193,7 @@ jobs:
- name: Dependencies
run: |
apt update
apt upgrade -y
apt install -y python3-colcon-metadata python3-pip
rosdep update --rosdistro $ROS_DISTRO
rosdep install -y --from-paths src --ignore-src -y
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ jobs:
- name: Dependencies
run: |
apt update
apt upgrade -y
apt install -y python3-colcon-metadata python3-pip
rosdep update --rosdistro $ROS_DISTRO
rosdep install -y --from-paths src --ignore-src -y
Expand Down Expand Up @@ -364,6 +365,8 @@ jobs:
branch: foxy
- distro: rolling
branch: main
- distro: galactic
branch: galactic

needs: micro_ros_build
container: ros:${{ matrix.distro }}
Expand All @@ -380,6 +383,7 @@ jobs:
apt install -y python3-colcon-metadata python3-pip
rosdep update --rosdistro $ROS_DISTRO
rosdep install -y --from-paths src --ignore-src -y
apt install -y ros-${ROS_DISTRO}-rmw-fastrtps-cpp

- uses: actions/download-artifact@v1
with:
Expand All @@ -399,4 +403,4 @@ jobs:

- name: installation
run: |
(test -f install/micro_ros_agent/lib/micro_ros_agent/micro_ros_agent) && true || false
(test -f install/micro_ros_agent/lib/micro_ros_agent/micro_ros_agent) && true || false
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package micro_ros_setup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.1.0 (2022-05-25)
------------------
* Fix PyYaml unistall error (`#521 <https://github.com/micro-ROS/micro-ros-build/issues/521>`_)
* Add renesas dummy meta (`#516 <https://github.com/micro-ROS/micro-ros-build/issues/516>`_) (`#517 <https://github.com/micro-ROS/micro-ros-build/issues/517>`_)
* Add platformIO to Readme (`#510 <https://github.com/micro-ROS/micro-ros-build/issues/510>`_) (`#511 <https://github.com/micro-ROS/micro-ros-build/issues/511>`_)
* Fix readme rosdep (`#506 <https://github.com/micro-ROS/micro-ros-build/issues/506>`_) (`#507 <https://github.com/micro-ROS/micro-ros-build/issues/507>`_)
* Modified zephyr create.sh to pull correct toolchain based on arch (`#499 <https://github.com/micro-ROS/micro-ros-build/issues/499>`_) (`#501 <https://github.com/micro-ROS/micro-ros-build/issues/501>`_)
* Remove Python 3.9 (backport `#496 <https://github.com/micro-ROS/micro-ros-build/issues/496>`_) (`#497 <https://github.com/micro-ROS/micro-ros-build/issues/497>`_)
* Fix CI upgrade ROS docker (`#489 <https://github.com/micro-ROS/micro-ros-build/issues/489>`_)
* Fix Agent and host Rolling CI (backport `#486 <https://github.com/micro-ROS/micro-ros-build/issues/486>`_) (`#487 <https://github.com/micro-ROS/micro-ros-build/issues/487>`_)
* Fix CI

1.0.0 (2022-03-28)
------------------
* Initial release
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ install(
scripts/create_firmware_ws.sh
scripts/configure_firmware.sh
scripts/flash_firmware.sh
scripts/reset_firmware.sh
scripts/build_firmware.sh
scripts/build_agent.sh
scripts/yaml_filter.py
Expand Down
70 changes: 41 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
This ROS 2 package is the entry point for building micro-ROS apps for different embedded platforms.

- [Supported platforms](#supported-platforms)
- [Secondary build system tools](#secondary-build-system-tools)
- [Standalone build system tools](#standalone-build-system-tools)
- [Dependencies](#dependencies)
- [Quick start](#quick-start)
- [Building](#building)
- [Creating micro-ROS firmware](#creating-micro-ros-firmware)
- [Configuring micro-ROS firmware](#configuring-micro-ros-firmware)
Expand All @@ -19,56 +20,67 @@ This ROS 2 package is the entry point for building micro-ROS apps for different

This package is the **official build system for micro-ROS**. It provides tools and utils to crosscompile micro-ROS with just the common ROS 2 tools for these platforms:

| RTOS | Platform | Version | Example |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------- | -------------------- | ---------------------------- |
| [Nuttx](https://nuttx.org/) | [Olimex STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware) | v7.29 | `nuttx olimex-stm32-e407` |
| [FreeRTOS](https://www.freertos.org/) | [Crazyflie 2.1](https://www.bitcraze.io/crazyflie-2-1/) | v10.2.1 - CF 2020.06 | `freertos crazyflie21` |
| [FreeRTOS](https://www.freertos.org/) | [Olimex STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware) | STM32CubeMX latest | `freertos olimex-stm32-e407` |
| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446RE](https://www.st.com/en/evaluation-tools/nucleo-f446re.html) <sup>1</sup> | STM32CubeMX latest | `freertos nucleo_f446re` |
| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446ZE](https://www.st.com/en/evaluation-tools/nucleo-f446ze.html) <sup>1</sup> | STM32CubeMX latest | `freertos nucleo_f446ze` |
| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F746ZG](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) <sup>1</sup> | STM32CubeMX latest | `freertos nucleo_f746zg` |
| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F767ZI](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) <sup>1</sup> | STM32CubeMX latest | `freertos nucleo_f767zi` |
| [FreeRTOS](https://www.freertos.org/) | [Espressif ESP32](https://www.espressif.com/en/products/socs/esp32/overview) | v8.2.0 | `freertos esp32` |
| [Zephyr](https://www.zephyrproject.org/) | [Olimex STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware) | v2.6.0 | `zephyr olimex-stm32-e407` |
| [Zephyr](https://www.zephyrproject.org/) | [ST B-L475E-IOT01A](https://docs.zephyrproject.org/latest/boards/arm/disco_l475_iot1/doc/index.html) | v2.6.0 | `zephyr discovery_l475_iot1` |
| [Zephyr](https://www.zephyrproject.org/) | [ST Nucleo H743ZI](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html) <sup>1</sup> | v2.6.0 | `zephyr nucleo_h743zi` |
| [Zephyr](https://www.zephyrproject.org/) | [Zephyr emulator](https://docs.zephyrproject.org/2.3.0/boards/posix/native_posix/doc/index.html) | v2.6.0 | `zephyr host` |
| - | Static library (.a) and headers (.h) <sup>3</sup> | - | `generate_lib` |
| Linux | *Host <sup>2</sup>* | Ubuntu 18.04/20.04 | `host` |
| RTOS | Platform | Version | Example |
| ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ---------------------------- |
| [Azure RTOS](https://azure.microsoft.com/es-es/services/rtos/) / [FreeRTOS](https://www.freertos.org/) / Bare metal | [Renesas RA6M5](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra6m5-200mhz-arm-cortex-m33-trustzone-highest-integration-ethernet-and-can-fde) | Renesas e<sup>2</sup> studio | `renesas_ra ra6m5` |
| [Nuttx](https://nuttx.org/) | [Olimex STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware) | v7.29 | `nuttx olimex-stm32-e407` |
| [FreeRTOS](https://www.freertos.org/) | [Crazyflie 2.1](https://www.bitcraze.io/crazyflie-2-1/) | v10.2.1 - CF 2020.06 | `freertos crazyflie21` |
| [FreeRTOS](https://www.freertos.org/) | [Olimex STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware) | STM32CubeMX latest | `freertos olimex-stm32-e407` |
| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446RE](https://www.st.com/en/evaluation-tools/nucleo-f446re.html) <sup>1</sup> | STM32CubeMX latest | `freertos nucleo_f446re` |
| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446ZE](https://www.st.com/en/evaluation-tools/nucleo-f446ze.html) <sup>1</sup> | STM32CubeMX latest | `freertos nucleo_f446ze` |
| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F746ZG](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) <sup>1</sup> | STM32CubeMX latest | `freertos nucleo_f746zg` |
| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F767ZI](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) <sup>1</sup> | STM32CubeMX latest | `freertos nucleo_f767zi` |
| [FreeRTOS](https://www.freertos.org/) | [Espressif ESP32](https://www.espressif.com/en/products/socs/esp32/overview) | v8.2.0 | `freertos esp32` |
| [Zephyr](https://www.zephyrproject.org/) | [Olimex STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware) | v2.6.0 | `zephyr olimex-stm32-e407` |
| [Zephyr](https://www.zephyrproject.org/) | [ST B-L475E-IOT01A](https://docs.zephyrproject.org/latest/boards/arm/disco_l475_iot1/doc/index.html) | v2.6.0 | `zephyr discovery_l475_iot1` |
| [Zephyr](https://www.zephyrproject.org/) | [ST Nucleo H743ZI](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html) <sup>1</sup> | v2.6.0 | `zephyr nucleo_h743zi` |
| [Zephyr](https://www.zephyrproject.org/) | [Zephyr emulator](https://docs.zephyrproject.org/2.3.0/boards/posix/native_posix/doc/index.html) | v2.6.0 | `zephyr host` |
| - | Static library (.a) and headers (.h) <sup>3</sup> | - | `generate_lib` |
| Linux | *Host <sup>2</sup>* | Ubuntu 18.04/20.04 | `host` |

*<sup>1</sup> Community supported, may have lack of official support*

*<sup>2</sup> Support for compiling apps in a native Linux host for testing and debugging*

*<sup>3</sup> a valid CMake toolchain with custom crosscompilation definition is required*

Please note that NuttX with Olimex STM32-E407 board is the reference platform and not everything might be supported on other platforms.

## Secondary build system tools
## Standalone build system tools

micro-ROS also offers some other ways to crosscompile it for different platforms. These other options are secondary tools and may not have full support for all features. Currently micro-ROS is also available as:

- a standalone **[micro-ROS component for Renesas e<sup>2</sup> studio and RA6M5](https://github.com/micro-ROS/micro_ros_renesas2estudio_component)**: this package enables the integration of micro-ROS in Renesas e<sup>2</sup> studio and RA6M5 MCU family.
- a standalone **[micro-ROS component for ESP-IDF](https://github.com/micro-ROS/micro_ros_espidf_component)**: this package enables the integration of micro-ROS in any Espressif ESP32 IDF project.
- a standalone **[micro-ROS module for Zephyr RTOS](https://github.com/micro-ROS/micro_ros_zephyr_module)**: this package enables the integration of micro-ROS in any Zephyr RTOS workspace.
- a standalone **[micro-ROS module for Mbed RTOS](https://github.com/micro-ROS/micro_ros_mbed)**: this package enables the integration of micro-ROS in any Mbed RTOS workspace.
- a standalone **[micro-ROS module for NuttX RTOS](https://github.com/micro-ROS/micro_ros_nuttx_app)**: this package enables the integration of micro-ROS in any NuttX RTOS workspace.
- a standalone **[micro-ROS module for Microsoft Azure RTOS](https://github.com/micro-ROS/micro_ros_azure_rtos_app)**: this package enables the integration of micro-ROS in a Microsoft Azure RTOS workspace.
- a set of **[micro-ROS utils for STM32CubeMX and STM32CubeIDE](https://github.com/micro-ROS/micro_ros_stm32cubemx_utils)**: this package enables the integration of micro-ROS in STM32CubeMX and STM32CubeIDE.
- a library builder for **[PlatformIO](https://github.com/micro-ROS/micro_ros_platformio)**: this package enables the integration of micro-ROS in PlatformIO.
- a precompiled set of **[Arduino IDE libraries](https://github.com/micro-ROS/micro_ros_arduino)**: this package enables the integration of micro-ROS in the Arduino IDE for some hardware platforms.
- a precompiled set of **[Raspberry Pi Pico SDK libraries](https://github.com/micro-ROS/micro_ros_raspberrypi_pico_sdk)**: this package enables the integration of micro-ROS in the Raspberry Pi Pico SDK.

# Dependencies

This package targets the **ROS 2** installation. ROS 2 supported distributions are:

| ROS 2 Distro | State | Branch |
| ------------ | --------- | --------- |
| Crystal | Supported | `crystal` |
| Dashing | Supported | `dashing` |
| Foxy | Supported | `foxy` |
| ROS 2 Distro | State | Branch |
| ------------ | --------- | ---------- |
| Crystal | EOL | `crystal` |
| Dashing | EOL | `dashing` |
| Foxy | Supported | `foxy` |
| Galactic | Supported | `galactic` |
| Rolling | Supported | `main` |

Some other prerequisites needed for building a firmware using this package are:

```
sudo apt install python3-rosdep
```
# Quick start

Download [here](https://www.eprosima.com/index.php/downloads-all) the micro-ROS docker image that contains a pre-installed client and agent as well as some compiled examples.

# Building
# Building

Create a ROS 2 workspace and build this package for a given ROS 2 distro (see table above):

Expand All @@ -79,7 +91,7 @@ mkdir uros_ws && cd uros_ws

git clone -b $ROS_DISTRO https://github.com/micro-ROS/micro_ros_setup.git src/micro_ros_setup

rosdep update && rosdep install --from-path src --ignore-src -y
rosdep update && rosdep install --from-paths src --ignore-src -y

colcon build

Expand Down Expand Up @@ -180,7 +192,7 @@ This folder contains up to four scripts:
- `configure.sh`: modifies and configure parameters of the installed dependencies. This step is **optional**.
- `build.sh`: builds the firmware and create a platform-specific linked binary.
- `flash.sh`: flashes the binary in the target platform.

Some other required files inside the folder can be accessed from these scripts using the following paths:

```bash
Expand Down Expand Up @@ -211,4 +223,4 @@ see the file [3rd-party-licenses.txt](3rd-party-licenses.txt).

There are no known limitations.

If you find issues, [please report them](https://github.com/micro-ROS/micro_ros_setup/issues).
If you find issues, [please report them](https://github.com/micro-ROS/micro_ros_setup/issues).
5 changes: 0 additions & 5 deletions config/agent_uros_packages.repos
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,3 @@ repositories:
type: git
url: https://github.com/micro-ROS/drive_base.git
version: master
# TODO (pablogs9): Integrate Micro XRCE-DDS Agent dependency download in micro-ROS-Agent package
eProsima/Micro-XRCE-DDS-Agent:
type: git
url: https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
version: foxy
17 changes: 17 additions & 0 deletions config/freertos/nucleo_f446re/reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
EXTENSIONS_DIR=$FW_TARGETDIR/freertos_apps/microros_nucleo_f446re_extensions

pushd $EXTENSIONS_DIR > /dev/null

echo "Resetting firmware for $RTOS platform $PLATFORM"
if lsusb -d 0483:374b; then
ST_INTERFACE=interface/stlink-v2-1.cfg
elif lsusb -d 0483:3748; then
ST_INTERFACE=interface/stlink-v2.cfg
else
# TODO: add stlink v3, should it be stlink.cfg ?
echo "Error. Unsuported OpenOCD USB programmer"
exit 1
fi
openocd -f $ST_INTERFACE -f target/stm32f4x.cfg -c init -c "reset halt" -c "reset" -c "exit"

popd > /dev/null
17 changes: 17 additions & 0 deletions config/freertos/nucleo_f446ze/reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
EXTENSIONS_DIR=$FW_TARGETDIR/freertos_apps/microros_nucleo_f446ze_extensions

pushd $EXTENSIONS_DIR > /dev/null

echo "Resetting firmware for $RTOS platform $PLATFORM"
if lsusb -d 0483:374b; then
ST_INTERFACE=interface/stlink-v2-1.cfg
elif lsusb -d 0483:3748; then
ST_INTERFACE=interface/stlink-v2.cfg
else
# TODO: add stlink v3, should it be stlink.cfg ?
echo "Error. Unsuported OpenOCD USB programmer"
exit 1
fi
openocd -f $ST_INTERFACE -f target/stm32f4x.cfg -c init -c "reset halt" -c "reset" -c "exit"

popd > /dev/null
Loading