Debug & programmer - E2 emulator
Debug & programmer - E2 emulator lite for RL78
IDE – CS+ , suggest for automotive product




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


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)




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 (Programming GUI)




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



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


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


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

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


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


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





R_Config_TAUJ0_0_Start();

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



r_Config_TAUJ0_0_interrupt()


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



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

RH850 Smart Configurator User's Guide: CS+
back to top
#define GPIO_GETLEVEL(n,Pin) (((PORT.PPR##n & 1u<<Pin) == 0U)? 0U : 1U)
#define GPIO_TOGGLE(n,Pin) (PORT.PNOT##n |= 1u<<Pin)
#define GPIO_HIGH(Port,Pin) (PORT.Port |= 1u<<Pin)
#define GPIO_LOW(Port,Pin) (PORT.Port &= ~(1u<<Pin))




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



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

Y-ASK-RH850F1KM-S4-V3 Software Package
Y-ASK-RH850F1KM-S1-V3 Sample Code

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
Sample_Project_RH850_S1_Button_INT




R_Config_INTC_INTP2_Start();

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

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




R_Config_RIIC0_Start();

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


| 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



R_Config_CSIG0_Start();

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
Sample_Project_RH850_S1_SPI_Master
Sample_Project_RH850_S1_CSIH0_SPI_Master
Sample_Project_RH850_S1_CSIH1_SPI_Slave



R_Config_CSIH0_Start();

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

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




R_Config_UART0_Start();

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



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


PWM duty adjust example

R_Config_TAUB0_Start();

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


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







R_Config_ADCA0_ScanGroup1_Start();
R_Config_ADCA0_ScanGroup1_OperationOn();

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



.\
.

RH850 Smart Configurator User's Guide: CS+
back to top
while(1)
{
}

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

RH850 Smart Configurator User's Guide: CS+
back to top
USE_TABLE_REFERENCE_METHOD .set 1


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

mov #__sEIINTTBL.const , r6

RH850 Smart Configurator User's Guide: CS+
back to top
;.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

RH850 Smart Configurator User's Guide: CS+
back to top
Select [on Section : EIINTTBL]
Select [Remove]

Select on [blank in Address]
Select [Add]
Key in [200]

Select on [blank in Section] (addr : 0x200)
Select [Add]
Key in [EIINTTBL.const]


section : 0x200 in map file , must be reserved (SECTION:RESET)

RH850 Smart Configurator User's Guide: CS+
back to top
.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


Select on [blank in Section]
Select [Add]
Key in [EIINTTBL.const]

section : 0x200 in map file , must be reserved (SECTION:RESET)

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

download program after rebuild

debug function





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




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









Display section message





CC-RH Compiler User's Manual
back to top
Select on [.data] in Section
Select [Add]
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
Select on [.data] in Section
Select [Add]
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
Select on [.bss] in Section
Select [Add]
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

Code assignment example

check the address in map file

CC-RH Compiler User's Manual
back to top

Code assignment example

check the address in map file

CC-RH Compiler User's Manual
back to top

CC-RL Compiler User's Manual
back to top

Project split example , modify the projec name



Add the macro define for extra project

CC-RH Compiler User's Manual
back to top


CC-RL Compiler User's Manual
back to top
Sample_Project_RH850_S1_static_library
1. create new project and select [ Library(CC-RH) ]
modify CC-RH Property


add custom C code , for example

under custom_lib.c
unsigned char function_2(unsigned char a,unsigned char b)
{
return ( (a-b)>0 ? (a-b) : (b-a));
}
unsigned char function_1(unsigned char a,unsigned char b)
{
return (a+b);
}
under library_test_01.c
unsigned long library_test_001(void)
{
static unsigned long cnt = 0x1000;
return ( cnt+= 0x100 );
}
under library_test_02.c
unsigned long library_test_002(void)
{
static unsigned long cnt = 0x100;
return ( cnt+= 0x10 );
}
DefaultBuild\generate_lib.lib
method 1

method 2
draw the lib into project

#include "custom_lib.h"
tiny_printf("function_1 : %d\r\n" , function_1(5,2));
tiny_printf("function_2 : %d\r\n" , function_2(9,1));
tiny_printf("function_2 : %d\r\n" , function_2(7,16));
tiny_printf("library_test_001 : 0x%08X\r\n" , library_test_001());
tiny_printf("library_test_002 : 0x%08X\r\n" , library_test_002());


CC-RH Compiler User's Manual
back to top
add_lib.rlc
-form library
-output lib_custom.lib
-input .\DefaultBuild\custom_func.obj
-input .\DefaultBuild\misc_config.obj
-input .\DefaultBuild\Pin.obj
3. use rlink: Optimizing linker start command , to generate library
add_lib.bat
set "CCRH=C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RH\V2.07.00"
set PATH=%CCRH%\bin;%PATH%
rlink -subcommand=add_lib.rlc
5. put add_lib.bat and add_lib.rlc under project folder


7.build the project , library will auto generate after build complete

CC-RH Compiler User's Manual
back to top