Compare commits

..

10 Commits

Author SHA1 Message Date
5dbc2a9eb6 Adding app to reproduce error. 2024-11-16 15:36:57 +01:00
Neo Xu
0090cef718 lvgl: upgrade to release/v9.2.1
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-25 17:21:00 +02:00
wanggang26
a2e76247fb resetcause:restore to factory, factory to factory_inquiry
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-25 16:13:30 +02:00
dulibo1
e0989d950f pmconfig:fix coverity scan issue which is unsigned_compare
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-10-25 16:13:30 +02:00
dulibo1
7893712622 drivertest:add include file depended by cmocka
from the cmocka.h:
 * These headers or their equivalents MUST be included prior to including
 * this header file.
 * @code
 * #include <stdarg.h>
 * #include <stddef.h>
 * #include <stdint.h>
 * #include <setjmp.h>
 * @endcode

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-25 16:13:30 +02:00
dulibo1
893ac88f97 batterydump:move to system dir
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-10-25 16:13:30 +02:00
dulibo1
8e938957c2 gpio:add example for wakeup gpio type
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-10-25 16:13:30 +02:00
dulibo1
734baae5a2 test case update follow the regualtor framework
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-10-25 16:13:30 +02:00
Bowen Wang
bbba2448cd nsh_syscmds/rpmsg: include <nuttx/rpmsg/rpmsg.h> to fix compile error
nsh_syscmds.c: In function ‘cmd_rpmsg_once’:
nsh_syscmds.c:567:13: error: ‘RPMSGIOC_PANIC’ undeclared (first use in this function)
  567 |       cmd = RPMSGIOC_PANIC;
      |             ^~~~~~~~~~~~~~
nsh_syscmds.c:567:13: note: each undeclared identifier is reported only once for each function it appears in
nsh_syscmds.c:571:13: error: ‘RPMSGIOC_DUMP’ undeclared (first use in this function); did you mean ‘FIOC_DUMP’?
  571 |       cmd = RPMSGIOC_DUMP;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-25 16:13:30 +02:00
Yongrong Wang
82fb1a4511 nsh_syscmds.c: upadate rpmsg ping help
1. struct rpmsg_ping_s ack change to cmd;
2. Update the help descrption based on the new cmd
   meaning;

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-25 16:13:30 +02:00
18 changed files with 1534 additions and 155 deletions

45
.gitignore vendored
View File

@ -1,45 +0,0 @@
*.a
*.adb
*.asm
*.dSYM
*.exe
*.gcno
*.gcda
*.hobj
*.i
*.inf
*.lib
*.lst
*.o
*.wo
*.obj
*.rel
*.src
*.swp
*.sym
*.su
*~
.built
.context
.depend
.kconfig
*.lock
/bin
/boot_romfsimg.h
/external
/Kconfig
/romfs.img
/staging
/symtab_apps.c
/wasm
cscope.out
Make.dep
.context
# nuttx/$(TOPDIR)/Makefile.[unix|win]::$(DIRLINKS_EXTERNAL_DIRS)
.dirlinks
.vscode
.DS_Store
build
.ccls-cache
compile_commands.json
.aider*

View File

