File tree Expand file tree Collapse file tree 8 files changed +149
-0
lines changed Expand file tree Collapse file tree 8 files changed +149
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2025 Renesas Electronics Corporation
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ zephyr_include_directories (. )
5
+
6
+ zephyr_sources (
7
+ soc.c
8
+ )
9
+
10
+ zephyr_linker_sources (SECTIONS ofsm.ld )
11
+
12
+ set (SOC_LINKER_SCRIPT ${ZEPHYR_BASE} /include/zephyr/arch/rx/linker.ld CACHE INTERNAL "" )
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2025 Renesas Electronics Corporation
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ config SOC_SERIES_RX261
5
+ select RX
6
+ select CPU_RXV3
7
+ select XIP
8
+ select CLOCK_CONTROL_RENESAS_RX_CGC if CLOCK_CONTROL
9
+ select HAS_RENESAS_RX_RDP
10
+ select CLOCK_CONTROL
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2025 Renesas Electronics Corporation
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ if SOC_SERIES_RX261
5
+
6
+ DT_CMT_PATH := $(dt_nodelabel_path,cmt)
7
+
8
+ config SYS_CLOCK_HW_CYCLES_PER_SEC
9
+ default $(dt_node_int_prop_int,$(DT_CMT_PATH),clock-frequency)
10
+
11
+ # SYS_CLOCK_TICKS_PER_SEC is set to 100 if PCLKB is 48MHz or less.
12
+ # (PCLKB = SYS_CLOCK_HW_CYCLES_PER_SEC * 8)
13
+ config SYS_CLOCK_TICKS_PER_SEC
14
+ default 100 if SYS_CLOCK_HW_CYCLES_PER_SEC <= 6000000
15
+ default 1000
16
+
17
+ config INITIALIZATION_STACK_SIZE
18
+ default 512
19
+
20
+ config BUILD_OUTPUT_HEX
21
+ default y
22
+
23
+ endif # SOC_SERIES_RX261
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2025 Renesas Electronics Corporation
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ config SOC_SERIES_RX261
5
+ bool
6
+ select SOC_FAMILY_RENESAS_RX
7
+ help
8
+ Renesas RX261 series
9
+
10
+ config SOC_R5F52618BGFP
11
+ bool
12
+ select SOC_SERIES_RX261
13
+ help
14
+ R5F52618BGFP microcontroller SoC
15
+
16
+ config SOC_SERIES
17
+ default "rx261" if SOC_SERIES_RX261
18
+
19
+ config SOC
20
+ default "r5f52618bgfp" if SOC_R5F52618BGFP
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2025 Renesas Electronics Corporation
3
+ *
4
+ * SPDX-License-Identifier : Apache-2.0
5
+ */
6
+
7
+ SECTION_PROLOGUE(.ofsm,,)
8
+ {
9
+ __OFSM_START = .;
10
+ KEEP(*(.ofs_mde))
11
+ . = __OFSM_START + 0x8;
12
+ KEEP(*(.ofs1))
13
+ . = __OFSM_START + 0xC;
14
+ KEEP(*(.ofs0))
15
+ __OFSM_END = .;
16
+ } GROUP_LINK_IN(OFSM) = 0xFF
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2025 Renesas Electronics Corporation
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ /**
8
+ * @brief System/hardware module for RX SOC family
9
+ */
10
+
11
+ #include <zephyr/device.h>
12
+ #include <zephyr/init.h>
13
+ #include <zephyr/kernel.h>
14
+ #include <zephyr/arch/cpu.h>
15
+ #include <soc.h>
16
+
17
+ #include "platform.h"
18
+ #include "r_bsp_cpu.h"
19
+
20
+ /**
21
+ * @brief Perform basic hardware initialization at boot.
22
+ *
23
+ * This needs to be run from the very beginning.
24
+ * So the init priority has to be 0 (zero).
25
+ *
26
+ * @return 0
27
+ */
28
+ void soc_early_init_hook (void )
29
+ {
30
+ #ifdef CONFIG_HAS_RENESAS_RX_RDP
31
+ bsp_ram_initialize ();
32
+ bsp_interrupt_open ();
33
+ bsp_register_protect_open ();
34
+ #ifdef CONFIG_RENESAS_NONE_USED_PORT_INIT
35
+ /*
36
+ * This is the function that initializes the unused port.
37
+ * Please see datails on this in the "Handling of Unused Pins" section of PORT chapter
38
+ * of RX MCU of User's manual.
39
+ * And please MUST set "BSP_PACKAGE_PINS" definition to your device of pin type in
40
+ * r_bsp_config.h Otherwise, the port may output without intention.
41
+ */
42
+ bsp_non_existent_port_init ();
43
+
44
+ #endif /* CONFIG_RENESAS_NONE_USED_PORT_INIT */
45
+ #else
46
+ renesas_rx_register_protect_open ();
47
+ #endif /* CONFIG_HAS_RENESAS_RX_RDP */
48
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2025 Renesas Electronics Corporation
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ /**
8
+ * @brief SOC header file for Renesas RX SOC series
9
+ */
10
+
11
+ #ifndef _SOC_H_
12
+ #define _SOC_H_
13
+
14
+ #include "reg_protection.h"
15
+ #include <mcu_clocks.h>
16
+
17
+ #endif /* _SOC_H_ */
Original file line number Diff line number Diff line change 7
7
- name : rx62n
8
8
socs :
9
9
- name : r5f562n8
10
+ - name : rx261
11
+ socs :
12
+ - name : r5f52618bgfp
You can’t perform that action at this time.
0 commit comments