Giter Club home page Giter Club logo

lv_port_win_codeblocks's Introduction

pc_simulator_win_codeblocks

PC simulator project for LittlevGL embedded GUI Library for Windows in Codeblocks

This requires the MinGW version of Code::blocks 20.03 or newer to be installed.

How to use this:

Tutorial for Windows

  1. Download and install Git
  2. Download CodeBlocks in latest version. It is strongly recommended to use the version which includes MinGW, as otherwise you will have to install and configure it separately, and there have been issues reported with missing header files when a standalone MinGW installation is used.
  3. If the version of Code::blocks <= 20.03, then MinGW need upgrade.
  4. Clone this repository:
    • Open Command prompt (Win key + R -> cmd -> Enter) or PowerShell (Win key + R -> powershell -> Enter) or Git bash (if you want different folder than C:/Users/username you have to navigate to it) and type: git clone --recurse-submodules https://github.com/lvgl/lv_port_win_codeblocks.git
  5. Open CodeBlocks and first set use flat objcts.
  6. And then select Open an existing project. Navigate to the lv_sim_codeblocks_win folder and select lvgl.cbp.
  7. Click on Build and Run or press F9.
  8. If everything goes well, you should see your simulator running.

lv_port_win_codeblocks's People

Contributors

100ask avatar dronecz avatar embeddedt avatar kisvegabor avatar tamertemizer avatar yobezhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lv_port_win_codeblocks's Issues

error: ld returned 1 exit status

Hey. I use Win7. I did all the steps as it is said but when I compile the code I get the error that you can see in the topic. Also, I tried to download and use the file directly, after unzipping and adding it to codeblocks it said:
|13|fatal error: lvgl/lvgl.h: No such file or directory|
#include "lvgl/lvgl.h"
#include "lv_examples/src/lv_demo_widgets/lv_demo_widgets.h"
#include "lv_drivers/win32drv/win32drv.h"

I was wondering if you could help me. Thank you

C++ Unknown Type Name 'namespace'

When I try to compile my project, which contains c++ files, I get an "unknown type name 'namespace'" error.

How do I set CodeBlocks to compile with C++?

Thanks!

build error

How to solve the following problem, tanks
||=== Build: Debug in LittlevGL (compiler: GNU GCC Compiler) ===|
lvgl\demos\benchmark\assets\img_benchmark_cogwheel_alpha256.c|1|fatal error: ../../../lvgl.h: No such file or directory|
lvgl\demos\benchmark\assets\img_benchmark_cogwheel_argb.c|1|fatal error: ../../../lvgl.h: No such file or directory|
lvgl\demos\benchmark\assets\img_benchmark_cogwheel_indexed16.c|1|fatal error: ../../../lvgl.h: No such file or directory|
lvgl\demos\benchmark\assets\lv_font_benchmark_montserrat_12_compr_az.c.c|1|fatal error: ../../../lvgl.h: No such file or directory|
lvgl\demos\benchmark\assets\img_benchmark_cogwheel_rgb.c|1|fatal error: ../../../lvgl.h: No such file or directory|
lvgl\demos\benchmark\assets\lv_font_benchmark_montserrat_16_compr_az.c.c|1|fatal error: ../../../lvgl.h: No such file or directory|
lvgl\demos\benchmark\assets\lv_font_benchmark_montserrat_28_compr_az.c.c|1|fatal error: ../../../lvgl.h: No such file or directory|
lvgl\demos\benchmark\lv_demo_benchmark.c|9|fatal error: lv_demo_benchmark.h: No such file or directory|
lvgl\demos\flex_layout\lv_demo_flex_layout_ctrl_pad.c|10|fatal error: lv_demo_flex_layout_main.h: No such file or directory|
lvgl\demos\flex_layout\lv_demo_flex_layout_flex_loader.c|10|fatal error: lv_demo_flex_layout_main.h: No such file or directory|
lvgl\demos\flex_layout\lv_demo_flex_layout_main.c|10|fatal error: lv_demo_flex_layout_main.h: No such file or directory|
||=== Build failed: 11 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
lvgl\demos\flex_layout\lv_demo_flex_layout_view.c|10|fatal error: lv_demo_flex_layout_main.h: No such file or directory|
||=== Build failed: 12 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