@ -67,6 +67,12 @@ static void show_usage(FAR const char *progname)
fprintf(stderr, "\t 8: GPIO_INTERRUPT_RISING_PIN\n");
fprintf(stderr, "\t 9: GPIO_INTERRUPT_FALLING_PIN\n");
fprintf(stderr, "\t10: GPIO_INTERRUPT_BOTH_PIN\n");
fprintf(stderr, "\t11: GPIO_INTERRUPT_PIN_WAKEUP\n");
fprintf(stderr, "\t12: GPIO_INTERRUPT_HIGH_PIN_WAKEUP\n");
fprintf(stderr, "\t13: GPIO_INTERRUPT_LOW_PIN_WAKEUP\n");
fprintf(stderr, "\t14: GPIO_INTERRUPT_RISING_PIN_WAKEUP\n");
fprintf(stderr, "\t15: GPIO_INTERRUPT_FALLING_PIN_WAKEUP\n");
fprintf(stderr, "\t16: GPIO_INTERRUPT_BOTH_PIN_WAKEUP\n");
}
/****************************************************************************
@ -308,6 +314,12 @@ int main(int argc, FAR char *argv[])
case GPIO_INTERRUPT_RISING_PIN:
case GPIO_INTERRUPT_FALLING_PIN:
case GPIO_INTERRUPT_BOTH_PIN:
case GPIO_INTERRUPT_PIN_WAKEUP:
case GPIO_INTERRUPT_HIGH_PIN_WAKEUP:
case GPIO_INTERRUPT_LOW_PIN_WAKEUP:
case GPIO_INTERRUPT_RISING_PIN_WAKEUP:
case GPIO_INTERRUPT_FALLING_PIN_WAKEUP:
case GPIO_INTERRUPT_BOTH_PIN_WAKEUP:
{
printf(" Interrupt pin: Value=%u\n", invalue);

View File

@ -1,46 +0,0 @@
From d1576c890e8a8622c95dc4a782c457ab3884e7fa Mon Sep 17 00:00:00 2001
From: Xu Xingliang <xuxingliang@xiaomi.com>
Date: Mon, 22 Apr 2024 12:26:35 +0800
Subject: [PATCH] fix(demo): fix compile warning
In file included from /home/neo/projects/nuttx/apps/graphics/lvgl/lvgl/demos/stress/../../lvgl.h:30,
from /home/neo/projects/nuttx/apps/graphics/lvgl/lvgl/demos/stress/../lv_demos.h:16,
from /home/neo/projects/nuttx/apps/graphics/lvgl/lvgl/demos/stress/lv_demo_stress.h:16,
from /home/neo/projects/nuttx/apps/graphics/lvgl/lvgl/demos/stress/lv_demo_stress.c:9:
/home/neo/projects/nuttx/apps/graphics/lvgl/lvgl/demos/stress/lv_demo_stress.c: In function 'obj_test_task_cb':
/home/neo/projects/nuttx/apps/graphics/lvgl/lvgl/demos/stress/lv_demo_stress.c:81:29: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'long unsigned int' [-Wformat=]
81 | LV_LOG_USER("mem leak since start: %zu, frag: %3d %%", mem_free_start - mon.free_size, mon.frag_pct);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
/home/neo/projects/nuttx/apps/graphics/lvgl/lvgl/demos/stress/../../src/misc/lv_log.h:132:97: note: in definition of macro 'LV_LOG_USER'
132 | # define LV_LOG_USER(...) _lv_log_add(LV_LOG_LEVEL_USER, LV_LOG_FILE, LV_LOG_LINE, __func__, __VA_ARGS__)
| ^~~~~~~~~~~
/home/neo/projects/nuttx/apps/graphics/lvgl/lvgl/demos/stress/lv_demo_stress.c:81:54: note: format string is defined here
81 | LV_LOG_USER("mem leak since start: %zu, frag: %3d %%", mem_free_start - mon.free_size, mon.frag_pct);
| ~~^
| |
| unsigned int
| %lu
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
---
demos/stress/lv_demo_stress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/demos/stress/lv_demo_stress.c b/demos/stress/lv_demo_stress.c
index 65728519c..b76c1f655 100644
--- a/demos/stress/lv_demo_stress.c
+++ b/demos/stress/lv_demo_stress.c
@@ -32,7 +32,7 @@ static void obj_test_task_cb(lv_timer_t * tmr);
**********************/
static lv_obj_t * main_page;
static lv_obj_t * ta;
-static uint32_t mem_free_start = 0;
+static size_t mem_free_start = 0;
static int16_t g_state = -1;
/**********************
--
2.34.1

View File

@ -29,7 +29,7 @@ if(CONFIG_GRAPHICS_LVGL)
FetchContent_Declare(
lvgl_fetch
DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR}
URL "https://github.com/lvgl/lvgl/archive/refs/tags/v9.1.0.zip"
URL "https://github.com/lvgl/lvgl/archive/refs/tags/v9.2.1.zip"
SOURCE_DIR
${CMAKE_CURRENT_LIST_DIR}/lvgl
BINARY_DIR
@ -42,9 +42,6 @@ if(CONFIG_GRAPHICS_LVGL)
""
TEST_COMMAND
""
PATCH_COMMAND
patch -p1 -s -d ${CMAKE_CURRENT_LIST_DIR}/lvgl <
${CMAKE_CURRENT_LIST_DIR}/0001-fix-demo-fix-compile-warning.patch
DOWNLOAD_NO_PROGRESS true
TIMEOUT 30)

View File

@ -11,8 +11,7 @@ menuconfig GRAPHICS_LVGL
if GRAPHICS_LVGL
# Below options are copied directly from lvgl/Kconfig, do not edit
# Kconfig file for LVGL v9.1.0
# Kconfig file for LVGL v9.2.1
menu "LVGL configuration"
@ -155,6 +154,8 @@ menu "LVGL configuration"
bool "4: RTTHREAD"
config LV_OS_WINDOWS
bool "5: WINDOWS"
config LV_OS_MQX
bool "6: MQX"
config LV_OS_CUSTOM
bool "255: CUSTOM"
endchoice
@ -167,12 +168,22 @@ menu "LVGL configuration"
default 3 if LV_OS_CMSIS_RTOS2
default 4 if LV_OS_RTTHREAD
default 5 if LV_OS_WINDOWS
default 6 if LV_OS_MQX
default 255 if LV_OS_CUSTOM
config LV_OS_CUSTOM_INCLUDE
string "Custom OS include header"
default "stdint.h"
depends on LV_OS_CUSTOM
config LV_USE_FREERTOS_TASK_NOTIFY
bool "Use RTOS task with a direct notification for synchronization"
default y
depends on LV_OS_FREERTOS
help
Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM
than unblocking a task using an intermediary object such as a binary semaphore.
RTOS task notifications can only be used when there is only one task that can be the recipient of the event.
endmenu
menu "Rendering Configuration"
@ -188,6 +199,13 @@ menu "LVGL configuration"
help
Align the start address of draw_buf addresses to this bytes.
config LV_DRAW_TRANSFORM_USE_MATRIX
bool "Using matrix for transformations"
default n
depends on LV_USE_MATRIX
help
Requirements: The rendering engine needs to support 3x3 matrix transformations.
config LV_DRAW_LAYER_SIMPLE_BUF_SIZE
int "Optimal size to buffer the widget with opacity"
default 24576
@ -197,12 +215,64 @@ menu "LVGL configuration"
it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
"Transformed layers" (if `transform_angle/zoom` are set) use larger buffers and can't be drawn in chunks.
config LV_DRAW_THREAD_STACK_SIZE
int "Stack size of draw thread in bytes"
default 8192
depends on LV_USE_OS > 0
help
If FreeType or ThorVG is enabled, it is recommended to set it to 32KB or more.
config LV_USE_DRAW_SW
bool "Enable software rendering"
default y
help
Required to draw anything on the screen.
config LV_DRAW_SW_SUPPORT_RGB565
bool "Enable support for RGB565 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_SUPPORT_RGB565A8
bool "Enable support for RGB565A8 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_SUPPORT_RGB888
bool "Enable support for RGB888 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_SUPPORT_XRGB8888
bool "Enable support for XRGB8888 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_SUPPORT_ARGB8888
bool "Enable support for ARGB8888 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_SUPPORT_L8
bool "Enable support for L8 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_SUPPORT_AL88
bool "Enable support for AL88 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_SUPPORT_A8
bool "Enable support for A8 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_SUPPORT_I1
bool "Enable support for I1 color format"
default y
depends on LV_USE_DRAW_SW
config LV_DRAW_SW_DRAW_UNIT_CNT
int "Number of draw units"
default 1
@ -220,7 +290,7 @@ menu "LVGL configuration"
config LV_USE_NATIVE_HELIUM_ASM
bool "Enable native helium assembly"
default y
default n
depends on LV_USE_DRAW_SW
help
Disabling this allows arm2d to work on its own (for testing only)
@ -233,6 +303,14 @@ menu "LVGL configuration"
0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only,
1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too.
config LV_USE_DRAW_SW_COMPLEX_GRADIENTS
bool "Enable drawing complex gradients in software"
default n
depends on LV_USE_DRAW_SW
help
0: do not enable complex gradients
1: enable complex gradients (linear at an angle, radial or conical)
config LV_DRAW_SW_SHADOW_CACHE_SIZE
int "Allow buffering some shadow calculation"
depends on LV_DRAW_SW_COMPLEX
@ -290,26 +368,36 @@ menu "LVGL configuration"
depends on LV_USE_DRAW_VGLITE
default n
config LV_USE_VGLITE_DRAW_ASYNC
bool "Enable VGLite draw async"
config LV_USE_VGLITE_DRAW_THREAD
bool "Use additional draw thread for VG-Lite processing"
depends on LV_USE_DRAW_VGLITE && LV_USE_OS > 0
default y
config LV_USE_VGLITE_DRAW_ASYNC
bool "Enable VGLite draw async"
depends on LV_USE_VGLITE_DRAW_THREAD
default y
help
Queue multiple tasks and flash them once to the GPU.
Queue multiple tasks and flash them once to the GPU. The task ready state will be send asynchronous to dispatcher.
config LV_USE_VGLITE_ASSERT
bool "Enable VGLite asserts"
default n
depends on LV_USE_DRAW_VGLITE
default n
config LV_USE_DRAW_PXP
bool "Use NXP's PXP on iMX RTxxx platforms"
default n
config LV_USE_PXP_DRAW_THREAD
bool "Use additional draw thread for PXP processing"
depends on LV_USE_DRAW_PXP && LV_USE_OS > 0
default y
config LV_USE_PXP_ASSERT
bool "Enable PXP asserts"
default n
depends on LV_USE_DRAW_PXP
default n
config LV_USE_DRAW_DAVE2D
bool "Use Renesas Dave2D on RA platforms"
@ -323,6 +411,8 @@ menu "LVGL configuration"
config LV_USE_DRAW_VG_LITE
bool "Use VG-Lite GPU"
default n
select LV_USE_MATRIX
config LV_VG_LITE_USE_GPU_INIT
bool "Enable VG-Lite custom external 'gpu_init()' function"
@ -349,9 +439,24 @@ menu "LVGL configuration"
which usually improves performance,
but does not guarantee the same rendering quality as the software.
config LV_VG_LITE_GRAD_CACHE_CNT
int "VG-Lite gradient maximum cache number."
default 32
depends on LV_USE_DRAW_VG_LITE
help
The memory usage of a single gradient:
linear: 4K bytes.
radial: radius * 4K bytes.
config LV_VG_LITE_STROKE_CACHE_CNT
int "VG-Lite stroke maximum cache number."
default 32
depends on LV_USE_DRAW_VG_LITE
config LV_USE_VECTOR_GRAPHIC
bool "Use Vector Graphic APIs"
default n
select LV_USE_MATRIX
help
Enable drawing support vector graphic APIs.
endmenu
@ -554,14 +659,28 @@ menu "LVGL configuration"
bool "Add id field to obj"
default n
config LV_OBJ_ID_AUTO_ASSIGN
bool "Automatically assign an ID when obj is created"
default y
depends on LV_USE_OBJ_ID
config LV_USE_OBJ_ID_BUILTIN
bool "Use builtin method to deal with obj ID"
default n
depends on LV_USE_OBJ_ID
config LV_USE_OBJ_PROPERTY
bool "Use obj property set/get API"
default n
config LV_USE_OBJ_PROPERTY_NAME
bool "Use name to access property"
default n
depends on LV_USE_OBJ_PROPERTY
help
Add a name table to every widget class, so the property can be accessed by name.
Note, the const table will increase flash usage.
config LV_USE_VG_LITE_THORVG
bool "VG-Lite Simulator"
default n
@ -581,6 +700,11 @@ menu "LVGL configuration"
default n
depends on LV_USE_VG_LITE_THORVG
config LV_VG_LITE_THORVG_LINEAR_GRADIENT_EXT_SUPPORT
bool "Enable linear gradient extension support"
default n
depends on LV_USE_VG_LITE_THORVG
config LV_VG_LITE_THORVG_16PIXELS_ALIGN
bool "Enable 16 pixels alignment"
default y
@ -614,6 +738,15 @@ menu "LVGL configuration"
config LV_USE_FLOAT
bool "Use float as lv_value_precise_t"
default n
config LV_USE_MATRIX
bool "Enable matrix support"
default n
select LV_USE_FLOAT
config LV_USE_PRIVATE_API
bool "Include `lvgl_private.h` in `lvgl.h` to access internal data and functions by default"
default n
endmenu
menu "Font Usage"
@ -666,6 +799,8 @@ menu "LVGL configuration"
bool "Enable Montserrat 28 compressed"
config LV_FONT_DEJAVU_16_PERSIAN_HEBREW
bool "Enable Dejavu 16 Persian, Hebrew, Arabic letters"
config LV_FONT_SIMSUN_14_CJK
bool "Enable Simsun 14 CJK"
config LV_FONT_SIMSUN_16_CJK
bool "Enable Simsun 16 CJK"
@ -686,6 +821,9 @@ menu "LVGL configuration"
config LV_FONT_DEFAULT_MONTSERRAT_8
bool "Montserrat 8"
select LV_FONT_MONTSERRAT_8
config LV_FONT_DEFAULT_MONTSERRAT_10
bool "Montserrat 10"
select LV_FONT_MONTSERRAT_10
config LV_FONT_DEFAULT_MONTSERRAT_12
bool "Montserrat 12"
select LV_FONT_MONTSERRAT_12
@ -749,6 +887,9 @@ menu "LVGL configuration"
config LV_FONT_DEFAULT_DEJAVU_16_PERSIAN_HEBREW
bool "Dejavu 16 Persian, Hebrew, Arabic letters"
select LV_FONT_DEJAVU_16_PERSIAN_HEBREW
config LV_FONT_DEFAULT_SIMSUN_14_CJK
bool "Simsun 14 CJK"
select LV_FONT_SIMSUN_14_CJK
config LV_FONT_DEFAULT_SIMSUN_16_CJK
bool "Simsun 16 CJK"
select LV_FONT_SIMSUN_16_CJK
@ -791,7 +932,7 @@ menu "LVGL configuration"
config LV_TXT_BREAK_CHARS
string "Can break (wrap) texts on these chars"
default " ,.;:-_)]}"
default " ,.;:-_)}"
config LV_TXT_LINE_BREAK_LONG_LEN
int "Line break long length"
@ -874,6 +1015,9 @@ menu "LVGL configuration"
bool "Use calendar header dropdown"
depends on LV_USE_CALENDAR
default y
config LV_USE_CALENDAR_CHINESE
bool "Use chinese calendar"
depends on LV_USE_CALENDAR
config LV_USE_CANVAS
bool "Canvas. Requires: lv_image"
imply LV_USE_IMAGE
@ -922,15 +1066,18 @@ menu "LVGL configuration"
config LV_USE_LIST
bool "List"
default y if !LV_CONF_MINIMAL
config LV_USE_LOTTIE
bool "Lottie"
default n
depends on LV_USE_VECTOR_GRAPHIC && (LV_USE_THORVG_INTERNAL || LV_USE_THORVG_EXTERNAL)
help
Enable Lottie animations. Requires LV_USE_VECTOR_GRAPHIC and LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL.
config LV_USE_MENU
bool "Menu"
default y if !LV_CONF_MINIMAL
config LV_USE_MSGBOX
bool "Msgbox"
default y if !LV_CONF_MINIMAL
config LV_USE_OBSERVER
bool "Observer"
default n
config LV_USE_ROLLER
bool "Roller. Requires: lv_label"
imply LV_USE_LABEL
@ -1013,10 +1160,16 @@ menu "LVGL configuration"
endmenu
menu "3rd Party Libraries"
config LV_FS_DEFAULT_DRIVE_LETTER
int "Default drive letter (e.g. 65 for 'A')"
default 0
help
Setting a default drive letter allows skipping the driver prefix in filepaths
config LV_USE_FS_STDIO
bool "File system on top of stdio API"
config LV_FS_STDIO_LETTER
int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65 )"
int "Set an upper cased letter on which the drive will accessible (e.g. 65 for 'A')"
default 0
depends on LV_USE_FS_STDIO
config LV_FS_STDIO_PATH
@ -1030,7 +1183,7 @@ menu "LVGL configuration"
config LV_USE_FS_POSIX
bool "File system on top of posix API"
config LV_FS_POSIX_LETTER
int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65)"
int "Set an upper cased letter on which the drive will accessible (e.g. 65 for 'A')"
default 0
depends on LV_USE_FS_POSIX
config LV_FS_POSIX_PATH
@ -1044,7 +1197,7 @@ menu "LVGL configuration"
config LV_USE_FS_WIN32
bool "File system on top of Win32 API"
config LV_FS_WIN32_LETTER
int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65)"
int "Set an upper cased letter on which the drive will accessible (e.g. 65 for 'A')"
default 0
depends on LV_USE_FS_WIN32
config LV_FS_WIN32_PATH
@ -1058,7 +1211,7 @@ menu "LVGL configuration"
config LV_USE_FS_FATFS
bool "File system on top of FatFS"
config LV_FS_FATFS_LETTER
int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65)"
int "Set an upper cased letter on which the drive will accessible (e.g. 65 for 'A')"
default 0
depends on LV_USE_FS_FATFS
config LV_FS_FATFS_CACHE_SIZE
@ -1069,17 +1222,31 @@ menu "LVGL configuration"
config LV_USE_FS_MEMFS
bool "File system on top of memory-mapped API"
config LV_FS_MEMFS_LETTER
int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65)"
int "Set an upper cased letter on which the drive will accessible (e.g. 65 for 'A')"
default 0
depends on LV_USE_FS_MEMFS
config LV_USE_FS_LITTLEFS
bool "File system on top of littlefs API"
config LV_FS_LITTLEFS_LETTER
int "Set an upper cased letter on which the drive will accessible (e.g. 'A' i.e. 65)"
int "Set an upper cased letter on which the drive will accessible (e.g. 65 for 'A')"
default 0
depends on LV_USE_FS_LITTLEFS
config LV_USE_FS_ARDUINO_ESP_LITTLEFS
bool "File system on top of Arduino ESP littlefs API"
config LV_FS_ARDUINO_ESP_LITTLEFS_LETTER
int "Set an upper cased letter on which the drive will accessible (e.g. 65 for 'A')"
default 0
depends on LV_USE_FS_ARDUINO_ESP_LITTLEFS
config LV_USE_FS_ARDUINO_SD
bool "File system on top of Arduino SD API"
config LV_FS_ARDUINO_SD_LETTER
int "Set an upper cased letter on which the drive will accessible (e.g. 65 for 'A')"
default 0
depends on LV_USE_FS_ARDUINO_SD
config LV_USE_LODEPNG
bool "PNG decoder library"
@ -1099,7 +1266,7 @@ menu "LVGL configuration"
bool "GIF decoder library"
config LV_GIF_CACHE_DECODE_DATA
bool "Use extra 16KB RAM to cache decoded data to accerlate"
bool "Use extra 16KB RAM to cache decoded data to accelerate"
depends on LV_USE_GIF
config LV_BIN_DECODER_RAM_LOAD
@ -1133,9 +1300,14 @@ menu "LVGL configuration"
bool "Enable loading Tiny TTF data from files"
default n
depends on LV_USE_TINY_TTF
config LV_TINY_TTF_CACHE_GLYPH_CNT
bool "Tiny ttf cache entries count"
default 256
depends on LV_USE_TINY_TTF
config LV_USE_RLOTTIE
bool "Lottie library"
config LV_USE_THORVG
bool "ThorVG library"
choice
@ -1214,7 +1386,7 @@ menu "LVGL configuration"
config LV_USE_MEM_MONITOR
bool "Show the used memory and the memory fragmentation"
default n
depends on LV_STDLIB_BUILTIN && LV_USE_SYSMON
depends on LV_USE_BUILTIN_MALLOC && LV_USE_SYSMON
choice
prompt "Memory monitor position"
@ -1241,10 +1413,6 @@ menu "LVGL configuration"
bool "Center"
endchoice
config LV_USE_MONKEY
bool "Enable Monkey test"
default n
config LV_USE_PROFILER
bool "Runtime performance profiler"
config LV_USE_PROFILER_BUILTIN
@ -1260,6 +1428,10 @@ menu "LVGL configuration"
depends on LV_USE_PROFILER
default "lvgl/src/misc/lv_profiler_builtin.h"
config LV_USE_MONKEY
bool "Enable Monkey test"
default n
config LV_USE_GRIDNAV
bool "Enable grid navigation"
default n
@ -1269,9 +1441,13 @@ menu "LVGL configuration"
default n
config LV_USE_IMGFONT
bool "draw image in label or span obj"
bool "Support using images as font in label or span widgets"
default n
config LV_USE_OBSERVER
bool "Observer"
default y
config LV_USE_IME_PINYIN
bool "Enable Pinyin input method"
default n
@ -1288,7 +1464,7 @@ menu "LVGL configuration"
depends on LV_USE_IME_PINYIN
default y
help
If you do not use the default thesaurus, be sure to use lv_ime_pinyin after setting the thesauruss
If you do not use the default thesaurus, be sure to use lv_ime_pinyin after setting the thesaurus
config LV_IME_PINYIN_CAND_TEXT_NUM
int "Maximum number of candidate panels"
depends on LV_USE_IME_PINYIN
@ -1310,6 +1486,16 @@ menu "LVGL configuration"
default y
help
This can save some memory, but not much. After the quick access bar is created, it can be hidden by clicking the button at the top left corner of the browsing area, which is very useful for small screen devices.
config LVGL_VERSION_MAJOR
int
default 9 # LVGL_VERSION_MAJOR
config LVGL_VERSION_MINOR
int
default 2 # LVGL_VERSION_MINOR
config LVGL_VERSION_PATCH
int
default 1 # LVGL_VERSION_PATCH
endmenu
menu "Devices"
@ -1362,15 +1548,39 @@ menu "LVGL configuration"
default 1 if LV_SDL_SINGLE_BUFFER
default 2 if LV_SDL_DOUBLE_BUFFER
config LV_SDL_ACCELERATED
bool "Use hardware acceleration"
depends on LV_USE_SDL
default y
config LV_SDL_FULLSCREEN
bool "SDL fullscreen"
depends on LV_USE_SDL
default n
config LV_SDL_DIRECT_EXIT
bool "Exit the application when all SDL windows are closed"
depends on LV_USE_SDL
default y
choice
prompt "SDL mousewheel mode"
depends on LV_USE_SDL
default LV_SDL_MOUSEWHEEL_MODE_ENCODER
config LV_SDL_MOUSEWHEEL_MODE_ENCODER
bool "The mousewheel emulates an encoder input device"
config LV_SDL_MOUSEWHEEL_MODE_CROWN
bool "The mousewheel emulates a smart watch crown"
endchoice
config LV_SDL_MOUSEWHEEL_MODE
int
depends on LV_USE_SDL
default 0 if LV_SDL_MOUSEWHEEL_MODE_ENCODER
default 1 if LV_SDL_MOUSEWHEEL_MODE_CROWN
config LV_USE_X11
bool "Use X11 window manager to open window on Linux PC and handle mouse and keyboard"
default n
@ -1404,6 +1614,18 @@ menu "LVGL configuration"
With 2 buffers in flush_cb only and address change is required.
endchoice
config LV_USE_WAYLAND
bool "Use the wayland client to open a window and handle inputs on Linux or BSD"
default n
config LV_WAYLAND_WINDOW_DECORATIONS
bool "Draw client side window decorations, only necessary on Mutter (GNOME)"
depends on LV_USE_WAYLAND
default n
config LV_WAYLAND_WL_SHELL
bool "Support the legacy wl_shell instead of the default XDG Shell protocol"
depends on LV_USE_WAYLAND
default n
config LV_USE_LINUX_FBDEV
bool "Use Linux framebuffer device"
default n
@ -1562,9 +1784,32 @@ menu "LVGL configuration"
bool "Generic MIPI driver"
default y if LV_USE_ST7735 || LV_USE_ST7789 || LV_USE_ST7796 || LV_USE_ILI9341
config LV_USE_RENESAS_GLCDC
bool "Use Renesas GLCDC driver"
default n
config LV_USE_WINDOWS
bool "Use LVGL Windows backend"
depends on LV_OS_WINDOWS
default n
config LV_USE_OPENGLES
bool "Use GLFW and OpenGL to open window on PC and handle mouse and keyboard"
default n
config LV_USE_OPENGLES_DEBUG
bool "Enable debug mode for OpenGL"
depends on LV_USE_OPENGLES
default n
config LV_USE_QNX
bool "Use a QNX Screen window as a display"
default n
config LV_QNX_BUF_COUNT
int
depends on LV_USE_QNX
default 1
endmenu
menu "Examples"

View File

@ -56,9 +56,7 @@ WD := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'}
CONFIG_GRAPH_LVGL_URL ?= "https://github.com/lvgl/lvgl/archive/refs/tags"
LVGL_PATCHS ?= $(sort $(wildcard 000*.patch))
LVGL_VERSION = 9.1.0
LVGL_VERSION = 9.2.1
LVGL_TARBALL = v$(LVGL_VERSION).zip
LVGL_UNPACKNAME = lvgl
@ -76,7 +74,6 @@ $(LVGL_UNPACKNAME): $(LVGL_TARBALL)
$(ECHO_BEGIN)"Unpacking: $(LVGL_TARBALL) -> $(LVGL_UNPACKNAME)"
$(Q) $(UNPACK) $(LVGL_TARBALL)
$(Q) mv lvgl-$(LVGL_VERSION) $(LVGL_UNPACKNAME)
$(Q) cat $(LVGL_PATCHS) | patch -s -N -d $(LVGL_UNPACKNAME) -p1
$(Q) touch $(LVGL_UNPACKNAME)
$(ECHO_END)

View File

@ -0,0 +1,50 @@
#include <stdio.h>
#include <nuttx/config.h>
#include "js-root.h"
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/boardctl.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
#include <nuttx/drivers/ramdisk.h>
#define CONFIG_JS_RAMFS 1
#define STR_RAMDEVNO(m) #m
#define MKMOUNT_DEVNAME(m) "/dev/ram" STR_RAMDEVNO(m)
#define MOUNT_DEVNAME MKMOUNT_DEVNAME(CONFIG_JS_RAMFS)
#ifndef CONFIG_EXAMPLES_ROMFS_SECTORSIZE
# define CONFIG_EXAMPLES_ROMFS_SECTORSIZE 64
#endif
#define NSECTORS(b) (((b)+CONFIG_EXAMPLES_ROMFS_SECTORSIZE-1)/CONFIG_EXAMPLES_ROMFS_SECTORSIZE)
int main(int argc, char *argv[]) {
struct boardioc_romdisk_s desc;
/* Create a RAM disk for the test */
desc.minor = CONFIG_JS_RAMFS; /* Minor device number of the ROM disk. */
desc.nsectors = NSECTORS(js_img_len); /* The number of sectors in the ROM disk */
desc.sectsize = CONFIG_EXAMPLES_ROMFS_SECTORSIZE; /* The size of one sector in bytes */
desc.image = (FAR uint8_t *)js_img; /* File system image */
boardctl(BOARDIOC_ROMDISK, (uintptr_t)&desc);
mkdir("/js", 0755);
printf("%d\n", mount(MOUNT_DEVNAME, "/js", "romfs",
MS_RDONLY, NULL));
return 0;
}

