[Renesas]Add use lvgl document
@ -1,8 +1,8 @@
|
||||
# 瑞萨 CPK-RA6M3 开发板 BSP 说明
|
||||
# 瑞萨 EK-RA6M3 开发板 BSP 说明
|
||||
|
||||
## 简介
|
||||
|
||||
本文档为瑞萨 CPK-RA6M3 开发板提供的 BSP (板级支持包) 说明。通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。
|
||||
本文档为瑞萨 EK-RA6M3 开发板提供的 BSP (板级支持包) 说明。通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。
|
||||
|
||||
主要内容如下:
|
||||
|
||||
@ -121,9 +121,9 @@ void hal_entry(void)
|
||||
需要修改瑞萨的 BSP 外设配置或添加新的外设端口,需要用到瑞萨的 [FSP](https://www2.renesas.cn/jp/zh/software-tool/flexible-software-package-fsp#document) 配置工具。请务必按照如下步骤完成配置。配置中有任何问题可到[RT-Thread 社区论坛](https://club.rt-thread.org/)中提问。
|
||||
|
||||
1. [下载灵活配置软件包 (FSP) | Renesas](https://www.renesas.com/cn/zh/software-tool/flexible-software-package-fsp),请使用 FSP 3.5.0 版本
|
||||
2. 下载安装完成后,需要添加 CPK-RA6M3 开发板的官方板级支持包
|
||||
> 打开[ CPK-RA6M3 开发板详情页](https://www.renesas.cn/cn/zh/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra6m3-evaluation-kit-ra6m3-mcu-group#document),在 **“下载”** 列表中找到 **”CPK-RA6M3板级支持包“** ,点击链接即可下载
|
||||
3. 如何将 **”CPK-RA6M3板级支持包“**添加到 FSP 中,请参考文档[如何导入板级支持包](https://www2.renesas.cn/document/ppt/1527171?language=zh&r=1527191)
|
||||
2. 下载安装完成后,需要添加 EK-RA6M3 开发板的官方板级支持包
|
||||
> 打开[ EK-RA6M3 开发板详情页](https://www.renesas.cn/cn/zh/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra6m3-evaluation-kit-ra6m3-mcu-group#document),在 **“下载”** 列表中找到 **” EK-RA6M3板级支持包“** ,点击链接即可下载
|
||||
3. 如何将 **”EK-RA6M3板级支持包“**添加到 FSP 中,请参考文档[如何导入板级支持包](https://www2.renesas.cn/document/ppt/1527171?language=zh&r=1527191)
|
||||
4. 请查看文档:[使用 FSP 配置外设驱动](../docs/RA系列使用FSP配置外设驱动.md),在 MDK 中通过添加自定义命名来打开当前工程的 FSP 配置。
|
||||
|
||||
**ENV 配置**
|
||||
@ -144,4 +144,4 @@ void hal_entry(void)
|
||||
|
||||
## 贡献代码
|
||||
|
||||
如果您对 CPK-RA6M3 感兴趣,并且有一些好玩的项目愿意与大家分享的话欢迎给我们贡献代码,您可以参考 [如何向 RT-Thread 代码贡献](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/development-guide/github/github)。
|
||||
如果您对 EK-RA6M3 感兴趣,并且有一些好玩的项目愿意与大家分享的话欢迎给我们贡献代码,您可以参考 [如何向 RT-Thread 代码贡献](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/development-guide/github/github)。
|
||||
|
@ -50,24 +50,49 @@ menu "Hardware Drivers Config"
|
||||
endif
|
||||
endif
|
||||
|
||||
config BSP_USING_LCD
|
||||
bool "Enable LCD"
|
||||
select BSP_USING_GPIO
|
||||
menuconfig BSP_USING_FS
|
||||
bool "Enable File System"
|
||||
select RT_USING_DFS
|
||||
default n
|
||||
|
||||
if BSP_USING_FS
|
||||
config BSP_USING_SDCARD_FATFS
|
||||
bool "Enable SDCARD (FATFS)"
|
||||
select BSP_USING_SPI
|
||||
select BSP_USING_SPI1
|
||||
select RT_USING_SPI_MSD
|
||||
select RT_USING_DFS_ELMFAT
|
||||
default n
|
||||
endif
|
||||
|
||||
config BSP_USING_LVGL
|
||||
bool "Enable LVGL for LCD"
|
||||
select PKG_USING_LVGL
|
||||
select BSP_USING_TOUCH
|
||||
default n
|
||||
|
||||
if BSP_USING_LVGL
|
||||
config BSP_USING_LVGL_DEMO
|
||||
bool "Enable LVGL demo"
|
||||
select PKG_USING_LV_MUSIC_DEMO
|
||||
default y
|
||||
menuconfig BSP_USING_PWM
|
||||
bool "Enable PWM"
|
||||
default n
|
||||
select RT_USING_PWM
|
||||
if BSP_USING_PWM
|
||||
config BSP_USING_PWM12
|
||||
bool "Enable GPT12 (16-Bits) output PWM"
|
||||
default n
|
||||
endif
|
||||
|
||||
config BSP_USING_LCD
|
||||
bool "Enable LCD"
|
||||
select BSP_USING_GPIO
|
||||
default n
|
||||
|
||||
config BSP_USING_LVGL
|
||||
bool "Enable LVGL for LCD"
|
||||
select BSP_USING_LCD
|
||||
select PKG_USING_LVGL
|
||||
default n
|
||||
|
||||
if BSP_USING_LVGL
|
||||
config BSP_USING_LVGL_DEMO
|
||||
bool "Enable LVGL demo"
|
||||
select PKG_USING_LV_MUSIC_DEMO
|
||||
default y
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Board extended module Drivers"
|
||||
|
@ -33,7 +33,7 @@ static rt_device_t device;
|
||||
static struct rt_device_graphic_info info;
|
||||
static rt_sem_t trans_done_semphr = RT_NULL;
|
||||
|
||||
void _rm_guix_port_display_callback(display_callback_args_t *p_args)
|
||||
void _ra_port_display_callback(display_callback_args_t *p_args)
|
||||
{
|
||||
if (lvgl_ready_done != RT_EOK)
|
||||
return;
|
||||
|
53
bsp/renesas/ra6m3-ek/docs/lvgl使用文档.md
Normal file
@ -0,0 +1,53 @@
|
||||
# EK-RA6M3-lvgl 使用文档
|
||||
|
||||
## ENV 配置
|
||||
|
||||
首先在BSP目录下打开env工具,输入 `menuconfig` 进入配置界面
|
||||
|
||||

|
||||
|
||||
在 `Hardware Drivers Config → On-chip Peripheral Drivers` 中使能 `Enable LVGL for LCD` 选项
|
||||
|
||||

|
||||
|
||||
接下来退出菜单界面,输入 `pkgs --update` 命令手动联网获取 lvgl 的软件包到 `packages` 文件夹下
|
||||
|
||||

|
||||
|
||||
接着在env 终端中输入 `scons --target=mdk5` 生成 mdk 工程
|
||||
|
||||

|
||||
|
||||
## fsp 中配置 lcd 外设
|
||||
|
||||
点击 mdk 中的 `Tools->RA Smart Configurator` 进入 rasc 配置软件
|
||||
|
||||

|
||||
|
||||
点击 New Stack,选择 `Graphics->Graphics LCD`,使能 LCD 外设
|
||||
|
||||

|
||||
|
||||
在 `Interrupt->Callback Function` 中,设置中断回调函数,输入 :`_ra_port_display_callback`
|
||||
|
||||

|
||||
|
||||
在 `Input->Graphics Layer 1->Framebuffer` 中,将 `Number of framebuffers` 属性设置为1,其他选项默认
|
||||
|
||||

|
||||
|
||||
接着我们配置 LCD 的引脚属性,进入 Pins 界面按照下图进行配置:
|
||||
|
||||

|
||||
|
||||
接着向下拉,按照下图配置 LCD_TCONx 引脚:
|
||||
|
||||

|
||||
|
||||
完成以上配置后,点击 `Generate Project Content` 生成配置相关代码
|
||||
|
||||

|
||||
|
||||
退出 rasc 后,在 mdk 中进行编译,下载即可
|
||||
|
||||

|
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/00.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/01.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/02.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/03.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/04.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/05.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/06.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/07.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/08.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/09.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/10.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
bsp/renesas/ra6m3-ek/docs/picture/lvgl/11.png
Normal file
After Width: | Height: | Size: 4.1 KiB |