undefined reference to `CreateBitmap@20'

Build with MinGW, report error:

win_drv.c.o:win_drv.c:(.text+0xff): undefined reference to 'CreateBitmap@20'
win_drv.c.o:win_drv.c:(.text+0x126): undefined reference to 'CreateCompatibleDC@4'
win_drv.c.o:win_drv.c:(.text+0x137): undefined reference to 'SelectObject@8'
win_drv.c.o:win_drv.c:(.text+0x180): undefined reference to 'BitBlt@36'
win_drv.c.o:win_drv.c:(.text+0x18f): undefined reference to 'SelectObject@8'
win_drv.c.o:win_drv.c:(.text+0x19a): undefined reference to 'DeleteDC@4'
win_drv.c.o:win_drv.c:(.text+0x1bd): undefined reference to 'DeleteObject@4'

Build with tdm64-gcc, report error:

win_drv.c.o:win_drv.c:(.text+0xde): undefined reference to '__imp_CreateBitmap'
win_drv.c.o:win_drv.c:(.text+0xfd): undefined reference to '__imp_CreateCompatibleDC'
win_drv.c.o:win_drv.c:(.text+0x104): undefined reference to '__imp_SelectObject'
win_drv.c.o:win_drv.c:(.text+0x14b): undefined reference to '__imp_BitBlt'
win_drv.c.o:win_drv.c:(.text+0x15c): undefined reference to '__imp_DeleteDC'
win_drv.c.o:win_drv.c:(.text+0x175): undefined reference to '__imp_DeleteObject'

Have add link flags "-lgdi32", no effect

Codeblocks reports some build errors:

hi
some errors:

-------------- Build: Debug in LittlevGL (compiler: GNU GCC Compiler)---------------

gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c -o obj\Debug\lv_drivers\win32drv\win32drv.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\img_hand.c -o obj\Debug\lvgl\examples\assets\img_hand.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\img_skew_strip.c -o obj\Debug\lvgl\examples\assets\img_skew_strip.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\img_star.c -o obj\Debug\lvgl\examples\assets\img_star.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\imgbtn_left.c -o obj\Debug\lvgl\examples\assets\imgbtn_left.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\imgbtn_mid.c -o obj\Debug\lvgl\examples\assets\imgbtn_mid.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\assets\imgbtn_right.c -o obj\Debug\lvgl\examples\assets\imgbtn_right.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\get_started\lv_example_get_started_1.c -o obj\Debug\lvgl\examples\get_started\lv_example_get_started_1.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\get_started\lv_example_get_started_2.c -o obj\Debug\lvgl\examples\get_started\lv_example_get_started_2.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\get_started\lv_example_get_started_3.c -o obj\Debug\lvgl\examples\get_started\lv_example_get_started_3.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_1.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_1.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_2.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_2.o
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:59:5: error: unknown type name 'In_opt'
59 | In_opt HWND WindowHandle,
| ^~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:60:5: error: unknown type name 'In'
60 | In LONG Width,
| ^~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:61:5: error: unknown type name 'In'
61 | In LONG Height,
| ^~~~
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_3.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_3.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_4.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_4.o
gcc.exe -Wall -g -DLV_CONF_INCLUDE_SIMPLE=1 -DWINVER=0x0601 -I. -I. -Ilvgl -c D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lvgl\examples\layouts\flex\lv_example_flex_5.c -o obj\Debug\lvgl\examples\layouts\flex\lv_example_flex_5.o
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:62:5: error: unknown type name 'Out'
62 | Out UINT32** PixelBuffer,
| ^~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:63:5: error: unknown type name 'Out'
63 | Out SIZE_T* PixelBufferSize);
| ^~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:76:5: error: unknown type name 'In'
76 | In HWND WindowHandle);
| ^~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:105:5: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'?
105 | HTOUCHINPUT hTouchInput,
| ^~~~~~~~~~~
| PTOUCHINPUT
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:120:5: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'?
120 | HTOUCHINPUT hTouchInput);
| ^~~~~~~~~~~
| PTOUCHINPUT
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:128:5: error: unknown type name 'In'
128 | In HWND WindowHandle);
| ^~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:164:15: warning: 'lv_win32_quit_signal' initialized and declared 'extern'
164 | EXTERN_C bool lv_win32_quit_signal = false;
| ^~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:166:22: warning: 'lv_win32_pointer_device_object' initialized and declared 'extern'
166 | EXTERN_C lv_indev_t* lv_win32_pointer_device_object = NULL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:167:22: warning: 'lv_win32_keypad_device_object' initialized and declared 'extern'
167 | EXTERN_C lv_indev_t* lv_win32_keypad_device_object = NULL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:168:22: warning: 'lv_win32_encoder_device_object' initialized and declared 'extern'
168 | EXTERN_C lv_indev_t* lv_win32_encoder_device_object = NULL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c: In function 'lv_win32_init':
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:249:45: warning: passing argument 2 of 'LoadCursorW' from incompatible pointer type [-Wincompatible-pointer-types]
249 | WindowClass.hCursor = LoadCursorW(NULL, IDC_ARROW);
| ^~~~~~~~~
| |
| CHAR * {aka char *}
In file included from d:\stmicroelectronics\stm32cube\mingw\include\windows.h:48,
from D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.h:23,
from D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:10:
d:\stmicroelectronics\stm32cube\mingw\include\winuser.h:3999:51: note: expected 'LPCWSTR' {aka 'const short unsigned int *'} but argument is of type 'CHAR *' {aka 'char *'}
3999 | WINUSERAPI HCURSOR WINAPI LoadCursorW (HINSTANCE, LPCWSTR);
| ^~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:281:19: warning: implicit declaration of function 'lv_win32_get_dpi_for_window' [-Wimplicit-function-declaration]
281 | g_dpi_value = lv_win32_get_dpi_for_window(g_window_handle);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:319:5: warning: implicit declaration of function 'lv_win32_enable_child_window_dpi_message' [-Wimplicit-function-declaration]
319 | lv_win32_enable_child_window_dpi_message(g_window_handle);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:321:24: warning: implicit declaration of function 'lv_win32_create_frame_buffer' [-Wimplicit-function-declaration]
321 | HDC hNewBufferDC = lv_win32_create_frame_buffer(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:321:24: warning: initialization of 'HDC' {aka 'struct HDC__ *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c: At top level:
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:375:12: error: conflicting types for 'lv_win32_create_frame_buffer'
375 | static HDC lv_win32_create_frame_buffer(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:321:24: note: previous implicit declaration of 'lv_win32_create_frame_buffer' was here
321 | HDC hNewBufferDC = lv_win32_create_frame_buffer(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:501:13: error: static declaration of 'lv_win32_enable_child_window_dpi_message' follows non-static declaration
501 | static BOOL lv_win32_enable_child_window_dpi_message(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:319:5: note: previous implicit declaration of 'lv_win32_enable_child_window_dpi_message' was here
319 | lv_win32_enable_child_window_dpi_message(g_window_handle);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:569:5: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'?
569 | HTOUCHINPUT hTouchInput,
| ^~~~~~~~~~~
| PTOUCHINPUT
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:593:5: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'?
593 | HTOUCHINPUT hTouchInput)
| ^~~~~~~~~~~
| PTOUCHINPUT
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:614:5: error: unknown type name 'In'
614 | In HWND WindowHandle)
| ^~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c: In function 'lv_win32_window_message_callback':
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:898:10: error: 'WM_TOUCH' undeclared (first use in this function); did you mean 'WM_TOUCHUP'?
898 | case WM_TOUCH:
| ^~~~~~~~
| WM_TOUCHUP
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:898:10: note: each undeclared identifier is reported only once for each function it appears in
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:901:9: error: unknown type name 'HTOUCHINPUT'; did you mean 'PTOUCHINPUT'?
901 | HTOUCHINPUT hTouchInput = (HTOUCHINPUT)(lParam);
| ^~~~~~~~~~~
| PTOUCHINPUT
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:901:36: error: 'HTOUCHINPUT' undeclared (first use in this function); did you mean 'PTOUCHINPUT'?
901 | HTOUCHINPUT hTouchInput = (HTOUCHINPUT)(lParam);
| ^~~~~~~~~~~
| PTOUCHINPUT
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:906:17: warning: implicit declaration of function 'lv_win32_get_touch_input_info' [-Wimplicit-function-declaration]
906 | if (lv_win32_get_touch_input_info(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:915:31: warning: implicit declaration of function 'TOUCH_COORD_TO_PIXEL' [-Wimplicit-function-declaration]
915 | Point.x = TOUCH_COORD_TO_PIXEL(pInputs[i].x);
| ^~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:936:9: warning: implicit declaration of function 'lv_win32_close_touch_input_handle' [-Wimplicit-function-declaration]
936 | lv_win32_close_touch_input_handle(hTouchInput);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:940:10: error: 'WM_DPICHANGED' undeclared (first use in this function); did you mean 'WM_USERCHANGED'?
940 | case WM_DPICHANGED:
| ^~~~~~~~~~~~~
| WM_USERCHANGED
At top level:
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:501:13: warning: 'lv_win32_enable_child_window_dpi_message' defined but not used [-Wunused-function]
501 | static BOOL lv_win32_enable_child_window_dpi_message(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Users\samuelhg\Documents\learning\Lvgl\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c:375:12: warning: 'lv_win32_create_frame_buffer' defined but not used [-Wunused-function]
375 | static HDC lv_win32_create_frame_buffer(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Process terminated with status 1 (0 minute(s), 2 second(s))

Process terminated with status 0 (0 minute(s), 2 second(s))
18 error(s), 14 warning(s) (0 minute(s), 2 second(s))

build error std=c17

gcc.exe: error: unrecognized command line option '-std=c17'; did you mean '-std=c11'?
Process terminated with status 1 (0 minute(s), 0 second(s))

VersionHelpers.h: No such file or directory

Trying to build and run the simulator, got fatal build error:

VersionHelpers.h: No such file or directory

Steps taken: downloaded and installed CodeBlocks 20.03 with MinGW. Downloaded the simulator project and LVGL files:

D:\Development\Arduino>git clone https://github.com/lvgl/lv_sim_codeblocks_win.git
Cloning into 'lv_sim_codeblocks_win'...
remote: Enumerating objects: 175, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 175 (delta 1), reused 8 (delta 1), pack-reused 160
Receiving objects: 100% (175/175), 162.82 KiB | 0 bytes/s, done.
Resolving deltas: 100% (102/102), done.

D:\Development\Arduino>cd lv_sim_codeblocks_win

D:\Development\Arduino\lv_sim_codeblocks_win>git submodule update --init --recursive
Submodule 'lv_drivers' (https://github.com/littlevgl/lv_drivers) registered for path 'lv_drivers'
Submodule 'lv_examples' (https://github.com/littlevgl/lv_examples) registered for path 'lv_examples'
Submodule 'lvgl' (https://github.com/littlevgl/lvgl) registered for path 'lvgl'
Cloning into 'D:/Development/Arduino/lv_sim_codeblocks_win/lv_drivers'...
Cloning into 'D:/Development/Arduino/lv_sim_codeblocks_win/lv_examples'...
Cloning into 'D:/Development/Arduino/lv_sim_codeblocks_win/lvgl'...
Submodule path 'lv_drivers': checked out '5b78b785a9b28b9c86c7af8ef1bc76ba2d49107e'
Submodule path 'lv_examples': checked out '1fa0de125f886bad2c9b0b4c399e156129e40fca'
Submodule path 'lvgl': checked out '77c61aa2975ee55f9ac2c88feeccce3c327ae0c3'

D:\Development\Arduino\lv_sim_codeblocks_win>

Opened LittlevGL.cbp in CodeBlocks and did Build and Run:

=== Build: Debug in LittlevGL (compiler: GNU GCC Compiler) ===
D:\Development\Arduino\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c|15|fatal error: VersionHelpers.h: No such file or directory
=== Build finished: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===

Not even sure where to begin resolving....

LittlevGL lv_sim_codeblocks_win using code::blocks how to configure simulator for monochrome display

Hi, I am trying to use PC simulator for setting up a monochrome display 64x128. Though I setup the lv_conf.h color depth to 1, it's just showing white background color, no buttons are shown (button is present as I get clicks event by clicking randomly on the screen).

I saw this blog:
lvgl/lv_port_pc_eclipse#7
I can't find img_benchmark_bg.c in the environment.

Any idea what I am supposed to do? Please help.

I am developing this for Winstar Oled WEO012864VWPP3N0Y000 monochrome display 128x64. Is there a driver available for this?
Thank you.

The project v8 is not build on win7x32

With new windows driver (win32drv), which include VersionHelpers.h, I received a "...not found" error. After setup Windows SDK and write file paths in project settings, I received "C:\Program Files\Windows Kits\10\Include\10.0.19041.0\um\winnt.h|1035|error: #error Must define a target architecture.|" error and a few"unknown type name" and "conflicting types".
CodeBlocks 20.03, Windows 7x32, new project lv_sim_codeblocks.

Update to v8

Some people asked me about v8 version of the CodeBlocks repo.

@embeddedt will you have time/interest to update it?

I already tried to update it and it worked but I had ~5 FPS. 🙁

Buttons are not shown in window header

When using lvgl 7.0dev, the buttons added to the window header with the function
'''
lv_win_add_btn(win, LV_SYMBOL_SETTINGS);
'''
are not shown. I have tested my app, and also the lv_ex_win_1 example, and they not show in any of them

Alex

Cloning submodule dosen't work.

Hi,
I am trying to test the simulator but cannot clone the submodule.

E:\test_LVGL\lv_sim_codeblocks_win>git submodule update --init --recursive
Cloning into 'E:/test_LVGL/lv_sim_codeblocks_win/lvgl'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 1542 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
fatal: clone of 'https://github.com/lvgl/lvgl' into submodule path 'E:/test_LVGL/lv_sim_codeblocks_win/lvgl' failed
Failed to clone 'lvgl'. Retry scheduled
Cloning into 'E:/test_LVGL/lv_sim_codeblocks_win/lvgl'...
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
error: 3877 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
fatal: clone of 'https://github.com/lvgl/lvgl' into submodule path 'E:/test_LVGL/lv_sim_codeblocks_win/lvgl' failed
Failed to clone 'lvgl' a second time, aborting

Do you have any solution or work around?

compile faild

-------------- Build: Debug in LittlevGL (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -g -DWINVER=0x0601 -DWIN32 -D_WIN32 -I. -I. -Ilvgl -c F:\Code\codeblock-Lvgl\lv_sim_codeblocks_win\lvgl\src\drivers\display\tft_espi\lv_tft_espi.cpp -o obj\Debug\lvgl\src\drivers\display\tft_espi\lv_tft_espi.o
Execution of 'g++.exe -Wall -g -DWINVER=0x0601 -DWIN32 -D_WIN32 -I. -I. -Ilvgl -c F:\Code\codeblock-Lvgl\lv_sim_codeblocks_win\lvgl\src\drivers\display\tft_espi\lv_tft_espi.cpp -o obj\Debug\lvgl\src\drivers\display\tft_espi\lv_tft_espi.o' in 'F:\Code\codeblock-Lvgl\lv_sim_codeblocks_win' failed.

After Selecting Type "Console application" compile errors comes

Hi,
Great Lib , Thankyou so much for lib.
I have successfully run PC simulation using Code::Blocks 20.03.
I want to printf output in console for below code (its for example).

#include <stdlib.h>
#include <stdio.h>
static void my_event_cb(lv_obj_t * obj, lv_event_t event)
{
switch(event) {
case LV_EVENT_PRESSED:
printf("Pressed\n");
break;
case LV_EVENT_CLICKED:
printf("Clicked\n");
break;
}
}

for that I have made some steps
project LittlevGL-> right click , then "Properties...", then Tab "Build targets", then change "Type"= "GUI application to Console application"

after above steps , I "Rebuild" the project , now its shows some errors

lv_drivers\win_drv.c|218|undefined reference to CreateBitmap@20'| lv_drivers\win_drv.c|223|undefined reference to CreateCompatibleDC@4'|
lv_drivers\win_drv.c|224|undefined reference to SelectObject@8'| lv_drivers\win_drv.c|226|undefined reference to BitBlt@36'|
lv_drivers\win_drv.c|228|undefined reference to SelectObject@8'| lv_drivers\win_drv.c|229|undefined reference to DeleteDC@4'|
lv_drivers\win_drv.c|232|undefined reference to `DeleteObject@4'|
||error: ld returned 1 exit status|
||=== Build failed: 8 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

