FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Optimize System Resource Allocation for ra6w1 · RT-Thread/rt-thread@9204cfe · GitHub

Commit 9204cfe

Browse files
committed
Optimize System Resource Allocation for ra6w1
1 parent 005d291 commit 9204cfe

8 files changed

Lines changed: 311 additions & 16 deletions

File tree

‎bsp/renesas/ra6w1-ek/.config‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ CONFIG_SOC_R7SA6W1CED=y
107107
# end of rt_strnlen options
108108
# end of klibc options
109109

110-
CONFIG_RT_NAME_MAX=12
110+
CONFIG_RT_NAME_MAX=32
111111
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
112112
# CONFIG_RT_USING_NANO is not set
113113
# CONFIG_RT_USING_SMART is not set
@@ -126,10 +126,10 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y
126126
# CONFIG_RT_USING_HOOKLIST is not set
127127
CONFIG_RT_USING_IDLE_HOOK=y
128128
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
129-
CONFIG_IDLE_THREAD_STACK_SIZE=256
129+
CONFIG_IDLE_THREAD_STACK_SIZE=512
130130
CONFIG_RT_USING_TIMER_SOFT=y
131131
CONFIG_RT_TIMER_THREAD_PRIO=4
132-
CONFIG_RT_TIMER_THREAD_STACK_SIZE=512
132+
CONFIG_RT_TIMER_THREAD_STACK_SIZE=1024
133133
# CONFIG_RT_USING_TIMER_ALL_SOFT is not set
134134
# CONFIG_RT_USING_CPU_USAGE_TRACER is not set
135135

@@ -171,7 +171,7 @@ CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y
171171
# CONFIG_RT_USING_USERHEAP is not set
172172
# CONFIG_RT_USING_NOHEAP is not set
173173
# CONFIG_RT_USING_MEMTRACE is not set
174-
# CONFIG_RT_USING_HEAP_ISR is not set
174+
CONFIG_RT_USING_HEAP_ISR=y
175175
CONFIG_RT_USING_HEAP=y
176176
# end of Memory Management
177177

@@ -183,7 +183,7 @@ CONFIG_RT_USING_CONSOLE=y
183183
CONFIG_RT_CONSOLEBUF_SIZE=128
184184
CONFIG_RT_CONSOLE_DEVICE_NAME="uart0"
185185
CONFIG_RT_USING_CONSOLE_OUTPUT_CTL=y
186-
CONFIG_RT_VER_NUM=0x50300
186+
CONFIG_RT_VER_NUM=0x50301
187187
# CONFIG_RT_USING_STDC_ATOMIC is not set
188188
CONFIG_RT_BACKTRACE_LEVEL_MAX_NR=32
189189
# end of RT-Thread Kernel
@@ -229,7 +229,12 @@ CONFIG_FINSH_USING_OPTION_COMPLETION=y
229229
# CONFIG_RT_USING_DFS is not set
230230
# end of DFS: device virtual file system
231231

232-
# CONFIG_RT_USING_FAL is not set
232+
CONFIG_RT_USING_FAL=y
233+
CONFIG_FAL_USING_DEBUG=y
234+
CONFIG_FAL_PART_HAS_TABLE_CFG=y
235+
# CONFIG_FAL_USING_SFUD_PORT is not set
236+
CONFIG_FAL_DEV_NAME_MAX=24
237+
CONFIG_FAL_DEV_BLK_MAX=6
233238

