Skip to content

Commit 9dc0d68

Browse files
TrongNguyenRDucLeRVUNGtranR
authored
Add demo projects for RH850 CCRH U2Cx and GHS U2Cx (#32)
* Add demo project for RH850 CCRH U2x and GHS U2x * Added new Demo projects for RH850 U2Cx CCRH and GHS. --------- Co-authored-by: Duc Dat Le <duc.le.xm@renesas.com> Co-authored-by: vung.tran.zg <vung.tran.zg@renesas.com>
1 parent 681423f commit 9dc0d68

File tree

122 files changed

+2061861
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+2061861
-0
lines changed

RH850_U2Cx_CCRH/Image/Linker.png

292 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# RH850 U2Cx FreeRTOS Partner Supported Demo
2+
3+
## Introduction
4+
This directory contains demo project for Renesas RH850 U2C8
5+
6+
This example implements the standard test demos detailed in following link: [RTOS Third Party Demo](https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS/Demo/ThirdParty/Template/README.md)
7+
8+
## IDE
9+
- [CS+ support RH850 family](https://www.renesas.com/en/software-tool/cs?srsltid=AfmBOoqK5LDXK_CY45rHXBlWg4XojnYUopLwSC9DjUXsDYs4pa0oTZke#downloads)
10+
11+
## How to use
12+
Open CS+ and import this project File->Open.
13+
14+
Select test case you want to run by changing definition `configSTART_<Test_Name>_TESTS` in `freertos\FreeRTOSConfig.h` macros to `0` or ` 1` as needed.
15+
16+
Add breakpoint at line `configPRINTF(("%s \r\n", pcStatusMessage));` in `prvCheckTask` function in file `TestRunner.c` to check the result.
17+
18+
## Linker Script
19+
Add below linker script to your linker section
20+
```c
21+
RESET,STARTUP_CODE_PE0,STARTUP_CODE_PEn,STARTUP_CODE/00000000,ex_entry_PE0/00000800,ex_entry_PE1,.const,.INIT_BSEC.const,.INIT_DSEC.const,.data,.text/00005000,ex_entry_PE2/00035000,.stack_pe2.bss/FD800000,.stack_pe1.bss/FDA00000,.stack.bss,.data.R,.bss/FDC00000,.mev_address.bss/FE000000
22+
```
23+
![Linker section](../Image//Linker.png)
24+
25+
## Note
26+
1. The configuration `configRUN_MULTIPLE_PRIORITIES` must be set to `0` to PASS the following test cases:
27+
- `configSTART_GENERIC_QUEUE_TESTS` = `1`
28+
- `configSTART_PEEK_QUEUE_TESTS` = `1`
29+
- `configSTART_RECURSIVE_MUTEX_TESTS` = `1`
30+
- `configSTART_EVENT_GROUP_TESTS` = `1`
31+
- `configSTART_INTERRUPT_SEMAPHORE_TESTS` = `1`
32+
- `configSTART_TIMER_TESTS` = `1`
33+
2. The test case `configSTART_INTERRUPT_QUEUE_TESTS` are out of scope.
34+
3. For other test cases, please use default configuraton (`configRUN_MULTIPLE_PRIORITIES` = `1`)

RH850_U2Cx_CCRH/U2Cx_FreeRTOS_Demo_MultiCore/U2C8_FreeRTOS_port.mtpj

Lines changed: 5409 additions & 0 deletions
Large diffs are not rendered by default.

RH850_U2Cx_CCRH/U2Cx_FreeRTOS_Demo_MultiCore/U2C8_FreeRTOS_port.rcpe

Lines changed: 383 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include "bsp_common.h"
2+
3+
// extern irq_vector_t g_vector_table_PE0[RTOS_VECTOR_TABLE_MAX_ENTRIES];
4+
// extern irq_vector_t g_vector_table_PEn[RTOS_VECTOR_TABLE_MAX_ENTRIES];
5+
6+
7+
// void vCommonISRHandler (int irq)
8+
// {
9+
// if (GetCoreID() == 0)
10+
// {
11+
// g_vector_table_PE0[irq]();
12+
// }
13+
// else if (GetCoreID() == 1)
14+
// {
15+
// g_vector_table_PEn[irq]();
16+
// }
17+
// }
18+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef BSP_IRQ_BSP_IRQ_H_
2+
#define BSP_IRQ_BSP_IRQ_H_
3+
4+
#define BSP_FE_VECTOR_TABLE_ENTRIES (32)
5+
#define BSP_EIC_VECTOR_TABLE_ENTRIES (377)
6+
#define BSP_VECTOR_TABLE_MAX_ENTRIES (409)
7+
8+
typedef void (* irq_vector_t)(void);
9+
10+
// void vCommonISRHandler(uint32_t id);
11+
12+
#endif /* BSP_IRQ_BSP_IRQ_H_ */
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include "bsp_common.h"
2+
#include "FreeRTOSConfig.h"
3+
4+
typedef void (* int_vector_t)(void);
5+
6+
// const int_vector_t g_vector_table_PE0[RTOS_VECTOR_TABLE_MAX_ENTRIES] =
7+
// {
8+
// [360] = vPortTickISR, /* INTOSTM0TINT (OSTM0 interrupt) */
9+
// [621] = r_Config_UART0_interrupt_send,
10+
// };
11+
12+
// const int_vector_t g_vector_table_PEn[RTOS_VECTOR_TABLE_MAX_ENTRIES] =
13+
// {
14+
// [360] = vPortTickISR, /* INTOSTM0TINT (OSTM0 interrupt) */
15+
// [621] = r_Config_UART0_interrupt_send,
16+
// };
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifndef BSP_IRQ_VECTOR_DATA_H_
2+
#define BSP_IRQ_VECTOR_DATA_H_
3+
4+
5+
#define RTOS_VECTOR_TABLE_MAX_ENTRIES (1024)
6+
7+
8+
extern void vPortIPIHander(void);
9+
extern void vPortTickISR(void);
10+
11+
extern void vDummyISR(void);
12+
13+
extern void r_Config_UART0_interrupt_send(void);
14+
extern void TAUD0I1_Handler(void);
15+
extern void TAUD0I3_Handler(void);
16+
17+
#endif /* BSP_IRQ_VECTOR_DATA_H_ */
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#ifndef COMMON_BSP_COMMON_H_
2+
#define COMMON_COMMON_H_
3+
4+
#include <stdint.h>
5+
#include "iodefine.h"
6+
#include "bsp_compiler_support.h"
7+
#include "bsp_macro.h"
8+
#include "../bsp_irq/bsp_irq.h"
9+
#include "../bsp_irq/vector_data.h"
10+
11+
12+
static inline int GetCoreID() {
13+
//return ((__stsr_rh(0,2) >> 16) - 1);
14+
return (__stsr_rh(0, 2)); //get PEID value
15+
}
16+
#endif /* COMMON_BSP_COMMON_H_ */
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/***********************************************************************************************************************
2+
* DISCLAIMER
3+
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4+
* No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5+
* applicable laws, including copyright laws.
6+
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7+
* OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8+
* NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9+
* LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10+
* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11+
* ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12+
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13+
* of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14+
* following link:
15+
* http://www.renesas.com/disclaimer
16+
*
17+
* Copyright (C) 2018 - 2024 Renesas Electronics Corporation. All rights reserved.
18+
***********************************************************************************************************************/
19+
20+
#ifndef COMMON_BSP_COMPILER_SUPPORT_H_
21+
#define COMMON_BSP_COMPILER_SUPPORT_H_
22+
23+
#if defined(__CCRH__)
24+
#define BSP_DONT_REMOVE
25+
#define EIPC 0
26+
#define EIPSW 1
27+
#define FEPC 2
28+
#define FEPSW 3
29+
#define PSW 5
30+
#define FPSR 6
31+
#define FPEPC 7
32+
#define FPST 8
33+
#define FPCC 9
34+
#define FPCFG 10
35+
#define FPEC 11
36+
#define EIIC 13
37+
#define FEIC 14
38+
#define CTPC 16
39+
#define CTPSW 17
40+
#define CTBP 20
41+
#define EIWR 28
42+
#define FEWR 29
43+
44+
#define DI() __DI()
45+
#define EI() __EI()
46+
#define HALT() __halt()
47+
#define NOP() __nop()
48+
#define SYNCP() __syncp()
49+
#define SCH1R(x) __sch1r((x))
50+
#define LDSR(regid, ret) __ldsr((regid), (ret))
51+
#define STSR(regid) __stsr((regid))
52+
#endif
53+
54+
#endif /* COMMON_BSP_COMPILER_SUPPORT_H_ */

0 commit comments

Comments
 (0)