doc(rt-thread): add more BSP supports (#3178)
* doc(rt-thread): add more BSP supports * improve sconscript
This commit is contained in:
committed by
GitHub
parent
c76a3d206e
commit
ca17c204d0
@@ -8,9 +8,11 @@
|
|||||||
|
|
||||||
## What is RT-Thread?
|
## What is RT-Thread?
|
||||||
|
|
||||||
|
[Introduce about RT-Thread and how to run LVGL on RT-Thread in simulators](https://www.youtube.com/watch?v=k7QYk6hSwnc)
|
||||||
|
|
||||||
[**RT-Thread**](https://www.rt-thread.io/) is an [open source](https://github.com/RT-Thread/rt-thread), neutral, and community-based real-time operating system (RTOS). RT-Thread has **Standard version** and **Nano version**. For resource-constrained microcontroller (MCU) systems, the Nano version that requires only 3 KB Flash and 1.2 KB RAM memory resources can be tailored with easy-to-use tools. For resource-rich IoT devices, RT-Thread can use the **online software package** management tool, together with system configuration tools, to achieve intuitive and rapid modular cutting, seamlessly import rich software packages; thus, achieving complex functions like Android's graphical interface and touch sliding effects, smart voice interaction effects, and so on.
|
[**RT-Thread**](https://www.rt-thread.io/) is an [open source](https://github.com/RT-Thread/rt-thread), neutral, and community-based real-time operating system (RTOS). RT-Thread has **Standard version** and **Nano version**. For resource-constrained microcontroller (MCU) systems, the Nano version that requires only 3 KB Flash and 1.2 KB RAM memory resources can be tailored with easy-to-use tools. For resource-rich IoT devices, RT-Thread can use the **online software package** management tool, together with system configuration tools, to achieve intuitive and rapid modular cutting, seamlessly import rich software packages; thus, achieving complex functions like Android's graphical interface and touch sliding effects, smart voice interaction effects, and so on.
|
||||||
|
|
||||||
Key features:
|
### Key features
|
||||||
|
|
||||||
- Designed for resource-constrained devices, the minimum kernel requires only 1.2KB of RAM and 3 KB of Flash.
|
- Designed for resource-constrained devices, the minimum kernel requires only 1.2KB of RAM and 3 KB of Flash.
|
||||||
- A variety of standard interfaces, such as POSIX, CMSIS, C++ application environment.
|
- A variety of standard interfaces, such as POSIX, CMSIS, C++ application environment.
|
||||||
@@ -22,7 +24,6 @@ Key features:
|
|||||||
- Supports a wide range of <a href="https://www.rt-thread.io/board.html">architectures and chips</a>.
|
- Supports a wide range of <a href="https://www.rt-thread.io/board.html">architectures and chips</a>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## How to run LVGL on RT-Thread?
|
## How to run LVGL on RT-Thread?
|
||||||
|
|
||||||
[中文文档](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/packages-manual/lvgl-docs/introduction)
|
[中文文档](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/packages-manual/lvgl-docs/introduction)
|
||||||
@@ -31,11 +32,16 @@ LVGL has registered as a [software package](https://packages.rt-thread.org/en/de
|
|||||||
|
|
||||||
| BSP | Note |
|
| BSP | Note |
|
||||||
| ------------------------------------------------------------ | ---- |
|
| ------------------------------------------------------------ | ---- |
|
||||||
| [QEMU simulator](https://github.com/RT-Thread/rt-thread/tree/master/bsp/qemu-vexpress-a9) | |
|
| [QEMU simulator](https://github.com/RT-Thread/rt-thread/tree/master/bsp/qemu-vexpress-a9/applications/lvgl) | |
|
||||||
| [Visual Studio simulator](https://github.com/RT-Thread/rt-thread/tree/master/bsp/simulator) | |
|
| [Visual Studio simulator](https://github.com/RT-Thread/rt-thread/tree/master/bsp/simulator/applications/lvgl) | |
|
||||||
|
| [Nuvoton numaker-iot-m487](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/numaker-iot-m487/applications/lvgl) | |
|
||||||
|
| [Nuvoton numaker-pfm-m487](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/numaker-pfm-m487/applications/lvgl) | |
|
||||||
| [Nuvoton nk-980iot](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/nk-980iot/applications/lvgl) | |
|
| [Nuvoton nk-980iot](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/nk-980iot/applications/lvgl) | |
|
||||||
|
| [Nuvoton numaker-m2354](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/numaker-m2354/applications/lvgl) | |
|
||||||
| [Nuvoton nk-n9h30](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/nk-n9h30/applications/lvgl) | |
|
| [Nuvoton nk-n9h30](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/nk-n9h30/applications/lvgl) | |
|
||||||
| [STM32L475 pandora](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32l475-atk-pandora) | |
|
| [Nuvoton numaker-m032ki](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nuvoton/numaker-m032ki/applications/lvgl) | |
|
||||||
|
| [NXP imxrt1060-evk](https://github.com/RT-Thread/rt-thread/tree/master/bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl) | |
|
||||||
|
| [STM32L475 pandora](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32l475-atk-pandora/applications/lvgl) | |
|
||||||
| [STM32F407 explorer](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32f407-atk-explorer/applications/lvgl) | |
|
| [STM32F407 explorer](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32f407-atk-explorer/applications/lvgl) | |
|
||||||
| [STM32F469 Discovery](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32f469-st-disco/applications/lvgl) | |
|
| [STM32F469 Discovery](https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32/stm32f469-st-disco/applications/lvgl) | |
|
||||||
| [Raspberry PICO](https://github.com/RT-Thread/rt-thread/tree/master/bsp/raspberry-pico/applications/lvgl) | |
|
| [Raspberry PICO](https://github.com/RT-Thread/rt-thread/tree/master/bsp/raspberry-pico/applications/lvgl) | |
|
||||||
|
|||||||
@@ -1,13 +1,24 @@
|
|||||||
from building import *
|
from building import *
|
||||||
import rtconfig
|
import rtconfig
|
||||||
import os
|
import os
|
||||||
import shutil
|
|
||||||
|
|
||||||
# get current dir path
|
|
||||||
cwd = GetCurrentDir()
|
|
||||||
|
|
||||||
src = []
|
src = []
|
||||||
inc = []
|
inc = []
|
||||||
|
group = []
|
||||||
|
|
||||||
|
cwd = GetCurrentDir() # get current dir path
|
||||||
|
|
||||||
|
port_src = Glob('*.c')
|
||||||
|
port_inc = [cwd]
|
||||||
|
group = group + DefineGroup('LVGL-port', port_src, depend = ['PKG_USING_LVGL'], CPPPATH = port_inc)
|
||||||
|
|
||||||
|
# check if .h or .hpp files exsit
|
||||||
|
def check_h_hpp_exsit(path):
|
||||||
|
file_dirs = os.listdir(path)
|
||||||
|
for file_dir in file_dirs:
|
||||||
|
if os.path.splitext(file_dir)[1] in ['.h', '.hpp']:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
lvgl_cwd = cwd + '/../../'
|
lvgl_cwd = cwd + '/../../'
|
||||||
|
|
||||||
@@ -15,24 +26,31 @@ lvgl_src_cwd = lvgl_cwd + 'src/'
|
|||||||
inc = inc + [lvgl_src_cwd]
|
inc = inc + [lvgl_src_cwd]
|
||||||
for root, dirs, files in os.walk(lvgl_src_cwd):
|
for root, dirs, files in os.walk(lvgl_src_cwd):
|
||||||
for dir in dirs:
|
for dir in dirs:
|
||||||
src = src + Glob(os.path.join(root,dir,'*.c'))
|
current_path = os.path.join(root, dir)
|
||||||
inc = inc + [os.path.join(root,dir)]
|
src = src + Glob(os.path.join(current_path,'*.c')) # add all .c files
|
||||||
|
if check_h_hpp_exsit(current_path): # add .h and .hpp path
|
||||||
|
inc = inc + [current_path]
|
||||||
|
|
||||||
|
|
||||||
if GetDepend('PKG_USING_LVGL_EXAMPLES'):
|
if GetDepend('PKG_USING_LVGL_EXAMPLES'):
|
||||||
lvgl_src_cwd = lvgl_cwd + 'examples/'
|
lvgl_src_cwd = lvgl_cwd + 'examples/'
|
||||||
inc = inc + [lvgl_src_cwd]
|
inc = inc + [lvgl_src_cwd]
|
||||||
for root, dirs, files in os.walk(lvgl_src_cwd):
|
for root, dirs, files in os.walk(lvgl_src_cwd):
|
||||||
for dir in dirs:
|
for dir in dirs:
|
||||||
src = src + Glob(os.path.join(root,dir,'*.c'))
|
current_path = os.path.join(root, dir)
|
||||||
inc = inc + [os.path.join(root,dir)]
|
src = src + Glob(os.path.join(current_path,'*.c'))
|
||||||
|
if check_h_hpp_exsit(current_path):
|
||||||
|
inc = inc + [current_path]
|
||||||
|
|
||||||
if GetDepend('PKG_USING_LVGL_DEMOS'):
|
if GetDepend('PKG_USING_LVGL_DEMOS'):
|
||||||
lvgl_src_cwd = lvgl_cwd + 'demos/'
|
lvgl_src_cwd = lvgl_cwd + 'demos/'
|
||||||
inc = inc + [lvgl_src_cwd]
|
inc = inc + [lvgl_src_cwd]
|
||||||
for root, dirs, files in os.walk(lvgl_src_cwd):
|
for root, dirs, files in os.walk(lvgl_src_cwd):
|
||||||
for dir in dirs:
|
for dir in dirs:
|
||||||
src = src + Glob(os.path.join(root,dir,'*.c'))
|
current_path = os.path.join(root, dir)
|
||||||
inc = inc + [os.path.join(root,dir)]
|
src = src + Glob(os.path.join(current_path,'*.c'))
|
||||||
|
if check_h_hpp_exsit(current_path):
|
||||||
|
inc = inc + [current_path]
|
||||||
|
|
||||||
LOCAL_CCFLAGS = ''
|
LOCAL_CCFLAGS = ''
|
||||||
if rtconfig.PLATFORM == 'gcc': # GCC
|
if rtconfig.PLATFORM == 'gcc': # GCC
|
||||||
@@ -42,11 +60,7 @@ elif rtconfig.PLATFORM == 'armcc': # Keil AC5
|
|||||||
elif rtconfig.PLATFORM == 'armclang': # Keil AC6
|
elif rtconfig.PLATFORM == 'armclang': # Keil AC6
|
||||||
LOCAL_CCFLAGS += ' -std=c99 -g -w'
|
LOCAL_CCFLAGS += ' -std=c99 -g -w'
|
||||||
|
|
||||||
group = DefineGroup('LVGL', src, depend = ['PKG_USING_LVGL'], CPPPATH = inc, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
|
group = group + DefineGroup('LVGL', src, depend = ['PKG_USING_LVGL'], CPPPATH = inc, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
|
||||||
|
|
||||||
port_src = Glob('*.c')
|
|
||||||
port_inc = [cwd]
|
|
||||||
group = group + DefineGroup('LVGL-port', port_src, depend = ['PKG_USING_LVGL'], CPPPATH = port_inc)
|
|
||||||
|
|
||||||
list = os.listdir(cwd)
|
list = os.listdir(cwd)
|
||||||
for d in list:
|
for d in list:
|
||||||
@@ -54,27 +68,4 @@ for d in list:
|
|||||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||||
group = group + SConscript(os.path.join(d, 'SConscript'))
|
group = group + SConscript(os.path.join(d, 'SConscript'))
|
||||||
|
|
||||||
#
|
|
||||||
# try:
|
|
||||||
# shutil.rmtree(os.path.join(lvgl_cwd, '.github'))
|
|
||||||
# shutil.rmtree(os.path.join(lvgl_cwd, 'docs'))
|
|
||||||
# shutil.rmtree(os.path.join(lvgl_cwd, 'scripts'))
|
|
||||||
# shutil.rmtree(os.path.join(lvgl_cwd, 'tests'))
|
|
||||||
# shutil.rmtree(os.path.join(lvgl_cwd, 'zephyr'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, '.codecov.yml'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, '.editorconfig'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, '.gitignore'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, '.gitmodules'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, 'CMakeLists.txt'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, 'component.mk'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, 'idf_component.yml'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, 'Kconfig'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, 'library.json'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, 'library.properties'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, 'lv_conf_template.h'))
|
|
||||||
# os.remove(os.path.join(lvgl_cwd, 'lvgl.mk'))
|
|
||||||
# except:
|
|
||||||
# pass
|
|
||||||
#
|
|
||||||
|
|
||||||
Return('group')
|
Return('group')
|
||||||
|
|||||||
Reference in New Issue
Block a user