234239
#
235240
# Device Drivers
@@ -238,7 +243,9 @@ CONFIG_FINSH_USING_OPTION_COMPLETION=y
238243
# CONFIG_RT_USING_DEV_BUS is not set
239244
CONFIG_RT_USING_DEVICE_IPC=y
240245
CONFIG_RT_UNAMED_PIPE_NUMBER=64
241-
# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set
246+
CONFIG_RT_USING_SYSTEM_WORKQUEUE=y
247+
CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048
248+
CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=15
242249
CONFIG_RT_USING_SERIAL=y
243250
# CONFIG_RT_USING_SERIAL_V1 is not set
244251
CONFIG_RT_USING_SERIAL_V2=y
@@ -1473,7 +1480,7 @@ CONFIG_BSP_UART0_TX_BUFSIZE=0
14731480
#
14741481
# On-chip Peripheral Port
14751482
#
1476-
# CONFIG_BSP_USING_OSPI_FLASH is not set
1483+
CONFIG_BSP_USING_OSPI_FLASH=y
14771484
# CONFIG_BSP_USING_QSPI_PSRAM is not set
14781485
# end of On-chip Peripheral Port
14791486
# end of Hardware Drivers Config
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright (c) 2006-2026, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2026-09-21 rcitach INITIAL VERSION
9+
*/
10+
11+
12+
#ifndef __RA6W1_PIN_EXT_H__
13+
#define __RA6W1_PIN_EXT_H__
14+
15+
#ifdef EXTRA_IO_INCLUDE
16+
#define RA6W1_PIN_INCLUDE_FILE_(name) <name>
17+
#define RA6W1_PIN_INCLUDE_FILE(name) RA6W1_PIN_INCLUDE_FILE_(name)
18+
#include RA6W1_PIN_INCLUDE_FILE(EXTRA_IO_INCLUDE)
19+
#undef RA6W1_PIN_INCLUDE_FILE
20+
#undef RA6W1_PIN_INCLUDE_FILE_
21+
#endif
22+
23+
#ifndef RA6W1_PIN_CFG_EXTRA
24+
#define RA6W1_PIN_CFG_EXTRA
25+
#endif
26+
27+
#ifndef RA6W1_PIN_NAME_EXTRA
28+
#define RA6W1_PIN_NAME_EXTRA
29+
#endif
30+
31+
#ifndef RA6W1_PIN_COUNT_EXTRA
32+
#define RA6W1_PIN_COUNT_EXTRA 0
33+
#endif
34+
35+
#endif /* __RA6W1_PIN_EXT_H__ */

‎bsp/renesas/ra6w1-ek/ra/SConscript‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ CPPPATH = [cwd + "/arm/CMSIS_6/CMSIS/Core/Include",
1414
cwd + "/fsp/src/bsp_w/cmsis/Device/RENESAS/Include",
1515
cwd + "/fsp/src/bsp_w/mcu/all",
1616
cwd + "/fsp/src/bsp_w/mcu/ra6w1",
17-
cwd + "/fsp/src/bsp_w/mcu/ra6w1/config"]
17+
cwd + "/fsp/src/bsp_w/mcu/ra6w1/config",
18+
cwd + "/fsp/src/bsp_w/mcu/ra6w1/config/include",
19+
]
1820

1921
src += Glob("./board/rrq61xxx_evb/*.c")
2022
src += Glob("./fsp/src/bsp_w/cmsis/Device/RENESAS/Source/*.c")

‎bsp/renesas/ra6w1-ek/rafw_gen/pin_data.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "bsp_api.h"
77
#include "hal_data.h"
88
#include "r_gpio_w.h"
9+
#include "ra6w1_pin_ext.h"
910

1011
ioport_pin_cfg_t g_bsp_pin_cfg_data[] =
1112
{
@@ -258,6 +259,7 @@ ioport_pin_cfg_t g_bsp_pin_cfg_data[] =
258259
GPIO_W_CFG_PORT_DIRECTION_INPUT | GPIO_W_CFG_SLW_FAST,
259260
},
260261
#endif
262+
RA6W1_PIN_CFG_EXTRA
261263
{
262264
.pin = BSP_IO_PORT_01_PIN_16,
263265
.pin_cfg = GPIO_W_CFG_PERIPHERAL_PIN | GPIO_W_CFG_PORT_DIRECTION_INPUT |
@@ -355,6 +357,7 @@ static const char * const g_bsp_pin_cfg_name[] =
355357
"qspi.io2",
356358
"qspi.io3",
357359
#endif
360+
RA6W1_PIN_NAME_EXTRA
358361
"swd.swclk",
359362
"swd.swdio",
360363
};
@@ -640,7 +643,7 @@ void ra_w_pin_config_init(void)
640643
#ifdef BSP_USING_QSPI
641644
index += 6;
642645
#endif
643-
646+
index += RA6W1_PIN_COUNT_EXTRA;
644647
/* SWD pins are fixed and are always the last two entries. */
645648
index += 2;
646649
if (index != RA_W_PIN_CFG_COUNT)

