From eecac7cf22279286551dd8875d84edf992090794 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Mon, 20 Sep 2021 14:18:04 +0200 Subject: [PATCH 1/2] Add renesas RA6M5 (#390) * Add renesas RA6M5 * Fix * Avoid toolchain (cherry picked from commit d27b83ef9c5303fe882d9a6731f0dcc4952518fb) # Conflicts: # README.md --- README.md | 22 ++++++++++++++++- 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, 94 insertions(+), 2 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 160cf3ec..177d7dcf 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,6 +20,7 @@ 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: +<<<<<<< HEAD | 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` | @@ -36,6 +37,25 @@ This package is the **official build system for micro-ROS**. It provides tools a | [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) 3 | - | `generate_lib` | | Linux | *Host 2* | 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 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` | +>>>>>>> d27b83e (Add renesas RA6M5 (#390)) *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..d8098f2b --- /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 7be1a671..86138c25 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 7e8f33ab8777c0cd95eae2acc8b145cec68aca2e Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Mon, 20 Sep 2021 14:21:33 +0200 Subject: [PATCH 2/2] Fix --- README.md | 25 +++---------------------- config/renesas_ra/ra6m5/board.repos | 2 +- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 177d7dcf..e25b9653 100644 --- a/README.md +++ b/README.md @@ -20,42 +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: -<<<<<<< HEAD -| 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) 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` | -| [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) 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` | -| - | Static library (.a) and headers (.h) 3 | - | `generate_lib` | -| Linux | *Host 2* | 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 e2 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) 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` | ->>>>>>> d27b83e (Add renesas RA6M5 (#390)) *1 Community supported, may have lack of official support* diff --git a/config/renesas_ra/ra6m5/board.repos b/config/renesas_ra/ra6m5/board.repos index ce3653b9..bff027ec 100644 --- a/config/renesas_ra/ra6m5/board.repos +++ b/config/renesas_ra/ra6m5/board.repos @@ -2,4 +2,4 @@ repositories: micro_ros_renesas_demos: type: git url: https://github.com/micro-ROS/micro_ros_renesas_demos - version: main + version: foxy