boards/renesas/ek_ra8m2/doc/index.rst
.. zephyr:board:: ek_ra8m2
Overview
The EK-RA8M2 is an Evaluation Kit for Renesas RA8M2 MCU Group which integrates multiple series of software-compatible Arm®-based 32-bit cores that share a common set of Renesas peripherals to facilitate design scalability and efficient platform-based product development.
The MCU in this series incorporates a high-performance Arm® Cortex®-M85 core running up to 1 GHz and Arm® Cortex®-M33 core running up to 250 MHz with the following features:
MCU Native Pin Access
System Control and Ecosystem Access
USB Full Speed Host and Device (USB-C connector)
Four 5V input sources
Three Debug modes
User LEDs, Status LEDs and Switches
Five most popular ecosystems expansions
MCU boot configuration jumper
Special Feature Access
Hardware
Detailed hardware features can be found at:
RA8M2 Group User's Manual Hardware_EK-RA8M2 - User's Manual_.. zephyr:board-supported-hw::
Dual Core Operation
The EK-RA8M2 supports dual core operation with both the Cortex-M85 (CPU0) and Cortex-M33 (CPU1) cores. By default, the CM85 core is the boot core and is responsible for initializing the system and starting the CM33 core.
By default, MRAM (Flash) and SRAM are split evenly between the two cores. Users can manually change the address and size for MRAM (Flash) and SRAM as follows node:
.. note::
When flashing or debugging dual-core samples, ensure that CONFIG_SOC_RA_ENABLE_START_SECOND_CORE is selected for the CM85 image. The CM85 core is responsible for starting the CM33 core in soc_late_init_hook.
Programming and Debugging
Applications for the ek_ra8m2 board configuration can be
built, flashed, and debugged in the usual way. See
:ref:build_an_application and :ref:application_run for more details on
building and running.
Here is an example for the :zephyr:code-sample:hello_world application on CM85 core.
.. zephyr-app-commands:: :zephyr-app: samples/hello_world :board: ek_ra8m2/r7ka8m2jflcac/cm85 :goals: flash
Open a serial terminal, reset the board (press the reset switch SW3), and you should see the following message in the terminal:
.. code-block:: console
***** Booting Zephyr OS v4.2.0-xxx-xxxxxxxxxxxxx ***** Hello World! ek_ra8m2/r7ka8m2jflcac/cm85
For the CM33 core, you can use the --sysbuild flow to build a minimal first-core launcher image that
starts the CM33 core.
.. zephyr-app-commands:: :tool: west :zephyr-app: samples/hello_world :board: ek_ra8m2/r7ka8m2jflcac/cm33 :goals: build flash :west-args: --sysbuild
Program can be flashed to EK-RA8M2 via the on-board SEGGER J-Link debugger. SEGGER J-link's drivers are available at https://www.segger.com/downloads/jlink/
To flash the program to board
Connect to J-Link OB via USB port to host PC
Make sure J-Link OB jumper is in default configuration as described in EK-RA8M2 - User's Manual_
Execute west command
.. code-block:: console
west flash -r jlink
The sysbuild makes possible to build and flash all necessary images needed to bootstrap the board.
To build the sample application using sysbuild use the command:
.. zephyr-app-commands:: :tool: west :zephyr-app: samples/hello_world :board: ek_ra8m2/r7ka8m2jflcac/cm85 :goals: build flash :west-args: --sysbuild :gen-args: -DSB_CONFIG_BOOTLOADER_MCUBOOT=y
By default, Sysbuild creates MCUboot and user application images.
Build directory structure created by sysbuild is different from traditional Zephyr build. Output is structured by the domain subdirectories:
.. code-block::
build/ ├── hello_world | └── zephyr │ ├── zephyr.elf │ ├── zephyr.hex │ ├── zephyr.bin │ ├── zephyr.signed.bin │ └── zephyr.signed.hex ├── mcuboot │ └── zephyr │ ├── zephyr.elf │ ├── zephyr.hex │ └── zephyr.bin └── domains.yaml
.. note::
With --sysbuild option, MCUboot will be rebuilt and reflashed
every time the pristine build is used.
To only flash the user application in the subsequent builds, Use:
.. code-block:: console
$ west flash --domain hello_world
For more information about the system build please read the :ref:sysbuild documentation.
You should see the following message in the terminal:
.. code-block:: console
*** Booting MCUboot v2.2.0-171-g8513be710e5e *** *** Using Zephyr OS build v4.2.0-6183-gdd720e2f0dc5 *** I: Starting bootloader I: Image index: 0, Swap type: none I: Image index: 0, Swap type: none I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Boot source: none I: Image index: 0, Swap type: none I: Image index: 0, Swap type: none I: Image index: 0, Swap type: none I: Image index: 0, Swap type: none I: Bootloader chainload address offset: 0x10000 I: Image version: v0.0.0 I: Jumping to the first image slot *** Booting Zephyr OS build v4.2.0-6183-gdd720e2f0dc5 *** Hello World! ek_ra8m2/r7ka8m2jflcac/cm85
References
EK-RA8M2 Website_RA8M2 MCU group Website_.. _EK-RA8M2 Website: https://www.renesas.com/en/design-resources/boards-kits/ek-ra8m2
.. _RA8M2 MCU group Website: https://www.renesas.com/en/products/ra8m2
.. _EK-RA8M2 - User's Manual: https://www.renesas.com/en/document/mat/ek-ra8m2-v1-users-manual
.. _RA8M2 Group User's Manual Hardware: https://www.renesas.com/en/document/mah/ra8m2-group-users-manual-hardware