‎bsp/renesas/ra6w1-ek/rtconfig.h‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
/* end of rt_strnlen options */
6565
/* end of klibc options */
66-
#define RT_NAME_MAX 12
66+
#define RT_NAME_MAX 32
6767
#define RT_CPUS_NR 1
6868
#define RT_ALIGN_SIZE 8
6969
#define RT_THREAD_PRIORITY_32
@@ -74,10 +74,10 @@
7474
#define RT_HOOK_USING_FUNC_PTR
7575
#define RT_USING_IDLE_HOOK
7676
#define RT_IDLE_HOOK_LIST_SIZE 4
77-
#define IDLE_THREAD_STACK_SIZE 256
77+
#define IDLE_THREAD_STACK_SIZE 512
7878
#define RT_USING_TIMER_SOFT
7979
#define RT_TIMER_THREAD_PRIO 4
80-
#define RT_TIMER_THREAD_STACK_SIZE 512
80+
#define RT_TIMER_THREAD_STACK_SIZE 1024
8181

8282
/* kservice options */
8383

@@ -100,14 +100,15 @@
100100

101101
#define RT_USING_SMALL_MEM
102102
#define RT_USING_SMALL_MEM_AS_HEAP
103+
#define RT_USING_HEAP_ISR
103104
#define RT_USING_HEAP
104105
/* end of Memory Management */
105106
#define RT_USING_DEVICE
106107
#define RT_USING_CONSOLE
107108
#define RT_CONSOLEBUF_SIZE 128
108109
#define RT_CONSOLE_DEVICE_NAME "uart0"
109110
#define RT_USING_CONSOLE_OUTPUT_CTL
110-
#define RT_VER_NUM 0x50300
111+
#define RT_VER_NUM 0x50301
111112
#define RT_BACKTRACE_LEVEL_MAX_NR 32
112113
/* end of RT-Thread Kernel */
113114
#define RT_USING_HW_ATOMIC
@@ -142,11 +143,19 @@
142143
/* DFS: device virtual file system */
143144

144145
/* end of DFS: device virtual file system */
146+
#define RT_USING_FAL
147+
#define FAL_USING_DEBUG
148+
#define FAL_PART_HAS_TABLE_CFG
149+
#define FAL_DEV_NAME_MAX 24
150+
#define FAL_DEV_BLK_MAX 6
145151

146152
/* Device Drivers */
147153

148154
#define RT_USING_DEVICE_IPC
149155
#define RT_UNAMED_PIPE_NUMBER 64
156+
#define RT_USING_SYSTEM_WORKQUEUE
157+
#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048
158+
#define RT_SYSTEM_WORKQUEUE_PRIORITY 15
150159
#define RT_USING_SERIAL
151160
#define RT_USING_SERIAL_V2
152161
#define RT_SERIAL_BUF_STRATEGY_OVERWRITE
@@ -430,6 +439,7 @@
430439

431440
/* On-chip Peripheral Port */
432441

442+
#define BSP_USING_OSPI_FLASH
433443
/* end of On-chip Peripheral Port */
434444
/* end of Hardware Drivers Config */
435445

‎bsp/renesas/ra6w1-ek/rtconfig.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
DEVICE = ' -mcpu=cortex-m33 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
4141
CFLAGS = DEVICE + ' -Dgcc'
4242
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
43-
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T script/fsp.ld -L script/'
43+
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler,--no-warn-execstack -T script/fsp.ld -L script/'
4444

4545
CPATH = ''
4646
LPATH = ''

‎bsp/renesas/ra6w1-ek/script/fsp.ld‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
INCLUDE memory_regions.ld
2+
INCLUDE rom_code_gcc.symbols
23
MEMORY
34
{
45
RAM (rwx) : ORIGIN = RAM_START, LENGTH = RAM_LENGTH
@@ -382,4 +383,3 @@ PROVIDE( _end = __HeapBase);
382383
PROVIDE( __end__ = __HeapBase);
383384

384385
ASSERT(__HeapBase <= __HeapLimit, "RAM overflow: no space left for RT-Thread heap");
385-

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL