From 26fbe01adaf80594239effb130b8bda35a53a06c Mon Sep 17 00:00:00 2001 From: Rbb666 Date: Thu, 23 Nov 2023 16:48:12 +0800 Subject: [PATCH] =?UTF-8?q?[bsp][renesas]=E4=BD=BF=E7=94=A8=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=B7=BB=E5=8A=A0fsp=E8=AF=B4=E6=98=8E=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=8B=E8=BD=BD=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/renesas/ra8m1-ek/.config | 9 +- bsp/renesas/ra8m1-ek/README.md | 8 + bsp/renesas/ra8m1-ek/project.uvoptx | 555 +------------------------- bsp/renesas/ra8m1-ek/project.uvprojx | 255 ++++++++---- bsp/renesas/ra8m1-ek/rtconfig.h | 4 +- bsp/renesas/ra8m1-ek/template.uvoptx | 5 + bsp/renesas/ra8m1-ek/template.uvprojx | 13 +- 7 files changed, 213 insertions(+), 636 deletions(-) diff --git a/bsp/renesas/ra8m1-ek/.config b/bsp/renesas/ra8m1-ek/.config index 4a01a0359d..26e4067eaf 100644 --- a/bsp/renesas/ra8m1-ek/.config +++ b/bsp/renesas/ra8m1-ek/.config @@ -38,7 +38,7 @@ CONFIG_RT_TIMER_THREAD_STACK_SIZE=512 CONFIG_RT_USING_DEBUG=y CONFIG_RT_DEBUGING_COLOR=y CONFIG_RT_DEBUGING_CONTEXT=y -CONFIG_RT_DEBUGING_INIT=y +# CONFIG_RT_DEBUGING_AUTO_INIT is not set # # Inter-Thread communication @@ -1047,5 +1047,12 @@ CONFIG_BSP_UART9_TX_BUFSIZE=0 # CONFIG_BSP_USING_SCI is not set # CONFIG_BSP_USING_SPI is not set # CONFIG_BSP_USING_I2C is not set +# CONFIG_BSP_USING_ADC is not set +# CONFIG_BSP_USING_DAC is not set # CONFIG_BSP_USING_FS is not set # CONFIG_BSP_USING_PWM is not set + +# +# Board extended module Drivers +# +# CONFIG_BSP_USING_RW007 is not set diff --git a/bsp/renesas/ra8m1-ek/README.md b/bsp/renesas/ra8m1-ek/README.md index eeea0d9d07..8b22711a42 100644 --- a/bsp/renesas/ra8m1-ek/README.md +++ b/bsp/renesas/ra8m1-ek/README.md @@ -62,6 +62,14 @@ * armclang(AC6 V6.19) * LLVM(V16/17)[ARM-software/LLVM-embedded-toolchain-for-Arm (github.com)](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/tag/release-17.0.1) +## FSP版本说明 + +本BSP使用的是FSP5.0.0版本,进行外设相关开发需要下载并安装。 + +* 下载链接:[rasc-5.0.0](https://github.com/renesas/fsp/releases/download/v5.0.0/setup_fsp_v5_0_0_rasc_v2023-10.exe) + +* 注意:BSP默认是最小系统,若需添加/使能其他外设需参考:[外设驱动使用教程 (rt-thread.org)](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/tutorial/make-bsp/renesas-ra/RA系列BSP外设驱动使用教程) + ### 快速上手 #### 1、使用 MDK 编译: diff --git a/bsp/renesas/ra8m1-ek/project.uvoptx b/bsp/renesas/ra8m1-ek/project.uvoptx index b565f60d9e..defc514bdd 100644 --- a/bsp/renesas/ra8m1-ek/project.uvoptx +++ b/bsp/renesas/ra8m1-ek/project.uvoptx @@ -117,6 +117,11 @@ Segger\JL2CM3.dll + + 0 + JL2CM3 + -U1087305334 -O14 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight JTAG-DP") -D00(6BA00477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD22000000 -FC2000 -FN3 -FF0RA8M1_2M -FS02000000 -FL01F8000 -FP0($$Device:R7FA8M1AH$Flash\RA8M1_2M.FLM) -FF1RA8M1_CCONF -FS1300A100 -FL1200 -FP1($$Device:R7FA8M1AH$Flash\RA8M1_CCONF.FLM) -FF2RA8M1_DATA_C2M -FS227000000 -FL23000 -FP2($$Device:R7FA8M1AH$Flash\RA8M1_DATA_C2M.FLM) + 0 UL2V8M @@ -170,555 +175,11 @@ - Compiler + Source Group 1 0 0 0 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\armlibc\syscall_mem.c - syscall_mem.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\armlibc\syscalls.c - syscalls.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cctype.c - cctype.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cstdlib.c - cstdlib.c - 0 - 0 - - - 1 - 5 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cstring.c - cstring.c - 0 - 0 - - - 1 - 6 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\ctime.c - ctime.c - 0 - 0 - - - 1 - 7 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cunistd.c - cunistd.c - 0 - 0 - - - 1 - 8 - 1 - 0 - 0 - 0 - ..\..\..\components\libc\compilers\common\cwchar.c - cwchar.c - 0 - 0 - - - - - CPU - 0 - 0 - 0 - 0 - - 2 - 9 - 1 - 0 - 0 - 0 - ..\..\..\libcpu\arm\common\atomic_arm.c - atomic_arm.c - 0 - 0 - - - 2 - 10 - 1 - 0 - 0 - 0 - ..\..\..\libcpu\arm\common\div0.c - div0.c - 0 - 0 - - - 2 - 11 - 1 - 0 - 0 - 0 - ..\..\..\libcpu\arm\common\showmem.c - showmem.c - 0 - 0 - - - 2 - 12 - 2 - 0 - 0 - 0 - ..\..\..\libcpu\arm\cortex-m85\context_gcc.S - context_gcc.S - 0 - 0 - - - 2 - 13 - 1 - 0 - 0 - 0 - ..\..\..\libcpu\arm\cortex-m85\cpuport.c - cpuport.c - 0 - 0 - - - - - DeviceDrivers - 0 - 0 - 0 - 0 - - 3 - 14 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\core\device.c - device.c - 0 - 0 - - - 3 - 15 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\completion.c - completion.c - 0 - 0 - - - 3 - 16 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\dataqueue.c - dataqueue.c - 0 - 0 - - - 3 - 17 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\pipe.c - pipe.c - 0 - 0 - - - 3 - 18 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\ringblk_buf.c - ringblk_buf.c - 0 - 0 - - - 3 - 19 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\ringbuffer.c - ringbuffer.c - 0 - 0 - - - 3 - 20 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\waitqueue.c - waitqueue.c - 0 - 0 - - - 3 - 21 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\ipc\workqueue.c - workqueue.c - 0 - 0 - - - 3 - 22 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\misc\pin.c - pin.c - 0 - 0 - - - 3 - 23 - 1 - 0 - 0 - 0 - ..\..\..\components\drivers\serial\serial_v2.c - serial_v2.c - 0 - 0 - - - - - Drivers - 0 - 0 - 0 - 0 - - 4 - 24 - 1 - 0 - 0 - 0 - board\ra8_it.c - ra8_it.c - 0 - 0 - - - 4 - 25 - 1 - 0 - 0 - 0 - ..\libraries\HAL_Drivers\drv_common.c - drv_common.c - 0 - 0 - - - 4 - 26 - 1 - 0 - 0 - 0 - ..\libraries\HAL_Drivers\drv_gpio.c - drv_gpio.c - 0 - 0 - - - 4 - 27 - 1 - 0 - 0 - 0 - ..\libraries\HAL_Drivers\drv_usart_v2.c - drv_usart_v2.c - 0 - 0 - - - - - Finsh - 0 - 0 - 0 - 0 - - 5 - 28 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\shell.c - shell.c - 0 - 0 - - - 5 - 29 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\msh.c - msh.c - 0 - 0 - - - 5 - 30 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\msh_parse.c - msh_parse.c - 0 - 0 - - - 5 - 31 - 1 - 0 - 0 - 0 - ..\..\..\components\finsh\cmd.c - cmd.c - 0 - 0 - - - - - Kernel - 0 - 0 - 0 - 0 - - 6 - 32 - 1 - 0 - 0 - 0 - ..\..\..\src\clock.c - clock.c - 0 - 0 - - - 6 - 33 - 1 - 0 - 0 - 0 - ..\..\..\src\components.c - components.c - 0 - 0 - - - 6 - 34 - 1 - 0 - 0 - 0 - ..\..\..\src\idle.c - idle.c - 0 - 0 - - - 6 - 35 - 1 - 0 - 0 - 0 - ..\..\..\src\ipc.c - ipc.c - 0 - 0 - - - 6 - 36 - 1 - 0 - 0 - 0 - ..\..\..\src\irq.c - irq.c - 0 - 0 - - - 6 - 37 - 1 - 0 - 0 - 0 - ..\..\..\src\kservice.c - kservice.c - 0 - 0 - - - 6 - 38 - 1 - 0 - 0 - 0 - ..\..\..\src\mem.c - mem.c - 0 - 0 - - - 6 - 39 - 1 - 0 - 0 - 0 - ..\..\..\src\object.c - object.c - 0 - 0 - - - 6 - 40 - 1 - 0 - 0 - 0 - ..\..\..\src\scheduler_up.c - scheduler_up.c - 0 - 0 - - - 6 - 41 - 1 - 0 - 0 - 0 - ..\..\..\src\thread.c - thread.c - 0 - 0 - - - 6 - 42 - 1 - 0 - 0 - 0 - ..\..\..\src\timer.c - timer.c - 0 - 0 - @@ -728,8 +189,8 @@ 0 0 - 7 - 43 + 2 + 1 1 0 0 diff --git a/bsp/renesas/ra8m1-ek/project.uvprojx b/bsp/renesas/ra8m1-ek/project.uvprojx index 460145311e..1ce4c0c3ff 100644 --- a/bsp/renesas/ra8m1-ek/project.uvprojx +++ b/bsp/renesas/ra8m1-ek/project.uvprojx @@ -1,10 +1,7 @@ - 2.1 -
### uVision Project, (C) Keil Software
- Target 1 @@ -19,28 +16,28 @@ Renesas.RA_DFP.5.0.0 https://www2.renesas.eu/Keil_MDK_Packs/ CPUTYPE("Cortex-M85") DSP TZ MVE(FP) FPU3(DFPU) PACBTI CLOCK(12000000) ELITTLE - - - + + + 0 - - - - - - - - - - + + + + + + + + + + $$Device:R7FA8M1AH$SVD\R7FA8M1AH.svd 0 0 - - - - - + + + + + 0 0 @@ -49,7 +46,7 @@ 1 .\Objects\ - ra8m1 + rtthread 1 0 1 @@ -62,8 +59,8 @@ 0 0 - - + + 0 0 0 @@ -72,8 +69,8 @@ 0 0 - - + + 0 0 0 @@ -83,14 +80,14 @@ 1 0 cmd /c "start "Renesas" /w cmd /c ""$Slauncher\rasc_launcher.bat" "$Prasc_version.txt" -nosplash --launcher.suppressErrors --gensmartbundle --compiler ARMv6 "$Pconfiguration.xml" "$L%L" 2> "%%TEMP%%\rasc_stderr.out""" - + 0 0 2 0 0 - + 0 @@ -104,8 +101,8 @@ 0 0 3 - - + + 1 @@ -129,20 +126,20 @@ - 0 - 1 + 1 + 0 0 0 1 -1 1 - + "" () - - - - + + + + 0 @@ -175,7 +172,7 @@ 0 0 "Cortex-M85" - + 0 0 0 @@ -310,7 +307,7 @@ 0x0 - + 1 @@ -339,8 +336,8 @@ -Wno-license-management -Wuninitialized -Wall -Wmissing-declarations -Wpointer-arith -Waggregate-return -Wfloat-equal RT_USING_LIBC, RT_USING_ARMLIBC, __STDC_LIMIT_MACROS, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND - - board\ports;..\..\..\components\finsh;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\include;..\..\..\components\libc\posix\io\eventfd;..\libraries\HAL_Drivers\config;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m85;..\..\..\components\libc\posix\io\epoll;..\libraries\HAL_Drivers;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\extension;board;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\compilers\common\include;. + + board\ports;..\..\..\components\finsh;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\include;..\..\..\components\libc\posix\io\eventfd;..\libraries\HAL_Drivers\config;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m85;..\..\..\components\libc\posix\io\epoll;..\libraries\HAL_Drivers;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\extension;board;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\compilers\common\include;board\ports\wifi;. @@ -355,10 +352,10 @@ 0 2 - - - - + + + + @@ -368,14 +365,14 @@ 0 0 0 - - - + + + .\script\fsp.scat - - - - + + + + 6319,6314 @@ -389,36 +386,50 @@ 1 ..\..\..\components\libc\compilers\armlibc\syscall_mem.c
+ + syscalls.c 1 ..\..\..\components\libc\compilers\armlibc\syscalls.c + + cctype.c 1 ..\..\..\components\libc\compilers\common\cctype.c + + cstdlib.c 1 ..\..\..\components\libc\compilers\common\cstdlib.c + + cstring.c 1 ..\..\..\components\libc\compilers\common\cstring.c + + ctime.c 1 ..\..\..\components\libc\compilers\common\ctime.c + + cunistd.c 1 ..\..\..\components\libc\compilers\common\cunistd.c + + cwchar.c 1 @@ -434,21 +445,29 @@ 1 ..\..\..\libcpu\arm\common\atomic_arm.c + + div0.c 1 ..\..\..\libcpu\arm\common\div0.c + + showmem.c 1 ..\..\..\libcpu\arm\common\showmem.c + + context_gcc.S 2 ..\..\..\libcpu\arm\cortex-m85\context_gcc.S + + cpuport.c 1 @@ -464,46 +483,64 @@ 1 ..\..\..\components\drivers\core\device.c + + completion.c 1 ..\..\..\components\drivers\ipc\completion.c + + dataqueue.c 1 ..\..\..\components\drivers\ipc\dataqueue.c + + pipe.c 1 ..\..\..\components\drivers\ipc\pipe.c + + ringblk_buf.c 1 ..\..\..\components\drivers\ipc\ringblk_buf.c + + ringbuffer.c 1 ..\..\..\components\drivers\ipc\ringbuffer.c + + waitqueue.c 1 ..\..\..\components\drivers\ipc\waitqueue.c + + workqueue.c 1 ..\..\..\components\drivers\ipc\workqueue.c + + pin.c 1 ..\..\..\components\drivers\misc\pin.c + + serial_v2.c 1 @@ -518,21 +555,75 @@ ra8_it.c 1 board\ra8_it.c + + + + + -std=c99 + + + + + + + + + drv_common.c 1 ..\libraries\HAL_Drivers\drv_common.c + + + + + -std=c99 + + + + + + + + + drv_gpio.c 1 ..\libraries\HAL_Drivers\drv_gpio.c + + + + + -std=c99 + + + + + + + + + drv_usart_v2.c 1 ..\libraries\HAL_Drivers\drv_usart_v2.c + + + + + -std=c99 + + + + + + +
@@ -544,16 +635,22 @@ 1 ..\..\..\components\finsh\shell.c + + msh.c 1 ..\..\..\components\finsh\msh.c + + msh_parse.c 1 ..\..\..\components\finsh\msh_parse.c + + cmd.c 1 @@ -569,51 +666,71 @@ 1 ..\..\..\src\clock.c + + components.c 1 ..\..\..\src\components.c + + idle.c 1 ..\..\..\src\idle.c + + ipc.c 1 ..\..\..\src\ipc.c + + irq.c 1 ..\..\..\src\irq.c + + kservice.c 1 ..\..\..\src\kservice.c + + mem.c 1 ..\..\..\src\mem.c + + object.c 1 ..\..\..\src\object.c + + scheduler_up.c 1 ..\..\..\src\scheduler_up.c + + thread.c 1 ..\..\..\src\thread.c + + timer.c 1 @@ -621,50 +738,26 @@ - - :Renesas RA Smart Configurator:Common Sources - - - hal_entry.c - 1 - .\src\hal_entry.c - - - - - ::Flex Software - - - + - + - + - + - + - - - - - project - 1 - - - - diff --git a/bsp/renesas/ra8m1-ek/rtconfig.h b/bsp/renesas/ra8m1-ek/rtconfig.h index 088caf69a5..7d04619e10 100644 --- a/bsp/renesas/ra8m1-ek/rtconfig.h +++ b/bsp/renesas/ra8m1-ek/rtconfig.h @@ -27,7 +27,6 @@ #define RT_USING_DEBUG #define RT_DEBUGING_COLOR #define RT_DEBUGING_CONTEXT -#define RT_DEBUGING_INIT /* Inter-Thread communication */ @@ -258,4 +257,7 @@ #define BSP_UART9_RX_BUFSIZE 256 #define BSP_UART9_TX_BUFSIZE 0 +/* Board extended module Drivers */ + + #endif diff --git a/bsp/renesas/ra8m1-ek/template.uvoptx b/bsp/renesas/ra8m1-ek/template.uvoptx index 440395c261..defc514bdd 100644 --- a/bsp/renesas/ra8m1-ek/template.uvoptx +++ b/bsp/renesas/ra8m1-ek/template.uvoptx @@ -117,6 +117,11 @@ Segger\JL2CM3.dll + + 0 + JL2CM3 + -U1087305334 -O14 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight JTAG-DP") -D00(6BA00477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD22000000 -FC2000 -FN3 -FF0RA8M1_2M -FS02000000 -FL01F8000 -FP0($$Device:R7FA8M1AH$Flash\RA8M1_2M.FLM) -FF1RA8M1_CCONF -FS1300A100 -FL1200 -FP1($$Device:R7FA8M1AH$Flash\RA8M1_CCONF.FLM) -FF2RA8M1_DATA_C2M -FS227000000 -FL23000 -FP2($$Device:R7FA8M1AH$Flash\RA8M1_DATA_C2M.FLM) + 0 UL2V8M diff --git a/bsp/renesas/ra8m1-ek/template.uvprojx b/bsp/renesas/ra8m1-ek/template.uvprojx index 4da4b113ff..eacae61113 100644 --- a/bsp/renesas/ra8m1-ek/template.uvprojx +++ b/bsp/renesas/ra8m1-ek/template.uvprojx @@ -16,7 +16,8 @@ R7FA8M1AH Renesas - Renesas.RA_DFP.4.6.0 + Renesas.RA_DFP.5.0.0 + https://www2.renesas.eu/Keil_MDK_Packs/ CPUTYPE("Cortex-M85") DSP TZ MVE(FP) FPU3(DFPU) PACBTI CLOCK(12000000) ELITTLE @@ -32,7 +33,7 @@ - + $$Device:R7FA8M1AH$SVD\R7FA8M1AH.svd 0 0 @@ -48,7 +49,7 @@ 1 .\Objects\ - ra8m1 + rtthread 1 0 1 @@ -128,8 +129,8 @@ - 0 - 1 + 1 + 0 0 0 1 @@ -411,7 +412,7 @@ - +