Skip to content

Commit 0769fe1

Browse files
tiennguyenzgKhiemNguyenT
authored andcommitted
hal: renesas: Add support CR8 core for RZ/V2H
Add support CR8 core for RZ/V2H Signed-off-by: Tien Nguyen <[email protected]>
1 parent 3fcf8cb commit 0769fe1

Some content is hidden

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

55 files changed

+33151
-1915
lines changed

drivers/rz/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ set(include_dirs
1616

1717
if(CONFIG_CPU_CORTEX_M)
1818
set(CPU cm)
19-
elseif(CONFIG_CPU_CORTEX_R)
19+
elseif(CONFIG_CPU_AARCH32_CORTEX_R OR CONFIG_CPU_AARCH64_CORTEX_R)
2020
set(CPU cr)
2121
elseif(CONFIG_CPU_CORTEX_A)
2222
set(CPU ca)
@@ -26,6 +26,10 @@ if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fsp/src/${SOC_SERIES_PREFIX}/bsp/mc
2626
list(APPEND include_dirs "fsp/src/${SOC_SERIES_PREFIX}/bsp/mcu/all/${CPU}")
2727
endif()
2828

29+
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fsp/src/${SOC_SERIES_PREFIX}/bsp/mcu/${CONFIG_SOC_SERIES}/${CPU}")
30+
list(APPEND include_dirs "fsp/src/${SOC_SERIES_PREFIX}/bsp/mcu/${CONFIG_SOC_SERIES}/${CPU}")
31+
endif()
32+
2933
zephyr_include_directories(${include_dirs})
3034

3135
# Optional build base on feature configuration

drivers/rz/README

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,10 @@ License:
5151

5252
License Link:
5353
https://opensource.org/licenses/BSD-3-Clause
54+
55+
Patch List:
56+
57+
* Change the value of __MPU_PRESENT of core CR8 of V2H from 1 to 1U to avoid macro redefinition
58+
Replace the inclusion of cr/cr_compiler.h and cr/core_cr.h with core_cr8.h
59+
Impacted files:
60+
drivers/rz/fsp/src/rzv/bsp/cmsis/Device/RENESAS/Include/R9A09G057H.h

drivers/rz/fsp/src/rzv/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ set(srcs
55
bsp/mcu/all/bsp_clocks.c
66
bsp/mcu/all/bsp_delay.c
77
bsp/mcu/all/bsp_io.c
8-
bsp/mcu/all/cm/bsp_irq.c
98
)
109

1110
zephyr_library_sources(${srcs})

drivers/rz/fsp/src/rzv/bsp/cmsis/Device/RENESAS/Include/R9A09G057H.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extern "C" {
5353
/* ========================== Configuration of the ARM Cortex-R8 Processor and Core Peripherals =========================== */
5454
#define __NVIC_PRIO_BITS 4 /*!< Number of Bits used for Priority Levels */
5555
#define __Vendor_SysTickConfig 1 /*!< Set to 1 if different SysTick Config is used */
56-
#define __MPU_PRESENT 1 /*!< MPU present */
56+
#define __MPU_PRESENT 1U /*!< MPU present */
5757
#define __FPU_PRESENT 1 /*!< FPU present */
5858
#define __FPU_DP 0 /*!< Double Precision FPU */
5959
#endif
@@ -64,8 +64,7 @@ extern "C" {
6464
#include "core_cm33.h" /*!< ARM Cortex-M33 processor and core peripherals */
6565
#endif
6666
#if defined(BSP_SUPPORT_CORE_CR8)
67-
#include "cr/cr_compiler.h" /*!< Compiler support for Cortex-R */
68-
#include "cr/core_cr.h" /*!< Core setting for Cortex-R */
67+
#include "core_cr8.h" /*!< Core setting for Cortex-R */
6968
#endif
7069
#include "system.h" /*!< R9A09G057H System */
7170

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
/**********************************************************************************************************************
8+
* File Name : iodefine.h
9+
* Version : 1.00
10+
* Description : iodefine header
11+
*********************************************************************************************************************/
12+
13+
#ifndef __IODEFINE_HEADER__
14+
#define __IODEFINE_HEADER__
15+
16+
#include "iodefines/adc_e_iodefine.h"
17+
#include "iodefines/canfd_iodefine.h"
18+
#include "iodefines/cmtw_iodefine.h"
19+
#include "iodefines/cpg_iodefine.h"
20+
#include "iodefines/crc_iodefine.h"
21+
#include "iodefines/dmac_b_iodefine.h"
22+
#include "iodefines/gpio_iodefine.h"
23+
#include "iodefines/gpt_iodefine.h"
24+
#include "iodefines/gtm_iodefine.h"
25+
#include "iodefines/i3c_b_iodefine.h"
26+
#include "iodefines/intc_iodefine.h"
27+
#include "iodefines/mhu_iodefine.h"
28+
#include "iodefines/pdm_iodefine.h"
29+
#include "iodefines/poeg_iodefine.h"
30+
#include "iodefines/riic_iodefine.h"
31+
#include "iodefines/rtc_iodefine.h"
32+
#include "iodefines/sci_b_iodefine.h"
33+
#include "iodefines/scifa_iodefine.h"
34+
#include "iodefines/spi_b_iodefine.h"
35+
#include "iodefines/spibsc_iodefine.h"
36+
#include "iodefines/ssi_iodefine.h"
37+
#include "iodefines/sysc_iodefine.h"
38+
#include "iodefines/tsu_b_iodefine.h"
39+
#include "iodefines/tzc_iodefine.h"
40+
#include "iodefines/wdt_iodefine.h"
41+
#include "iodefines/xspi_iodefine.h"
42+
#include "iodefines/cr8/global_timer_iodefine.h"
43+
#include "iodefines/cr8/intc_gic_iodefine.h"
44+
#include "iodefines/cr8/private_timer_iodefine.h"
45+
#include "iodefines/cr8/scu_iodefine.h"
46+
47+
#endif /* __IODEFINE_HEADER__ */

0 commit comments

Comments
 (0)