Template:R-Car-Gen3-CPLD-Flash-IPL

This block is not included when this template is used. How to use this template

By using CPLD and Flash Writer, it is enabled to flash IPLs(firmware) without changing any switch(SW1/SW6) on R-Car Gen3 Starter Kit. There are two steps to prepare to write IPLs. First, reboot R-Car Gen3 Starter Kit in "SCIF Download Mode" via CPLD. Then, send Flash Writer binary to the board. After launching Flash Writer, it is possible to write IPLs by using xls2 command.
 * Initial SW1/6 status
 * SW1: ON
 * SW6[all]: ON

How to reboot in "SCIF Download Mode" via CPLD
There are two ways to reboot in "SCIF Download Mode" via CPLD. It is enough to execute one of the following.


 * 1) Using U-boot
 * 2) Using cpld-control
 * 3) Build cpld-control for Host PC
 * https://github.com/marex/cpld-control
 * 1) execute following script.
 * Note: Even if reboot in "SCIF Download mode" is succeeded, there is no output on terminal(Ex. minicom).
 * Note: for Windows user, python-cpld-control may be used instead of cpld-control.
 * Note: Even if reboot in "SCIF Download mode" is succeeded, there is no output on terminal(Ex. minicom).
 * Note: for Windows user, python-cpld-control may be used instead of cpld-control.
 * Note: for Windows user, python-cpld-control may be used instead of cpld-control.

How to boot Flash Writer

 * 1) Build  Flash Writer
 * https://github.com/renesas-rcar/flash_writer
 * build command:
 * See also:
 * https://github.com/renesas-rcar/flash_writer/blob/rcar_gen3/docs/application-note.md
 * https://github.com/renesas-rcar/flash_writer/blob/rcar_gen3/docs/application-note.md#4-how-to-build-the-flash-writer
 * Note: build option "BOARD=ULCB" and "AArch=32" are required.
 * Note: Specific cross compiler is also required(https://github.com/renesas-rcar/flash_writer/blob/rcar_gen3/docs/application-note.md#41-prepare-the-compiler).
 * 1) Send Flash Writer to the board
 * ex) Using minicom
 * Type "ctrl+A S" and select upload method "ascii", then choose file for uploading "AArch32_Flash_writer_SCIF_DUMMY_CERT_E6300400_ULCB.mot", after upload finished press any key.
 * Then, message like below is shown in terminal
 * Then, message like below is shown in terminal

How to flash IPLs
Please refer to the following pages: After flashing IPLs, please reboot the board by SW8 to reset CPLD register.
 * R-Car/Boards/H3SK
 * R-Car/Boards/M3SK