return to index

Agenda


IDE & Debug tool

Debug & programmer - E2 emulator

Debug & programmer - E2 emulator lite for RL78

IDE – CS+ , suggest for automotive product

IDE – e² studio


User manual : CS+

CS+ User’s Manual

Integrated Development Environment User's Manual: RH850 Debug Tool
back to top


User manual : e² studio

e² studio User’s Manual


Compiler : CC-RH for RH850

Compiler – C Compiler Package for RH850 Family [CC-RH]

*Base on selected IDE , install the related compiler ( RH850 Compiler CC-RH for CS+ or for e² studio)

Compiler Licenses


User manual : CC-RH for RH850

Compiler CC-RH User’s Manual


Smart Configurator main window

IDE plug in – Smart Configurator

*Base on selected IDE , install the related Smart Configurator

https://www.renesas.com/en/software-tool/rh850-smart-configurator


Renesas Flash Programmer

Renesas Flash Programmer (Programming GUI)


Create project by CS+ (RH850)

Integrated Development Environment User's Manual: Project Operation
back to top


CS+ (RH850) : main window


CS+ (RH850) : open smart configurator

Open smart configurator from IDE (CS+)

RH850 Smart Configurator User's Guide: CS+
Smart Configurator User's Manual: RH850 API Reference
Smart Configurator Guide on Sample Projects for RH850/F1KM Devices
back to top


CS+ (RH850) – CC-RH options

Integrated Development Environment User's Manual: RH850 Debug Tool
back to top


CS+ (RH850) – Debug Tool options

Select Debug Tool

Integrated Development Environment User's Manual: RH850 Debug Tool
back to top


Smart Config. : main window (RH850)

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. - Clock

Select clock for PLL0 , PLL1

RH850 Smart Configurator User's Guide: CS+
back to top


use MainOSC (external osc) will enable X1 , X2 pin

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. : add component

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – Interval Timer

RH850 Smart Configurator User's Guide: CS+
back to top


TAUxx timer difference

TAUxx timer clock source

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


Press [Generate Code] in Smart config. will automatically generate driver source code under CS+ project

RH850 Smart Configurator User's Guide: CS+
back to top


Re-build project , will see the build result is complete without error

This will be project main code :
r_cg_main.c

RH850 Smart Configurator User's Guide: CS+
back to top


Need to manual add driver start API , ex :

R_Config_TAUJ0_0_Start(); 

RH850 Smart Configurator User's Guide: CS+
back to top


Add TIMER interrupt function under

r_Config_TAUJ0_0_interrupt()

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. : Timer delay

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – Generate code

[Generate Code] in Smart configurator , will re-generate driver code every time

RH850 Smart Configurator User's Guide: CS+
back to top


CS+ - driver code

Put custom application code , variable , declaration , between these 2 comment , will merge into driver code when execute [Generate Code] in Smart config

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – GPIO

RH850 Smart Configurator User's Guide: CS+
back to top


Select target GPIO port , to set GPIO input , output

>

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – GPIO output

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – GPIO input

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 F1KM-S4 example code

Y-ASK-RH850F1KM-S4-V3

https://www.renesas.com/en/products/microcontrollers-microprocessors/rh850-automotive-mcus/y-ask-rh850f1km-s4-v3-rh850f1km-s4-and-rh850f1km-s2-starter-kit

Y-ASK-RH850F1KM-S4-V3 Software Package

https://www.renesas.com/document/sws/y-ask-rh850f1km-s4-v3-software-package?language=en&r=1261056

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – external int.

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


Add code when trigger external interrupt INTP2

Need to manual add driver start API , ex :

R_Config_INTC_INTP2_Start();

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – I2C

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


Need to manual add driver start API , ex :

R_Config_RIIC0_Start();

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – SPI (CSIG0)

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – CPOL/CPHA

CPOL CPHA mode Type
1 1 3 1
0 1 1 2
1 0 2 3
0 0 0 4

RH850 Smart Configurator User's Guide: CS+
back to top


Need to manual add driver start API , ex :

R_Config_CSIG0_Start();

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – SPI (CSIH0)

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


Need to manual add driver start API , ex :

R_Config_CSIH0_Start();

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – CSIG vs CSIH

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – UART0

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


Need to manual add driver start API , ex :

R_Config_UART0_Start();

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – PWM

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


PWM duty adjust example

Need to manual add driver start API , ex :

R_Config_TAUB0_Start();

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – ADC

RH850 Smart Configurator User's Guide: CS+
back to top


RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – ADC sampling

RH850 Smart Configurator User's Guide: CS+
back to top


Smart Config. – ADC

Need to manual add driver start API , ex :

R_Config_ADCA0_ScanGroup1_Start();

RH850 Smart Configurator User's Guide: CS+
back to top


Add root path in Path Edit

After generate driver code , compile project under CS+ , if meet compile error (not open iodefine.h) , save and close CS+ project and re-open

Check CC-RH (Build Tool) > Common Options > Additional include paths , make sure already include the new add driver path (ex : TAUJ0_0 )

add root path under project to fix compile error issue

.\
.

RH850 Smart Configurator User's Guide: CS+
back to top


Add main loop

Need to manual add main loop , ex :

while(1)
{
}

RH850 Smart Configurator User's Guide: CS+
back to top


If not add while loop under main code , program will stop at exit in csstart.asm

RH850 Smart Configurator User's Guide: CS+
back to top


To fix INTERRUPT NOT WORK ISSUE

Remove [ ; ] , to enable table reference method

USE_TABLE_REFERENCE_METHOD .set 1

RH850 Smart Configurator User's Guide: CS+
back to top


Add [ ; ] , to disable default interrupt

;.section "EIINTTBL", const
;.align 512
;.dw #_Dummy_EI ; INT0
;.dw #_Dummy_EI ; INT1
;.dw #_Dummy_EI ; INT2
;.rept 512 - 3
;.dw #_Dummy_EI ; INTn
;.endm

RH850 Smart Configurator User's Guide: CS+
back to top


Add [ .const ]

mov #__sEIINTTBL.const , r6 

RH850 Smart Configurator User's Guide: CS+
back to top


Open [Section] modify under [Link Options] in [CC-RH Property]

RH850 Smart Configurator User's Guide: CS+
back to top


REMOVE [EIINTTBL] in Section Settings 1. Select [on Section : EIINTTBL] 2. Select [Remove]

ADD [address 0x200] in Section Settings 1. Select on [blank in Address] 2. Select [Add] 3. Key in [200]

ADD [EIINTTBL.const] in Section Settings 1. Select on [blank in Section] (addr : 0x200) 2. Select [Add] 3. Key in [EIINTTBL.const]

Final section table result

RH850 Smart Configurator User's Guide: CS+
back to top


CS+ - entry debug mode

Make sure [DISCONNECT] CS+ project before REMOVE DEBUGGER tool

download program after rebuild

debug function



Integrated Development Environment User's Manual: RH850 Debug Tool
back to top


Renesas Flash Programmer

Renesas Flash Programmer V*.** Flash memory programming softwareUser's Manual
back to top


Tips : Convert to Hex


Tips : Emulator power on MCU


Tips : Set CLOCK (F1KM-S1)


Tips : map file display

Function address
size display
location assignment
Code size
RAM size display


Tips : section message display

Display section message


Tips : size display display in output window


Tips : Backup times (generate code)


Tips : section define modify

CC-RH Compiler User's Manual
back to top


Tips : section define (const)

ADD [privateData.const] in Section Settings
1. Select on [.data] in Section
2. Select [Add]
3. Key in [privateData.const]

item note
data variables with initial value
bss variables with no initial value
text program code
const constant data

Code assignment example

CC-RH Compiler User's Manual
back to top


Tips : section define (data)

ADD [privateData.data] in Section Settings
1. Select on [.data] in Section
2. Select [Add]
3. Key in [privateData.data]

item note
data variables with initial value
bss variables with no initial value
text program code
const constant data

Code assignment example

CC-RH Compiler User's Manual
back to top


Tips : section define (bss)

ADD [privateData.bss] in Section Settings
1. Select on [.bss] in Section
2. Select [Add]
3. Key in [privateData.bss]

item note
data variables with initial value
bss variables with no initial value
text program code
const constant data

Code assignment example

CC-RH Compiler User's Manual
back to top


Tips : section define (not assigned address)

New add custom define section as below
Also able to define the address base on application

Code assignment example

check the address in map file

CC-RH Compiler User's Manual
back to top


Tips : section define (assigned address)

New add custom define section as the capture
Also able to define the address base on application

Code assignment example

check the address in map file

CC-RH Compiler User's Manual
back to top


Tips : section allocation , size

CC-RL Compiler User's Manual
back to top


Tips : project split

Use [ Build Mode Setting ] , to split different macro in different project setting if necessary

Project split example , modify the projec name

Add the macro define for extra project

CC-RH Compiler User's Manual
back to top