View File

@ -0,0 +1,30 @@
#
#For a description of the syntax of this configuration file,
#see the file kconfig-language.txt in the NuttX tools repository.
#
config CUSTOM_APPS_CUSTOM_HELLO
tristate "Custom Hello App"
default n
depends on FS_ROMFS && BUILD_FLAT
---help---
Enable the Custom Hello App
if CUSTOM_APPS_CUSTOM_HELLO
config CUSTOM_APPS_CUSTOM_HELLO_PROGNAME
string "Program name"
default "custom_hello"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.
config CUSTOM_APPS_CUSTOM_HELLO_PRIORITY
int "Custom Hello task priority"
default 100
config CUSTOM_APPS_CUSTOM_HELLO_STACKSIZE
int "Custom Hello stack size"
default DEFAULT_TASK_STACKSIZE
endif

View File

@ -0,0 +1,3 @@
ifneq ($(CONFIG_LIB_SQLITE),)
CONFIGURED_APPS += $(APPDIR)/interpreters/hello/
endif

View File

@ -0,0 +1,14 @@
include $(APPDIR)/Make.defs
# Custom Hello built-in application info
PROGNAME = $(CONFIG_CUSTOM_APPS_CUSTOM_HELLO_PROGNAME)
PRIORITY = $(CONFIG_CUSTOM_APPS_CUSTOM_HELLO_PRIORITY)
STACKSIZE = $(CONFIG_CUSTOM_APPS_CUSTOM_HELLO_STACKSIZE)
MODULE = $(CONFIG_CUSTOM_APPS_CUSTOM_HELLO)
# Custom Hello
MAINSRC = CustomHello.c
include $(APPDIR)/Application.mk

