From 70abb530aed335b8ca1b53f41b8351ddb802f0c4 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Fri, 17 Sep 2021 09:04:37 +0200 Subject: [PATCH 1/3] Add renesas RA6M5 --- README.md | 36 +++++++++---------- config/renesas_ra/dev_ros2_packages.txt | 2 ++ config/renesas_ra/dev_uros_packages.repos | 1 + config/renesas_ra/list_apps.sh | 24 +++++++++++++ config/renesas_ra/ra6m5/board.repos | 5 +++ config/renesas_ra/ra6m5/build.sh | 18 ++++++++++ .../ra6m5/client_uros_packages.repos | 1 + config/renesas_ra/ra6m5/configure.sh | 1 + config/renesas_ra/ra6m5/create.sh | 14 ++++++++ config/renesas_ra/ra6m5/flash.sh | 6 ++++ scripts/create_firmware_ws.sh | 2 +- 11 files changed, 91 insertions(+), 19 deletions(-) create mode 100644 config/renesas_ra/dev_ros2_packages.txt create mode 100644 config/renesas_ra/dev_uros_packages.repos create mode 100644 config/renesas_ra/list_apps.sh create mode 100644 config/renesas_ra/ra6m5/board.repos create mode 100755 config/renesas_ra/ra6m5/build.sh create mode 100644 config/renesas_ra/ra6m5/client_uros_packages.repos create mode 100755 config/renesas_ra/ra6m5/configure.sh create mode 100755 config/renesas_ra/ra6m5/create.sh create mode 100755 config/renesas_ra/ra6m5/flash.sh diff --git a/README.md b/README.md index 8265b12e..6272f66e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This ROS 2 package is the entry point for building micro-ROS apps for different - [Supported platforms](#supported-platforms) - [Standalone build system tools](#standalone-build-system-tools) - [Dependencies](#dependencies) -- [Quick Start](#quick-start) +- [Quick start](#quick-start) - [Building](#building) - [Creating micro-ROS firmware](#creating-micro-ros-firmware) - [Configuring micro-ROS firmware](#configuring-micro-ros-firmware) @@ -20,23 +20,23 @@ 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 | -| ---------------------------------------- | ---------------------------------------------------------------------------------------------------- | -------------------- | ---------------------------- | -| [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) 1 | STM32CubeMX latest | `freertos nucleo_f446re` | -| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446ZE](https://www.st.com/en/evaluation-tools/nucleo-f446ze.html) 1 | STM32CubeMX latest | `freertos nucleo_f446ze` | -| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F746ZG](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) 1 | STM32CubeMX latest | `freertos nucleo_f746zg` | -| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F767ZI](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) 1 | 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` | -| [FreeRTOS](https://www.freertos.org/) | [Crazyflie 2.1](https://www.bitcraze.io/crazyflie-2-1/) | v10.2.1 - CF 2020.06 | `freertos crazyflie21` | -| [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 Nucleo F446RE](https://www.st.com/en/evaluation-tools/nucleo-f446re.html) 1 | v2.6.0 | `zephyr nucleo_f446re` | -| [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) 1 | 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` | -| [Mbed](https://os.mbed.com/) | [ST B-L475E-IOT01A](https://os.mbed.com/platforms/ST-Discovery-L475E-IOT01A/) | v6.6 | `mbed disco_l475vg_iot01a` | -| - | Static library (.a) and headers (.h) 3 | - | `generate_lib` | -| Linux | *Host 2* | Ubuntu 18.04/20.04 | `host` | +| RTOS | Platform | Version | Example | +| ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ---------------------------- | +| Bare metal & [Azure RTOS](https://azure.microsoft.com/es-es/services/rtos/) & [FreeRTOS](https://www.freertos.org/) | [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 e2 studio | `renesas_ra ra6m5` | +| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446RE](https://www.st.com/en/evaluation-tools/nucleo-f446re.html) 1 | STM32CubeMX latest | `freertos nucleo_f446re` | +| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446ZE](https://www.st.com/en/evaluation-tools/nucleo-f446ze.html) 1 | STM32CubeMX latest | `freertos nucleo_f446ze` | +| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F746ZG](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) 1 | STM32CubeMX latest | `freertos nucleo_f746zg` | +| [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F767ZI](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) 1 | 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` | +| [FreeRTOS](https://www.freertos.org/) | [Crazyflie 2.1](https://www.bitcraze.io/crazyflie-2-1/) | v10.2.1 - CF 2020.06 | `freertos crazyflie21` | +| [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 Nucleo F446RE](https://www.st.com/en/evaluation-tools/nucleo-f446re.html) 1 | v2.6.0 | `zephyr nucleo_f446re` | +| [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) 1 | 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` | +| [Mbed](https://os.mbed.com/) | [ST B-L475E-IOT01A](https://os.mbed.com/platforms/ST-Discovery-L475E-IOT01A/) | v6.6 | `mbed disco_l475vg_iot01a` | +| - | Static library (.a) and headers (.h) 3 | - | `generate_lib` | +| Linux | *Host 2* | Ubuntu 18.04/20.04 | `host` | *1 Community supported, may have lack of official support* diff --git a/config/renesas_ra/dev_ros2_packages.txt b/config/renesas_ra/dev_ros2_packages.txt new file mode 100644 index 00000000..23fb6a5c --- /dev/null +++ b/config/renesas_ra/dev_ros2_packages.txt @@ -0,0 +1,2 @@ +keep: + None diff --git a/config/renesas_ra/dev_uros_packages.repos b/config/renesas_ra/dev_uros_packages.repos new file mode 100644 index 00000000..56f46b6f --- /dev/null +++ b/config/renesas_ra/dev_uros_packages.repos @@ -0,0 +1 @@ +repositories: diff --git a/config/renesas_ra/list_apps.sh b/config/renesas_ra/list_apps.sh new file mode 100644 index 00000000..e460c69d --- /dev/null +++ b/config/renesas_ra/list_apps.sh @@ -0,0 +1,24 @@ +function print_available_apps { + echo "Available apps for Renesas RA and $PLATFORM:" + + UROS_APPS=$FW_TARGETDIR/micro_ros_renesas_demos + + pushd $UROS_APPS >/dev/null + for app in $(ls -d */ | cut -f1 -d'/'); do + echo "+-- $app" + done + popd >/dev/null +} + +function check_available_app { + + UROS_APPS=$FW_TARGETDIR/micro_ros_renesas_demos + + pushd $UROS_APPS >/dev/null + if [ ! -d $1 ]; then + echo "App $1 for Renesas RA not available" + print_available_apps + exit 1 + fi + popd >/dev/null +} \ No newline at end of file diff --git a/config/renesas_ra/ra6m5/board.repos b/config/renesas_ra/ra6m5/board.repos new file mode 100644 index 00000000..ce3653b9 --- /dev/null +++ b/config/renesas_ra/ra6m5/board.repos @@ -0,0 +1,5 @@ +repositories: + micro_ros_renesas_demos: + type: git + url: https://github.com/micro-ROS/micro_ros_renesas_demos + version: main diff --git a/config/renesas_ra/ra6m5/build.sh b/config/renesas_ra/ra6m5/build.sh new file mode 100755 index 00000000..4a0bfdf2 --- /dev/null +++ b/config/renesas_ra/ra6m5/build.sh @@ -0,0 +1,18 @@ +export UROS_APP=$(head -n1 $FW_TARGETDIR/APP | tail -n1) +export UROS_APP_FOLDER="$FW_TARGETDIR/micro_ros_renesas_demos/$UROS_APP" + +if [ -d "$UROS_APP_FOLDER" ]; then + echo "Selected app: $UROS_APP" +else + echo "App not found: $UROS_APP" + print_available_apps + exit 1 +fi + +pushd $UROS_APP_FOLDER + git submodule init + git submodule update + + print "Use Renesas e2studio to build and flash the project in $UROS_APP_FOLDER" + +popd \ No newline at end of file diff --git a/config/renesas_ra/ra6m5/client_uros_packages.repos b/config/renesas_ra/ra6m5/client_uros_packages.repos new file mode 100644 index 00000000..56f46b6f --- /dev/null +++ b/config/renesas_ra/ra6m5/client_uros_packages.repos @@ -0,0 +1 @@ +repositories: diff --git a/config/renesas_ra/ra6m5/configure.sh b/config/renesas_ra/ra6m5/configure.sh new file mode 100755 index 00000000..69715ea6 --- /dev/null +++ b/config/renesas_ra/ra6m5/configure.sh @@ -0,0 +1 @@ +echo $CONFIG_NAME > $FW_TARGETDIR/APP diff --git a/config/renesas_ra/ra6m5/create.sh b/config/renesas_ra/ra6m5/create.sh new file mode 100755 index 00000000..395c063a --- /dev/null +++ b/config/renesas_ra/ra6m5/create.sh @@ -0,0 +1,14 @@ +pushd $FW_TARGETDIR >/dev/null + # Install toolchain + mkdir toolchain + + # Install toolchain + echo "Downloading ARM compiler, this may take a while" + curl -fsSLOk https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 + tar --strip-components=1 -xvjf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -C toolchain > /dev/null + rm gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 + + # Import repos + vcs import --input $PREFIX/config/$RTOS/$PLATFORM/board.repos + +popd >/dev/null \ No newline at end of file diff --git a/config/renesas_ra/ra6m5/flash.sh b/config/renesas_ra/ra6m5/flash.sh new file mode 100755 index 00000000..a4b389d1 --- /dev/null +++ b/config/renesas_ra/ra6m5/flash.sh @@ -0,0 +1,6 @@ +export UROS_APP=$(head -n1 $FW_TARGETDIR/APP | tail -n1) +export UROS_APP_FOLDER="$FW_TARGETDIR/micro_ros_renesas_demos/$UROS_APP" + +pushd $UROS_APP_FOLDER + print "Use Renesas e2studio to build and flash the project in $UROS_APP_FOLDER" +popd \ No newline at end of file diff --git a/scripts/create_firmware_ws.sh b/scripts/create_firmware_ws.sh index 04435e6a..d401f131 100755 --- a/scripts/create_firmware_ws.sh +++ b/scripts/create_firmware_ws.sh @@ -34,7 +34,7 @@ print_available_platforms () { if [ $# -ge 1 ]; then RTOS=$1 else - echo "Syntax: ros2 run micro_ros_setup create_firmware_ws.sh []" + echo "Syntax: ros2 run micro_ros_setup create_firmware_ws.sh []" print_available_platforms exit 1 fi From 32c650ea518a22275fd23df204275489c89cae29 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Fri, 17 Sep 2021 09:06:09 +0200 Subject: [PATCH 2/3] Fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6272f66e..c571d2c0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This package is the **official build system for micro-ROS**. It provides tools a | RTOS | Platform | Version | Example | | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ---------------------------- | -| Bare metal & [Azure RTOS](https://azure.microsoft.com/es-es/services/rtos/) & [FreeRTOS](https://www.freertos.org/) | [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 e2 studio | `renesas_ra ra6m5` | +| [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 e2 studio | `renesas_ra ra6m5` | | [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446RE](https://www.st.com/en/evaluation-tools/nucleo-f446re.html) 1 | STM32CubeMX latest | `freertos nucleo_f446re` | | [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F446ZE](https://www.st.com/en/evaluation-tools/nucleo-f446ze.html) 1 | STM32CubeMX latest | `freertos nucleo_f446ze` | | [FreeRTOS](https://www.freertos.org/) | [ST Nucleo F746ZG](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) 1 | STM32CubeMX latest | `freertos nucleo_f746zg` | From eb27ce989198ee4995b2911b6ae7021e6e9da611 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Mon, 20 Sep 2021 14:14:59 +0200 Subject: [PATCH 3/3] Avoid toolchain --- config/renesas_ra/ra6m5/create.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/renesas_ra/ra6m5/create.sh b/config/renesas_ra/ra6m5/create.sh index 395c063a..d8098f2b 100755 --- a/config/renesas_ra/ra6m5/create.sh +++ b/config/renesas_ra/ra6m5/create.sh @@ -1,12 +1,12 @@ pushd $FW_TARGETDIR >/dev/null - # Install toolchain - mkdir toolchain + # # Install toolchain + # mkdir toolchain - # Install toolchain - echo "Downloading ARM compiler, this may take a while" - curl -fsSLOk https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 - tar --strip-components=1 -xvjf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -C toolchain > /dev/null - rm gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 + # # Install toolchain + # echo "Downloading ARM compiler, this may take a while" + # curl -fsSLOk https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 + # tar --strip-components=1 -xvjf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -C toolchain > /dev/null + # rm gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 # Import repos vcs import --input $PREFIX/config/$RTOS/$PLATFORM/board.repos