Getting Started with micro-ROS and Renesas EK-RA6M5


I'm new to Renesas and just got an EK-RA6M5 evaluation kit.

I have been trying to follow because I wanted the kit specifically for the micro-ros support.

The video starts with "Once we have Resesas e2 studio and FSP for  EK-RA6M5, we just have to...", and I have been getting a bit stuck at that step.

I downloaded e2 studio from here at first:

I then ended up with: "hal_data.h: No such file or directory" when trying to build the usb example. made me think I needed to install Fsp separately from e2studio.

Could only find it for linux here: and downloaded  "the FSP with e2 studio Linux AppImage for this release, setup_fsp_v4_3_0_e2s_v2023-01.AppImage, from here."

Now I have 2 different e2studio versions and I'm still getting this error:  /home/sam/Dev/Experiments/micro_ros_renesas_demos/Boards/EK_RA6M5/micro_ros_usb/src/microros_allocators.h:6:10: fatal error: hal_data.h: No such file or directory
6 | #include "hal_data.h"

Would really appreciate some help here :)

  • If you haven't already, carefully follow the steps laid out on the micro ROS github page.  Sounds like you may have missed the steps for adding the required Include directories.

  • Thank you for the suggestion!

    The project I'm trying to build seems to already have the settings for the include directories from the repo you linked.

    It is this example

    Extracting support files...
    10:25:04 **** Incremental Build of configuration Debug for project micro_ros_usb ****
    make -r -j16 all 
    make --no-print-directory pre-build
    cd ../micro_ros_renesas2estudio_component/library_generation && ./ "-mcpu=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 -O2 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wconversion -Wpointer-arith -Wshadow -Wlogical-op -Waggregate-return -Wfloat-equal  -g"
    micro-ROS library found. Skipping...
    Delete micro_ros_renesas2estudio_component/libmicroros/ for rebuild.
    make --no-print-directory main-build
    Building file: ../src/hal_entry.c
    Building file: ../src/microros_allocators.c
    Building file: ../src/microros_app.c
    Building file: ../src/microros_time.c
    Building file: ../src/usb_descriptor.c
    Building file: ../src/usb_transport.c
    ../src/hal_entry.c:1:10: fatal error: hal_data.h: No such file or directory
        1 | #include "hal_data.h"
          |          ^~~~~~~~~~~~
    compilation terminated.
    In file included from ../src/microros_app.c:1:
    ../src/./utils.h:5:10: fatal error: hal_data.h: No such file or directory
        5 | #include "hal_data.h"
          |          ^~~~~~~~~~~~
    compilation terminated.
    ../src/usb_descriptor.c:27:10: fatal error: r_usb_basic.h: No such file or directory
       27 | #include <r_usb_basic.h>

  • I cloned that demo repo and imported the USB demo app into a new workspace, and tried to build it (after first fixing an issue with the USB clock speed).  Had similar (but not identical) errors to you:

    Building file: ../ra_gen/pin_data.c
    Building file: ../ra_gen/vector_data.c
    Building file: ../ra/fsp/src/r_usb_pcdc/src/r_usb_pcdc_driver.c
    In file included from ../src/usb_transport.c:1:
    /home/dell/microros_demos/micro_ros_renesas_demos/Boards/EK_RA6M5/micro_ros_usb/src/microros_transports.h:4:10: fatal error: uxr/client/transport.h: No such file or directory
    4 | #include <uxr/client/transport.h>
    | ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [src/ src/usb_transport.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    In file included from ../src/hal_entry.c:3:
    /home/dell/microros_demos/micro_ros_renesas_demos/Boards/EK_RA6M5/micro_ros_usb/src/microros_transports.h:4:10: fatal error: uxr/client/transport.h: No such file or directory
    4 | #include <uxr/client/transport.h>
    | ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [src/ src/hal_entry.o] Error 1
    ../src/microros_app.c:5:10: fatal error: rclc/rclc.h: No such file or directory
    5 | #include <rclc/rclc.h>
    | ^~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [src/ src/microros_app.o] Error 1
    make: *** [makefile:97: all] Error 2
    "make -r -j12 all" terminated with exit code 2. Build might be incomplete.
    09:26:09 Build Failed. 8 errors, 0 warnings. (took 2m:48s.72ms)

    However, just hitting the Build button again and it succeeded without error.

    Building file: ../ra/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c
    Building file: ../ra/board/ra6m5_ek/board_init.c
    Building file: ../ra/board/ra6m5_ek/board_leds.c
    Building target: micro_ros_usb.elf
    arm-none-eabi-objcopy -O srec "micro_ros_usb.elf" "micro_ros_usb.srec"
    arm-none-eabi-size --format=berkeley "micro_ros_usb.elf"
    text data bss dec hex filename
    71168 796 33168 105132 19aac micro_ros_usb.elf
    09:31:33 Build Finished. 0 errors, 0 warnings. (took 1s.740ms)

    Not sure if that suggesiton helps you.

    Note that I have experienced a lot of issues getting the micro ROS demos working previously.  The most reliable method I found was to not use them.  Instead start with a clean working code (eg a simple LED blinky project) without micro ROS, then follow the instructions I linked to above for adding the micro ROS renesas component into your project.

  • Thanks for testing it out!

    Seems like there could be requirements for versions of FSP according to an answer I just got here:

  • The above tests were done with FSP 4.1 I believe.

    Yes, you can install FSP seperately from e2 studio.  I have multiple versions installed in my version of e2 studio (v2022-10 I think), since demos from various vendors often rely on different versions.  Instructions for doing so:

  • Alright, I'll get on that!

    Seems like the video I started following to get started is gone now for some reason...

    There should really be a guide for getting started with micro-ROS with EK RA6M5 since they recommend the board and IDE as the best choice on their website :/

  • Made some progress with building the projects, but am now stuck on debugging seemingly not working. Is there some sort of guide for getting it working on linux? I get a "Could not connect to target" error.

    GDB Server for Renesas targets.
    	Version 9.0.0.v20221226-025508 [2de64c59] (Jan  6 2023 16:04:22)
    Starting server with the following options: 
            Raw options                : /home/sam/.eclipse/com.renesas.platform_1689987173/DebugComp//RA/e2-server-gdb -g SEGGERJLINKARM -t R7FA6M5BH -uConnectionTimeout= 30 -uSelect= USB -uJLinkSetting= "/home/sam/Dev/Experiments/micro_ros_renesas_demos/Boards/EK_RA6M5/micro_ros_usb/micro_ros_usb Debug_Flat.jlink" -uJLinkLog= /home/sam/Dev/Experiments/micro_ros_renesas_demos/Boards/EK_RA6M5/micro_ros_usb/JLinkLog.log -uLowPower= 0 -uInteface= SWD -uIfSpeed= 4000 -uscIrPre= 0 -uscDrPre= 0 -uNoReset= 1 -uResetPreRun= 1 -uResetCon= 1 -uResetBefDownload= 1 -uReleaseCM3= 0 -uDisconnectionMode= 1 -uSWOcoreClock= 0 -uEnableSciBoot= 1 -uresetOnReload= 1 -n 0 -uFlashBp= 1 -uSimulation= 0 -ueraseRomOnDownload= 0 -ueraseDataRomOnDownload= 0 -uOSRestriction= 0 -uProgReWriteIRom= 0 -uCPUFrequency= 0 -uCECycle= 1 -uMemRegion= 0x20000000:0x8800:RAM:s -uMemRegion= 0x20008800:0x1800:RAM:c -uMemRegion= 0x00000000:0x11800:FLASH:s -uMemRegion= 0x00011800:0x6800:FLASH:c -uMemRegion= 0x08000000:0x0:DATA_FLASH:s -uMemRegion= 0x0100A100:0x80:OPTION_SETTING:s -uMemRegion= 0x0100A200:0xCC:OPTION_SETTING_S:s -uMemRegion= 0x00000000:0x0:ID_CODE:s -uMemRegion= 0x90000000:0x0:SDRAM:s -uMemRegion= 0x60000000:0x0:QSPI_FLASH:s -uMemRegion= 0x68000000:0x0:OSPI_DEVICE_0:s -uMemRegion= 0x70000000:0x0:OSPI_DEVICE_1:s -uMemRegion= 0x00018000:0x1E8000:FLASH:n -uMemRegion= 0x08000000:0x2000:DATA_FLASH:n -uTz= SSD -l -uCore= SINGLE_CORE|enabled|1|main -uSyncMode= async -uFirstGDB= main --english --gdbVersion= 7.2
    Using J-Link version V7.82c - /home/sam/.eclipse/com.renesas.platform_1689987173/DebugComp/RA/ARM/Segger_v7.82.3/
    Connecting to R7FA6M5BH, ARM Target
            GDBServer endian           : little
            Target power from emulator : Off 
    Starting target connection
    GDB action 'connect to target', has failed with error code, 0xffffffff
    Disconnected from the Target Debugger.

  • Plugged into the right USB port?  Debug port is on the right of the board (J10).

    If you're completely new to this board and to eclipse on linux, have a read through the quick start guide and try some of the demo apps before getting lost in micro ROS.

    See section 5.5 "Setting up Debug Connections" in particular.

  • I was in the middle of following that guide on windows when I saw this last message.

    I got debugging to work for the standard "blink" project on Windows with no issues or special configuration. Doing the exact same thing on Linux does not work for me.

    The orange light on the board is solid, which I understand to mean that it has connected to a working driver.

    Should probably try on a fresh computer or something and only install the editor from the github releases page.

  • Debugging works when I start e2studio with sudo... hmm.

  • Hello @sam. It seems like you've figured out a solution to your issue. So I'll close this thread, and if you have any more questions, feel free to create a new one. 

    Thank you,

    If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
    Renesas Engineering Community Moderators

Reply Children
No Data