1114
interpreters/hello/js-root.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,7 @@
#include <nuttx/config.h>
#include <nuttx/power/pm.h>
#include <nuttx/rpmsg/rpmsg.h>
#include <nuttx/rptun/rptun.h>
#include <nuttx/streams.h>
#include <sys/boardctl.h>
@ -118,6 +119,7 @@ static FAR const char * const g_resetflag[] =
"panic",
"bootloader",
"recovery",
"restore",
"factory",
NULL
};
@ -290,7 +292,7 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
if (argc == 4)
{
ctrl.domain = atoi(argv[3]);
if (ctrl.domain < 0 || ctrl.domain >= CONFIG_PM_NDOMAINS)
if (ctrl.domain >= CONFIG_PM_NDOMAINS)
{
nsh_error(vtbl, g_fmtargrange, argv[3]);
return ERROR;
@ -581,7 +583,7 @@ static int cmd_rpmsg_once(FAR struct nsh_vtbl_s *vtbl,
ping.times = atoi(argv[3]);
ping.len = atoi(argv[4]);
ping.ack = atoi(argv[5]);
ping.cmd = atoi(argv[5]);
ping.sleep = atoi(argv[6]);
cmd = RPMSGIOC_PING;
@ -640,15 +642,17 @@ static int cmd_rpmsg_help(FAR struct nsh_vtbl_s *vtbl, int argc,
{
nsh_output(vtbl, "%s <panic|dump> <path>\n", argv[0]);
#ifdef CONFIG_RPMSG_PING
nsh_output(vtbl, "%s ping <path> <times> <length> <ack> "
nsh_output(vtbl, "%s ping <path> <times> <length> <cmd> "
"<period(ms)>\n\n", argv[0]);
nsh_output(vtbl, "<times> Number of ping operations.\n");
nsh_output(vtbl, "<length> The length of each ping packet.\n");
nsh_output(vtbl, "<ack> Whether the peer acknowlege or "
nsh_output(vtbl, "<cmd> Whether the peer acknowlege or "
"check data.\n");
nsh_output(vtbl, " 0 - No acknowledge and check.\n");
nsh_output(vtbl, " 1 - Acknowledge, no data check.\n");
nsh_output(vtbl, " 2 - Acknowledge and data check.\n");
nsh_output(vtbl, " Bit0 - Request need ack or not.\n");
nsh_output(vtbl, " Bit1 - Check the data or not.\n");
nsh_output(vtbl, " Bit2 - Random length or not.\n");
nsh_output(vtbl, " Bit4~7 - Request or response or other"
"command for future use.\n");
nsh_output(vtbl, "<sleep(ms)> Sleep interval between two operations.\n");
#endif
nsh_output(vtbl, "<path> Rpmsg device path.\n\n");

View File

@ -3,26 +3,26 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
#
config TESTING_BATTERYDUMP
tristate "Battery dump for test"
config SYSTEM_BATTERYDUMP
tristate "Battery dump system tool"
default n
---help---
Enable the battery dump
if TESTING_BATTERYDUMP
if SYSTEM_BATTERYDUMP
config TESTING_BATTERYDUMP_PROGNAME
config SYSTEM_BATTERYDUMP_PROGNAME
string "Program name"
default "batterydump"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.
config TESTING_BATTERYDUMP_PRIORITY
config SYSTEM_BATTERYDUMP_PRIORITY
int "Battery dump task priority"
default 100
config TESTING_BATTERYDUMP_STACKSIZE
config SYSTEM_BATTERYDUMP_STACKSIZE
int "Battery dump stack size"
default DEFAULT_TASK_STACKSIZE

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/batterydump/Make.defs
# apps/system/batterydump/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -18,6 +18,6 @@
#
############################################################################
ifneq ($(CONFIG_TESTING_BATTERYDUMP),)
CONFIGURED_APPS += $(APPDIR)/testing/batterydump
ifneq ($(CONFIG_SYSTEM_BATTERYDUMP),)
CONFIGURED_APPS += $(APPDIR)/system/batterydump
endif

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/batterydump/Makefile
# apps/system/batterydump/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -20,10 +20,10 @@
include $(APPDIR)/Make.defs
PROGNAME = $(CONFIG_TESTING_BATTERYDUMP_PROGNAME)
PRIORITY = $(CONFIG_TESTING_BATTERYDUMP_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_BATTERYDUMP_STACKSIZE)
MODULE = $(CONFIG_TESTING_BATTERYDUMP)
PROGNAME = $(CONFIG_SYSTEM_BATTERYDUMP_PROGNAME)
PRIORITY = $(CONFIG_SYSTEM_BATTERYDUMP_PRIORITY)
STACKSIZE = $(CONFIG_SYSTEM_BATTERYDUMP_STACKSIZE)
MODULE = $(CONFIG_SYSTEM_BATTERYDUMP)
MAINSRC = batterydump.c

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/batterydump/batterydump.c
* apps/system/batterydump/batterydump.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -28,8 +28,10 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <string.h>
#include <pthread.h>
#include <cmocka.h>
#include <nuttx/power/pm_runtime.h>

View File

@ -28,8 +28,10 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <string.h>
#include <pthread.h>
#include <cmocka.h>
#include <nuttx/power/consumer.h>
@ -446,10 +448,8 @@ static void test_regulator_supply_4(FAR void **state)
&g_fake_regulator);
assert_false(NULL == g_fake_regulator.rdev);
test = regulator_get(REGULATOR_ID);
assert_false(NULL == test);
assert_true(NULL == test);
g_fake_regulator_supply.state = 0;
ret = regulator_enable(test);
assert_true(ret < 0);
g_fake_regulator_supply.rdev = regulator_register(
&g_fake_regulator_supply_desc,
&g_fake_regulator_ops,
@ -457,7 +457,8 @@ static void test_regulator_supply_4(FAR void **state)
assert_false(NULL == g_fake_regulator_supply.rdev);
assert_int_equal(g_fake_regulator_supply.state, 0);
assert_int_equal(g_fake_regulator.state, 0);
test = regulator_get(REGULATOR_ID);
assert_false(NULL == test);
while (cnt--)
{
ret = regulator_enable(test);
@ -499,6 +500,7 @@ static void test_regulator_mode(FAR void **state)
int ret = 0;
g_fake_regulator.lpmode = 0;
g_fake_regulator_desc.supply_name = NULL;
g_fake_regulator.rdev = regulator_register(&g_fake_regulator_desc,
&g_fake_regulator_ops,
&g_fake_regulator);