if I reverse all steps back
project LittlevGL-> right click , then "Properties...", then Tab "Build targets", then change "Type"= " Console application to GUI application"
Simulation works fine, but no console or printf text.

Please help me out... I want to check events call function by using console.. Or any other method for checking this please mention. Thanks

Build Errors

Hi, how can I solve these build errors?

obj\Debug\lv_examples\lv_apps\sysmon\sysmon.o: In function `sysmon_task':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lv_examples/lv_apps/sysmon/sysmon.c:130: undefined reference to `lv_snprintf'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lv_examples/lv_apps/sysmon/sysmon.c:148: undefined reference to `lv_snprintf'
obj\Debug\lvgl\src\lv_core\lv_group.o: In function `lv_group_create':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_group.c:66: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_group.c:66: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_group.o: In function `lv_group_add_obj':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_group.c:142: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_group.c:142: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_create':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:149: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:149: undefined reference to `lv_debug_log_error'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:227: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:227: undefined reference to `lv_debug_log_error'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:230: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:230: undefined reference to `lv_debug_log_error'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:321: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:321: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_del':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:402: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:402: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_del_async':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:487: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:487: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_clean':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:497: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:497: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_invalidate':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:515: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:515: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_set_parent':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:564: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:564: undefined reference to `lv_debug_log_error'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:565: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:565: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_move_foreground':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:604: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:604: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_move_background':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:627: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:627: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_set_pos':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:656: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:656: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_set_x':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:705: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:705: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_set_y':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:717: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:717: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_set_size':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:730: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:730: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_set_width':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:785: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:785: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_set_height':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:797: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:797: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_align':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:812: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:812: undefined reference to `lv_debug_log_error'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:821: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:821: undefined reference to `lv_debug_log_error'
obj\Debug\lvgl\src\lv_core\lv_obj.o: In function `lv_obj_align_origo':
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:962: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:962: undefined reference to `lv_debug_log_error'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:974: undefined reference to `lv_debug_check_null'
D:/LittlevGL/lv_sim_codeblocks_win-master/lv_sim_codeblocks_win-master/lvgl/src/lv_core/lv_obj.c:974: undefined reference to `lv_debug_log_error'
Process terminated with status 1 (0 minute(s), 39 second(s))
50 error(s), 654 warning(s) (0 minute(s), 39 second(s))
 

../../lv_demo.h: No such file or directory

It's funny, cause this worked on my home machine, but laptop gives me trouble. Maaaaaybe has something to do with the fact I have cygwin install in the system, but then again I tried to remove it from path and to explicitely set the mingw version of files in the Toolchain setting.

||=== Build: Debug in LittlevGL (compiler: GNU GCC Compiler) ===| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo_benchmark\assets\img_benchmark_cogwheel_alpha16.c|1|fatal error: ../../lv_demo.h: No such file or directory| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo_benchmark\assets\img_benchmark_cogwheel_argb.c|1|fatal error: ../../lv_demo.h: No such file or directory| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo_benchmark\assets\img_benchmark_cogwheel_chroma_keyed.c|1|fatal error: ../../lv_demo.h: No such file or directory| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo_benchmark\assets\img_benchmark_cogwheel_indexed16.c|1|fatal error: ../../lv_demo.h: No such file or directory| ||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo_benchmark\assets\lv_font_montserrat_12_compr_az.c|1|fatal error: ../../lv_demo.h: No such file or directory| ||=== Build failed: 5 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo_benchmark\assets\img_benchmark_cogwheel_rgb.c|1|fatal error: ../../lv_demo.h: No such file or directory| ||=== Build failed: 6 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo_benchmark\assets\lv_font_montserrat_28_compr_az.c|1|fatal error: ../../lv_demo.h: No such file or directory| ||=== Build failed: 7 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo_benchmark\assets\lv_font_montserrat_16_compr_az.c|1|fatal error: ../../lv_demo.h: No such file or directory| ||=== Build failed: 8 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

If I go to Header/lv_demos/src/ , Right-Click the lv_demo.h (which is grayed out), go Options->Enable both, then I get
||=== Build: Debug in LittlevGL (compiler: GNU GCC Compiler) ===| C:\Users\Valeriy\Downloads\lv_sim_codeblocks_win\lv_demos\src\lv_demo.h|17|fatal error: ../lv_demo.h: No such file or directory| ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

and so on it goes. Somewhere down the road it comes to headers, which are not found even if I do the Options-> Enable both thing.

The display is incomplete,when direct_mode = 1

LVGL version

v8.3.11

What happened?

Conditions:

  1. Using the lv_port_win_codeblocks project, the lvgl version is V8.3.11.
  2. 32-bit Color depth
  3. set full_refresh=0 for partial refresh
  4. set direct_mode=1
  5. set background transparency
  6. use the following code in the main function to repeat the problem
lv_obj_t *scr = lv_scr_act();
lv_obj_set_style_bg_opa(scr, LV_OPA_TRANSP, 0); //Full transparent background
lv_example_anim_2();
lv_example_png_1();

Background transparency needs to be set, otherwise the problem cannot be reproduced!

Normal

direct_mode0

Abnormal

direct_mode1

How to reproduce?

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int nCmdShow)
{
    /*Initialize LittlevGL*/
    lv_init();

    /*Initialize the HAL for LittlevGL*/
    lv_win32_init(hInstance, SW_SHOWNORMAL, 854, 480, NULL);

    /*Output prompt information to the console, you can also use printf() to print directly*/
    LV_LOG_USER("LVGL initialization completed!");

/** add my test **/
    lv_obj_t *scr = lv_scr_act();
    lv_obj_set_style_bg_opa(scr, LV_OPA_TRANSP, 0); //Full transparent background
    lv_example_anim_2();
    lv_example_png_1();
/*****************/

    while(!lv_win32_quit_signal) {
        /* Periodically call the lv_task handler.
         * It could be done in a timer interrupt or an OS task too.*/
        lv_task_handler();
        usleep(10000);       /*Just to let the system breath*/
    }
    return 0;
}

codeblocks not escaping 'debugging session' / simulation

HI!
First of all thanks for providing this nice lib and even adding this handy simulation posibilities~!!

More or less from my start using the codeblocks sim I am experiencing some instabilities from exiting my lvgl GUI simulation. I compile and the start the debug session / simulation. When I am going for the next interation (stop sim, recode, restart sim) the GUI simulation does not end, codeblocks freezes. I have to forcefully kill the codeblocks and additionally end the littleVGL.exe in the processes list. (Codeblocks is telling me something like 'codeblocks is in the middle of compiling ... do you really wanna quit?') Then it will give me a new try. This however is not happening all the time but around 50% of me trying to end my simulation.
I tried running codeblocks in admin mode, but no luck.
For sure this can be independently from the codeblocks thing or have something to do with the mingw32/64 installation?
More about my system producing the problem:
it's Win10, what should I add here? Can I provide you some debug system information to get this ruled out? Sorry, but could you assist me in this? (If anything I am more used to debugging embedded stuff rather than Windows apps.)

BR

Change window size

Hi,

Thank you for this simulator. I try to change the resolution so it can fit for my LCD, but it does not change the window size of the Windows app. I haven't find where we can set that, yet. Any ideas ?

Keyboard not working in pc simulator

Hi, I try to run the simulator on PC, i use codeblocks-20.03mingw-setup.exe this file to install codeblock, yet after i clone this project and run it. I found that the keyboard not working on the demo, but I can use mouse to click and drag the widgets. But it does not response to any key pressed on my keyboard.

And I try to install the same version codeblocks on another pc, the same problem.

So is this simulator not support keyboard or some other problem? I watch some learning video on youtube, on the simulator inside the video, the keyboard works. And also I try the visual studio version simulator, keyboard works. So just problem on codeblocks?

Q: Blank project

Hello,

I would like to make new empty Codeblocks project and start from scratch with my project.

Could you please point me to which project I should choose from template or this is not recommendet at all?

Many thanks

Codeblocks reports some build errors: "sorry, unimplemented: non-trivial designated initializers not supported"

Hi,
I tried to build the last project taken from the Git, but Codeblocks (20.03) report to me some errors:

immagine

Below the complete list of errors:

||=== Build: Debug in LittlevGL (compiler: GNU GCC Compiler) ===|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_stress\assets\lv_font_montserrat_12_compr_az.c|312|sorry, unimplemented: non-trivial designated initializers not supported|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_stress\assets\lv_font_montserrat_16_compr_az.c|350|sorry, unimplemented: non-trivial designated initializers not supported|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_stress\assets\lv_font_montserrat_28_compr_az.c|500|sorry, unimplemented: non-trivial designated initializers not supported|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|204|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|205|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|206|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|208|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_lvgl_logo.c|203|warning: 'img_lvgl_logo' defined but not used [-Wunused-variable]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|256|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|257|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|258|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|260|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_clothes.c|255|warning: 'img_clothes' defined but not used [-Wunused-variable]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void color_changer_anim_cb(void*, int32_t)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|997|error: invalid conversion from 'void*' to 'lv_obj_t* {aka _lv_obj_t*}' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void color_changer_event_cb(lv_event_t*)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1023|error: invalid conversion from 'void*' to 'lv_obj_t* {aka _lv_obj_t*}' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void color_event_cb(lv_event_t*)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1061|error: invalid conversion from 'void*' to 'lv_palette_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1062|error: invalid conversion from 'int' to 'lv_palette_t' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1063|error: invalid conversion from 'int' to 'lv_palette_t' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void ta_event_cb(lv_event_t*)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1181|error: invalid conversion from 'void*' to 'lv_obj_t* {aka _lv_obj_t*}' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void calendar_event_cb(lv_event_t*)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1233|error: invalid conversion from 'void*' to 'lv_obj_t* {aka _lv_obj_t*}' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void slider_event_cb(lv_event_t*)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1256|error: invalid conversion from 'void*' to 'lv_coord_t* {aka short int*}' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1259|error: invalid conversion from 'void*' to 'lv_obj_draw_part_dsc_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void chart_event_cb(lv_event_t*)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1303|error: invalid conversion from 'void*' to 'lv_obj_draw_part_dsc_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1353|error: invalid conversion from 'const void*' to 'const lv_chart_series_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void shop_chart_event_cb(lv_event_t*)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1419|error: invalid conversion from 'void*' to 'lv_obj_draw_part_dsc_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1430|error: invalid conversion from 'void*' to 'lv_obj_draw_part_dsc_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter1_indic1_anim_cb(void*, int32_t)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1469|error: invalid conversion from 'void*' to 'lv_meter_indicator_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\src\extra\widgets\meter\lv_meter.h|232|note: initializing argument 2 of 'void lv_meter_set_indicator_end_value(lv_obj_t*, lv_meter_indicator_t*, int32_t)'|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter1_indic2_anim_cb(void*, int32_t)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1478|error: invalid conversion from 'void*' to 'lv_meter_indicator_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\src\extra\widgets\meter\lv_meter.h|232|note: initializing argument 2 of 'void lv_meter_set_indicator_end_value(lv_obj_t*, lv_meter_indicator_t*, int32_t)'|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter1_indic3_anim_cb(void*, int32_t)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1488|error: invalid conversion from 'void*' to 'lv_meter_indicator_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\src\extra\widgets\meter\lv_meter.h|232|note: initializing argument 2 of 'void lv_meter_set_indicator_end_value(lv_obj_t*, lv_meter_indicator_t*, int32_t)'|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter2_timer_cb(lv_timer_t*)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1497|error: invalid conversion from 'void*' to 'lv_meter_indicator_t**' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c||In function 'void meter3_anim_cb(void*, int32_t)':|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\lv_demo_widgets.c|1556|error: invalid conversion from 'void*' to 'lv_meter_indicator_t*' [-fpermissive]|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\src\extra\widgets\meter\lv_meter.h|216|note: initializing argument 2 of 'void lv_meter_set_indicator_value(lv_obj_t*, lv_meter_indicator_t*, int32_t)'|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|712|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|713|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|714|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|716|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lvgl\examples\assets\animimg001.c|711|warning: 'animimg001' defined but not used [-Wunused-variable]|
||=== Build failed: 33 error(s), 3 warning(s) (0 minute(s), 0 second(s)) ===|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|648|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|649|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|650|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|652|error: expected primary-expression before '.' token|
C:\Mirko\Work\00_Generale\LVGL\lv_sim_codeblocks_win\lv_examples\src\lv_demo_widgets\assets\img_demo_widgets_avatar.c|647|warning: 'img_demo_widgets_avatar' defined but not used [-Wunused-variable]|
||=== Build failed: 37 error(s), 4 warning(s) (0 minute(s), 0 second(s)) ===|

I can't understand how solve the above errors.

Many Thanks

Submodules?

I am completely new to this! What do you mean exactly "also update submodules" I have installed the correct version off codeblocks but the project will not build I assume because of this. Please excuse my ignorance.

littlevGL project - errors in Win32drv

downloaded the project from Github following the instructions but error involving the Win32drv during build.
Seen to be missing declarations of HTOUCHINPUT, IN, In_Opt etc definitions.
Are there settings I need to make or missing files?
Thanks in advance.
James

Error while building

Followed the tuto, got this while building. Im clueless.

\lv_sim_codeblocks_win\lvgl\src\drivers\windows\lv_windows_context.c: In function 'lv_windows_tick_count_callback':
**\lv_sim_codeblocks_win\lvgl\src\drivers\windows\lv_windows_context.c:133:22: warning: implicit declaration of function 'GetTickCount64'; did you mean 'GetTickCount'? [-Wimplicit-function-declaration]**
     return (uint32_t)GetTickCount64();
                      ^~~~~~~~~~~~~~
                      GetTickCount
\lv_sim_codeblocks_win\lvgl\src\drivers\windows\lv_windows_context.c: In function 'lv_windows_delay_callback':
**\lv_sim_codeblocks_win\lvgl\src\drivers\windows\lv_windows_context.c:138:27: warning: implicit declaration of function 'CreateWaitableTimerExW'; did you mean 'CreateWaitableTimerW'? [-Wimplicit-function-declaration]**
     HANDLE timer_handle = CreateWaitableTimerExW(
                           ^~~~~~~~~~~~~~~~~~~~~~
                           CreateWaitableTimerW
**\lv_sim_codeblocks_win\lvgl\src\drivers\windows\lv_windows_context.c:141:31: error: 'CREATE_WAITABLE_TIMER_MANUAL_RESET' undeclared (first use in this function)**
                               CREATE_WAITABLE_TIMER_MANUAL_RESET |
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\lv_sim_codeblocks_win\lvgl\src\drivers\windows\lv_windows_context.c:141:31: note: each undeclared identifier is reported only once for each function it appears in
**\lv_sim_codeblocks_win\lvgl\src\drivers\windows\lv_windows_context.c:142:31: error: 'CREATE_WAITABLE_TIMER_HIGH_RESOLUTION' undeclared (first use in this function)**
                               CREATE_WAITABLE_TIMER_HIGH_RESOLUTION,
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Process terminated with status 1 (0 minute(s), 8 second(s))
2 error(s), 2 warning(s) (0 minute(s), 8 second(s))

CreateProcess No such file or directory

I downloaded the emulator, then add the file in the parent directory, then in the emulator can run successfully, then save and close the emulator, the emulator open again will report CreateProcess No such file or directory

Here is my file directory, the .c file I wrote in the app.
After removing the app file from codeblock, re-saving and closing it, then opening it again, it works correctly, and I can add the app file here to run it, but after adding it, and then opening it again, it continues to report an error!

Translated with DeepL.com (free version)

image

"demo.c - No such file or directory"

I tried downloading the codeblocks simulator according to the instructions: Clone the repository first and then update the submodules (I copy & pasted the commands). When I build the project in Codeblocks it fails with some warnings and one error:

"demo.c No such file or directory"

Can someone help me? How do I fix this, I cant figure out where the demo.c is required

Submodules are not updated

Hi,

I see that submodules are all at version 7.5 and recent version of them is 7.11 (v 8 in testing stage) so I would like to know if there is way how update those modules to current version.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.