From eLinux.org
Jump to: navigation, search

Software revisions

Software Revision
R-Car SDK v3.16.1, v3.16.2
Zephyr Version 3.2

Host PC

Ubuntu 20.04 LTS (64bit) is recommended as OS. 32bit version is not supported.

Building the Zephyr for R-Car S4 Starter Kit

Ex) Zephyr build instructions using R-Car S4 Whitebox SDK[1]

$ git clone https://github.com/renesas-rcar/whitebox-sdk.git -b v4.1
$ cd whitebox-sdk/realtime_cpu
$ ./build_zephyr.sh s4sk -c
[1] Information about R-Car S4 Whitebox SDK here

Generated images

$ ls deploy/
cr52.srec  cr52_bench.srec

How to flash/update the binaries

Write cr52.srec file instead of dummy_rtos.srec file.
Write data information
Filename Program Top Address Qspi Save Address Description
bootparam_sa0.srec 0xEB200000 0x0000000 ICUMX IPL (boot parameter)
icumx_loader.srec 0xEB210000 0x0040000 ICUMX IPL
cert_header_sa9.srec 0xEB230000 0x0240000 ICUMX IPL (certification)
dummy_fw.srec 0xEB240000 0x0280000 Dummy firmware (Instead of secure firmware)
cr52.srec. 0xE2100000 0x0500000 Dummy RTOS (CR main OS)
dummy_g4mh_case0.srec 0x00000000 0x0900000 Dummy G4MH program image
dummy_icumh_case1.srec 0x00500000 0x0380000 Dummy ICUMH program image
bl31-s4sk.srec 0x46400000 0x0E00000 Trusted Firmware-A (BL31)
tee-s4sk.srec 0x44100000 0x0E80000 OP-TEE OS
u-boot-elf-s4sk.srec 0x50000000 0x0F80000 U-Boot
See : R-Car/Boards/S4SK#How_to_flash.2Fupdate_the_loader

How to boot the Zephyr

  1. Set SW3
  2. SW3.1 : On
    SW3.2 : On
    SW3.3 : Off
    SW3.4 : On
    SW3.5 : Off
    SW3.6 : On
    SW3.7 : Off
    SW3.8 : Off
  3. Connect S4SK(CN13) and Host PC with USB cable
  4. Target OS Zephyr Linux
    COM port number ChB ChA
    Baudrate 115200 921600
    Data 8-bit 8-bit
    Parity none none
    Stop bits 1 1


    If COM port ChB is used, it must be enabled in advance using the S4_StarterKit_Configurator.exe.
    You can check the COM port numbers by using S4_StarterKit_Configurator.exe.
    See R-Car/Boards/S4SK#How_to_use_two_COM_ports
  5. Power on(SW5)
  6. You can see the following logs on the COM port ChB side.
    Zephyr boot log


How to use Zephyr-shell

  1. build
    $ cd whitebox-sdk/realtime_cpu
    $ mkdir zephyrproject/user_app
    $ cd zephyrproject/user_app
    $ git clone https://github.com/iotbzh/zephyr-shell.git
    $ cd ../../
    $ sed -i s'|samples/basic/blinky|../user_app/zephyr-shell|' build_zephyr.sh
    $ ./build_zephyr.sh s4sk
  2. flash/write the cr52.srec file
  3. Power on
    You can see the following logs on the COM port ChB side.
    Zephyr shell log
Note: Zephyr-shell stops working when Linux is booted. The cause is the module clock. Please wait until the countermeasure is released.