Code Monkey home page Code Monkey logo

lv_port_pc_eclipse's Introduction

Eclipse Simulator for LVGL (using SDL)

The LVGL is written mainly for microcontrollers and embedded systems however you can run the library on your PC as well without any embedded hardware. The code written on PC can be simply copied when your are using an embedded system.

The PC simulator is cross platform. Windows, Linux and OSX are supported, however on Windows it's easier to get started with a another simulator project.

This project uses Eclipse CDT (as an IDE) and SDL =a low level driver library to open a window, and handle mouse, keyboard etc.)

Get started

Install Packages

On Linux you can easiyl install it the requirements via terminal:

sudo apt-get update && sudo apt-get install -y build-essential libsdl2-dev libsdl2-image-dev libjpeg-dev libpng-dev

Or you can download SDL from https://www.libsdl.org/.

Get this project

Clone this repository and the related submodules to the workspace folder of Eclipse:

git clone --recursive https://github.com/lvgl/lv_port_pc_eclipse

Import the PC simulator project

  1. Open Eclipse CDT
  2. Click File->Import and choose General->Existing project into Workspace
  3. Browse the root directory of the project and click Finish
  4. Build your project and run it

This configures in this project, but if you start a new Eclipse project due to an Eclipse bug you need modify the Assembler command:

  1. In Project properties -> C/C++ build -> Settings -> Cross GCC Assembler -> Command: change as to gcc
  2. On the same place: Cross GCC Assembler -> General -> Assembler flags: add -c

CMake

The following steps can be used with CMake on a Unix-like system. This may also work on other OSes but has not been tested.

  1. Ensure CMake is installed, i.e. the cmake command works on the terminal.
  2. Make a new directory. The name doesn't matter but build will be used for this tutorial.
  3. Type cd build.
  4. Type cmake ... CMake will generate the appropriate build files.
    • To build with SDL draw unit, add -DLV_USE_DRAW_SDL=ON to command line
    • To build with libpng to support PNG image, add -DLV_USE_LIBPNG=ON to command line
    • To build with libjpeg-turbo to support JPEG image, add -DLV_USE_LIBJPEG_TURBO=ON to command line
  5. Type make -j or (more portable) cmake --build . --parallel.

NOTE: --parallel is supported from CMake v3.12 onwards. If you are using an older version of CMake, remove --parallel from the command or use the make option.

  1. The binary will be in ../bin/main, and can be run by typing that command.

Docker

  1. Build the docker container
docker build -t lvgl_simulator .
  1. Run the docker container
docker run lvgl_simulator

GUI with docker is platform dependent. For example, on macOS you can follow this tutorial and run a command similar to:

docker run -e DISPLAY=10.103.56.101:0 lvgl_simulator

Note that on macOS, you may need to enable indirect GLX rendering before starting Xquartz:

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
open -a Xquartz

For Linux environments with X Server, the following will the docker run command. Note that the first command, xhost + grants access to X server to everyone.

xhost +
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix:ro -t lvgl_simulator

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request!

If you find an issue, please report it on GitHub!

lv_port_pc_eclipse's People

Contributors

babldev avatar besitzeruf avatar brianpugh avatar c47d avatar chamilad avatar chenshijianworkgit avatar embeddedt avatar imliubo avatar kisvegabor avatar martinjankoehler avatar mourinaruto avatar rmshub avatar seyyah avatar w-mai avatar xuneo 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  avatar  avatar  avatar

lv_port_pc_eclipse's Issues

SegFault in Demo

During demo_create()->write_create(), .... Every call to get_glyph_dsc_id() (in lv_font_fmt_txt.c), when trying to assign to fdsc members (last_letter or last_glyph_id), I get a segfault. Fortunately, these are just caching assignments, and commenting out these assignments (there are 4 in total) allows the code to run, but I would like to help others who might run into this.

From digging around the code, it would seem that the pointer font->dsc exists and there is memory at the pointer. Other members at that pointer seem to have valid data, too. However, there seems to be a problem writing to the "last" members at this memory. I just did a test assignment to another part of that struct (cmap_num) and it also segfaulted.

Does anyone have any ideas?

Background: I downloaded (not cloned) the PC simulator code. Had to change #define USE_FBDEV to 0. I am using Eclipse CDT and MinGW64. No other changes.

Not working on OS X (High Sierra 10.13.6, Eclipse Oxygen)

I've cloned pc_simulator, installed sdl with brew, imported the project into Eclipse Oxygen, and click the build icon.
main.c builds ok, but the link fails.

It seems that objects or libraries are missing.

I tried running make from the root directly, which then built the demo (which doesn't run). I tried adding those objects to the pc_simulator link and it did compile, but again didn't run.

How can I get this running on OS X?

make all 
Building file: ../main.c
Invoking: Cross GCC Compiler
gcc -I"/Users/brendan/Sandbox/littlevgl/pc_simulator" -O0 -Og -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.c"
Finished building: ../main.c
 
Building target: pc_simulator
Invoking: Cross GCC Linker
gcc  -o "pc_simulator"  ./main.o   
Undefined symbols for architecture x86_64:
  "_SDL_CreateThread", referenced from:
      _hal_init in main.o
  "_SDL_Delay", referenced from:
      _tick_thread in main.o
  "_demo_create", referenced from:
      _main in main.o
  "_lv_disp_drv_init", referenced from:
      _hal_init in main.o
  "_lv_disp_drv_register", referenced from:
      _hal_init in main.o
  "_lv_indev_drv_init", referenced from:
      _hal_init in main.o
  "_lv_indev_drv_register", referenced from:
      _hal_init in main.o
  "_lv_init", referenced from:
      _main in main.o
  "_lv_task_handler", referenced from:
      _main in main.o
  "_lv_tick_inc", referenced from:
      _tick_thread in main.o
  "_monitor_fill", referenced from:
      _hal_init in main.o
  "_monitor_flush", referenced from:
      _hal_init in main.o
  "_monitor_init", referenced from:
      _hal_init in main.o
  "_monitor_map", referenced from:
      _hal_init in main.o
  "_mouse_init", referenced from:
      _hal_init in main.o
  "_mouse_read", referenced from:
      _hal_init in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pc_simulator] Error 1

video tutorial for pc_simulator_v5_2

hi all,
is there is any video tutorial for pc_simulator_v5_2? - software will definitely will help a lot.as i had tried but not able to install it

Can you provide a CMakeLists. txt?

I started learning Linux today. But I would never build a project without IDE.
my os is ubuntu 18.04

`
cmake_minimum_required(VERSION 3.10)

project(lvgl)

set(CMAKE_C_STANDARD 11)#C11

set(CMAKE_CXX_STANDARD 17)#C17

set(CMAKE_CXX_STANDARD_REQUIRED ON)

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})

file(GLOB_RECURSE INCLUDES "lv_drivers/.h" "lv_drivers/.hpp" "lv_examples/.h" "lv_examples/.hpp" "lvgl/.h" "lvgl/.hpp")

file(GLOB_RECURSE SOURCES "lv_drivers/.c" "lv_drivers/.cpp" "lv_examples/.c" "lv_examples/.cpp" "lvgl/.c" "lvgl/.cpp")

ADD_DEFINITIONS (-O3 -g3 -I -Wall -Wshadow -Wundef -Wmaybe-uninitialized -fbounds-check)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/firmware)

LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})

add_executable(main ${SOURCES} ${INCLUDES})

add_custom_target (run COMMAND ${EXECUTABLE_OUTPUT_PATH}/main)
`

[v7.0] Keyboard - Can't input more than "max_length" total characters in password mode

I am trying to create a simple T9 keyboard to input a pin number (4 numbers). It has all 10 numbers and a backspace button (LV_SYMBOL_BACKSPACE).

I created a text area on this keyboard with the password mode enabled and a max length of 4 characters.

I have the following issue:

  • The text area only accepts a total of 4 characters, regardless if I delete any.
    So, if I input 4 numbers and then delete any, I can't write any more numbers on it. Unless I delete all the numbers, then I can input only the first number (this is constant - I can always input the number on the first position).

  • If I input 3 numbers and delete one, I can input 1 more number (totaling 4 inputs) and then I cannot input any more numbers unless I delete every input. In which case I can only input on the first position, as before.

  • If I input 2 numbers, delete one, input 1 again (3 total), delete one, input 1 (4 total) I reach the same state. Can't input any unless I delete all, then can only input on the first position.

If I don't enable password mode, everything works fine and I can always input up to 4 numbers, regardless if I delete any.
There seems to be an issue between lv_textarea_set_max_length and lv_textarea_set_pwd_mode.

Here's the code I'm running:

const char * map_pin_kb[] = {"1", "2", "3", "\n",
                                               "4", "5", "6", "\n",
                                               "7", "8", "9", "\n",
                                               " ", "0", LV_SYMBOL_BACKSPACE, ""
};
void create_pin_menu(lv_obj_t * parent)
        static lv_style_t style_pin_kb;
	lv_style_init(&style_pin_kb);
	lv_style_set_bg_color(&style_pin_kb, LV_STATE_DEFAULT, LV_COLOR_WHITE);
	lv_style_set_border_width(&style_pin_kb, LV_STATE_DEFAULT, 0);
	lv_style_set_text_font(&style_pin_kb, LV_STATE_DEFAULT, &lv_font_montserrat_26);

	lv_btnmatrix_ctrl_t kb_pin_ctrl_map[12] = {
            1, 1, 1,
            1, 1, 1,
            1, 1, 1,
            1 | LV_BTNMATRIX_CTRL_HIDDEN, 1, 1
	};

	lv_obj_t * kb_pin = lv_keyboard_create(parent, NULL);
	lv_keyboard_set_map(kb_pin, LV_KEYBOARD_MODE_NUM, map_pin_kb);
	lv_keyboard_set_mode(kb_pin, LV_KEYBOARD_MODE_NUM);
	lv_btnmatrix_set_ctrl_map(kb_pin, kb_pin_ctrl_map);
	lv_btnmatrix_set_one_check(kb_pin, true);
	lv_obj_add_style(kb_pin, LV_KEYBOARD_PART_BG, &style_pin_kb);
	lv_obj_add_style(kb_pin, LV_KEYBOARD_PART_BTN, &style_pin_kb);
	lv_obj_set_size(kb_pin, 180, 190);
	lv_obj_align(kb_pin, NULL, LV_ALIGN_CENTER, -50, 0);
	lv_keyboard_set_cursor_manage(kb_pin, true);

	static lv_style_t style_ta_pin;
	lv_style_init(&style_ta_pin);
	lv_style_set_border_width(&style_ta_pin, LV_STATE_DEFAULT, 3);
	lv_style_set_text_color(&style_ta_pin, LV_STATE_DEFAULT, LV_COLOR_BLUE);
	lv_style_set_text_font(&style_ta_pin, LV_STATE_DEFAULT, &lv_font_montserrat_24);

	lv_obj_t * ta_pin = lv_textarea_create(parent, NULL);
	lv_obj_add_style(ta_pin, LV_PAGE_PART_BG, &style_ta_pin);
	lv_obj_set_width(ta_pin, 80);
	lv_obj_align(ta_pin, kb_pin, LV_ALIGN_OUT_RIGHT_MID, 20, 4);
	lv_textarea_set_pwd_mode(ta_pin, true);
        lv_textarea_set_pwd_show_time(ta_pin, 0);
        lv_textarea_set_one_line(ta_pin, true);
	lv_textarea_set_text(ta_pin, "");
        lv_textarea_set_max_length(ta_pin, 4);

	lv_keyboard_set_textarea(kb_pin, ta_pin);
}

Notes: Running on the master branch of lv_sim_eclipse_sdl in Eclipse IDE, ubuntu 18.04

change default keyboard

hi, how can i change default keyboard from English to another language such as persian, because i read the code and realize that the code have persian keyboard and font ,please help me

../hw/per/psp/pc/psp_tmr.c:13:21: fatal error: pthread.h: No such file or directory

Hi, this looks like a great library. I'm having an issue when I try and build:

17:43:43 ** Incremental Build of configuration Debug for project lv_pc **
make all
'Building file: ../hw/per/psp/pc/psp_tmr.c'
'Invoking: Cross GCC Compiler'
gcc -I"C:\Users\Josh\Documents\proj_pc" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"hw/per/psp/pc/psp_tmr.d" -MT"hw/per/psp/pc/psp_tmr.o" -o "hw/per/psp/pc/psp_tmr.o" "../hw/per/psp/pc/psp_tmr.c"
../hw/per/psp/pc/psp_tmr.c:13:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
compilation terminated.
hw/per/psp/pc/subdir.mk:21: recipe for target 'hw/per/psp/pc/psp_tmr.o' failed
make: * [hw/per/psp/pc/psp_tmr.o] Error 1

17:43:44 Build Finished (took 947ms)

Solved: git clone --recursive problem

We try to clone with recursive but I got error

$ git clone --recursive https://github.com/littlevgl/pc_simulator_sdl_eclipse.git
Cloning into 'pc_simulator_sdl_eclipse'...
remote: Enumerating objects: 30, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 936 (delta 13), reused 24 (delta 10), pack-reused 906
Receiving objects: 100% (936/936), 2.73 MiB | 67.00 KiB/s, done.
Resolving deltas: 100% (486/486), done.
Submodule 'lv_drivers' (https://github.com/littlevgl/lv_drivers.git) registered for path 'lv_drivers'
Submodule 'lv_examples' (https://github.com/littlevgl/lv_examples.git) registered for path 'lv_examples'
Submodule 'lvgl' (https://github.com/littlevgl/lvgl.git) registered for path 'lvgl'
Cloning into '/home/user/works/littlevgl/pc_simulator_sdl_eclipse/lv_drivers'...
remote: Enumerating objects: 90, done.        
remote: Counting objects: 100% (90/90), done.        
remote: Compressing objects: 100% (46/46), done.        
remote: Total 1040 (delta 51), reused 76 (delta 44), pack-reused 950        
Receiving objects: 100% (1040/1040), 269.13 KiB | 318.00 KiB/s, done.
Resolving deltas: 100% (709/709), done.
Cloning into '/home/user/works/littlevgl/pc_simulator_sdl_eclipse/lv_examples'...
remote: Enumerating objects: 251, done.        
remote: Counting objects: 100% (251/251), done.        
remote: Compressing objects: 100% (132/132), done.        
remote: Total 4738 (delta 145), reused 215 (delta 118), pack-reused 4487        
Receiving objects: 100% (4738/4738), 8.04 MiB | 244.00 KiB/s, done.
Resolving deltas: 100% (3286/3286), done.
Cloning into '/home/user/works/littlevgl/pc_simulator_sdl_eclipse/lvgl'...
remote: Enumerating objects: 87, done.        
remote: Counting objects: 100% (87/87), done.        
remote: Compressing objects: 100% (56/56), done.        
remote: Total 19701 (delta 48), reused 49 (delta 31), pack-reused 19614        
Receiving objects: 100% (19701/19701), 14.33 MiB | 245.00 KiB/s, done.
Resolving deltas: 100% (15621/15621), done.
error: Server does not allow request for unadvertised object 39fe8649543dcb2a2777ccee5d0b6714ee41f3bd
Fetched in submodule path 'lv_drivers', but it did not contain 39fe8649543dcb2a2777ccee5d0b6714ee41f3bd. Direct fetching of that commit failed.

And we found a workaround solution

$ cd pc_simulator_sdl_eclipse
$ rm -rf lv_drivers/ lv_examples/ lvgl/

$ git submodule update --remote
Submodule path 'lv_drivers': checked out 'b03533b909d1ec569700a72879b1ec7b4fb7c0a9'
Submodule path 'lv_examples': checked out '9a5a95ac4d3b86b62cb0917d3afdebb85bc990d3'
Submodule path 'lvgl': checked out '2cead48cd5ee23de05f7b11244021bb91f97d5e7

📋 Reference

  1. https://stackoverflow.com/questions/1979167/git-submodule-update

The program can't to run

I have generated an executable program but the runtime prompts some errors.

1522387759 1

It took me a long time to solve this problem, I hope you can help me

compile errors on Windows

Trying to compile PC Simulator on Windows 10 after following instruction on https://docs.littlevgl.com/en/html/get-started/pc-simulator.html

BUT ...got compile error due to the fact that lv_drivers/display/fbdev.c has include statements such as

#include <linux/fb.h>
#include <sys/mman.h>
#include <sys/ioctl.h>

Where do you download the include files?

Thx.


18:21:08 **** Incremental Build of configuration Debug for project pc_simulator ****
mingw32-make all 
'Building file: ../lv_drivers/display/fbdev.c'
'Invoking: Cross GCC Compiler'
gcc -I"D:\Eclipse_Cpp\pc_simulator_sdl_eclipse" -I"D:\Eclipse_Cpp\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin" -O0 -g3 -Wall -c -fmessage-length=0 -Wall -W -MMD -MP -MF"lv_drivers/display/fbdev.d" -MT"lv_drivers/display/fbdev.o" -o "lv_drivers/display/fbdev.o" "../lv_drivers/display/fbdev.c"
../lv_drivers/display/fbdev.c:17:10: fatal error: linux/fb.h: No such file or directory
 #include <linux/fb.h>
          ^~~~~~~~~~~~
compilation terminated.
mingw32-make: *** [lv_drivers/display/subdir.mk:35: lv_drivers/display/fbdev.o] Error 1
"mingw32-make all" terminated with exit code 2. Build might be incomplete.

Build instructions with Eclipse produce two errors

Following these instructions from README.md:

Import the PC simulator project
Open Eclipse CDT
Click File->Import and choose General->Existing project into Workspace
Browse the root directory of the project and click Finish
Build your project and run it

Results in two errors:

Errors (2 items)
Description Resource Path Location Type
fatal error: SDL2/SDL.h: No such file or directory keyboard.h /lv_dev_5/lv_drivers/indev line 20 C/C++ Problem
make: *** [lv_examples/lv_tests/lv_test_group/lv_test_group.o] Error 1 lv_dev_5 C/C++ Problem

This was fixed by doing:
sudo apt-get install libsdl2-dev
...and then rebuilding.

Note:
Be sure to select running as a "Local C/C++ application", rather than as a STM application.

docker run lvgl_simulator block

sudo docker run lvgl_simulator //block here until press CTRL+C

^Cused: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624
used: 10824 ( 17 %), frag: 1 %, biggest free: 54624

Allow cross-compilation

Please change the hard coded "CC = gcc" in the Makefile to "CC ?= gcc". This my entire proposed change, with the above being the most important part:

diff --git a/Makefile b/Makefile
index 4d9120d..1f6a6df 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@

Makefile

-CC = gcc
+CC ?= gcc
CFLAGS = -Wall -Wshadow -Wundef -Wmaybe-uninitialized
CFLAGS += -O3 -g3 -I./
LDFLAGS += -lSDL2 -lm
BIN = demo
-VPATH =
+VPATH =

LVGL_DIR = ${shell pwd}

@@ -85,12 +85,14 @@ OBJS = $(AOBJS) $(COBJS)
all: clean default

%.o: %.c

  •   @$(CC)  $(CFLAGS) -c $< -o $@
      @echo "CC $<"
    
  •   @$(CC)  $(CFLAGS) -c $< -o $@
    

default: $(AOBJS) $(COBJS) $(MAINOBJ)
$(CC) -o $(BIN) $(MAINOBJ) $(AOBJS) $(COBJS) $(LDFLAGS)

-clean:

  •   rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)
    

+clean:

  •   rm -f $(AOBJS) $(COBJS) $(MAINOBJ)
    

+maintainer-clean:

  •   rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)
    

[v7.0] Images rotated by default

Hi,
When I try to use images, they all show up slightly rotated by default.
Like this
image

This is how I'm declaring them:

    lv_img_set_src(img_var, &icon_user);
    lv_obj_set_pos(img_var, 22, 5);

    img_var = lv_img_create(parent, NULL);
    lv_img_set_src(img_var, &icon_manual);
    lv_obj_set_pos(img_var, 256, 3);

    img_var = lv_img_create(parent, NULL);
    lv_img_set_src(img_var, &icon_signal);
    lv_obj_set_pos(img_var, 294, 7);

I've checked the 7.0 API and examples but nothing seems different.

This did not happen before migrating to 7.0, it worked fine. And I've re-uploaded the images just to make sure.

Can't import to eclipse

Hi, your GUI is very fascinating , so i want to explore it.

Then i follow your guide step by step .

When i want to import project to eclipse, the eclipse warn can't find project file!

And i find your ".gitignore" file is ignored ".cproject" and ".settings" , i think it's why i can't import...

Please fix the bug.Thanks!

macOS build simulator pass, but not display window when running binary.

macOS 10.14.6
clang --version: Apple clang version 11.0.0 (clang-1100.0.33.17)
SDL2: 2.0.12
Makefile: just remove some WARNINGS, -Wall -Wextra -Wshadow -Wundef -Wmissing-prototypes \ -Wno-error=strict-prototypes -Wpointer-arith -fno-strict-aliasing -Wno-error=cpp \ -Wno-unused-parameter -Wno-missing-field-initializers -Wno-format-nonliteral -Wno-cast-qual -Wunreachable-code -Wno-switch-default \ -Wreturn-type -Wmultichar -Wformat-security -Wno-ignored-qualifiers -Wno-error=pedantic -Wno-sign-compare -Wno-error=missing-prototypes -Wdouble-promotion -Wdeprecated \ -Wempty-body -Wshift-negative-value \ -Wtype-limits -Wsizeof-pointer-memaccess -Wpointer-arith


When running the demo binary, the Dock is showing the demo icon, but not showing the display window.

Xnip2020-05-21_17-53-37

5.1.1 PC Simulation empty files

I have just downloaded the 5.1.1 PC simulation and the lv_drivers, lv_examples and lvgl folders are all empty! When I previously downloaded version 5.1.0 they were not empty and as expected (Although this was via the link from the https://littlevgl.com/download website so maybe this is intentional??)

cannot find -lmingw64

Hello, I have tried to build PC sim. 5.3, but I have follow error:

C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingw64

what's wrong here?

thanks

lv_label_set_text function bug!

hi , when i use this function like this:
lv_label_set_text(label,"سیب")
this show nothing in button
how can i display a non English word such persian or arabic

lvgl/lvgl.h : no such file or directory

Hello everyone,
I tried installing the pc simulator for windows. I firstly tried to make it work on eclipse and got the following error :

23:25:14 **** Incremental Build of configuration Debug for project lv_sim_eclipse_sdl-master ****
make all 
'Building file: ../main.c'
'Invoking: Cross GCC Compiler'
gcc -I"C:\Users\pauld\Documents\Eclipse Workspace\lv_sim_eclipse_sdl-master" -O0 -g3 -Wall -c -fmessage-length=0 -Wall -Wmaybe-uninitialized -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.c"
../main.c:16:10: fatal error: lvgl/lvgl.h: No such file or directory
 #include "lvgl/lvgl.h"
          ^~~~~~~~~~~~~
compilation terminated.
make: *** [subdir.mk:23: main.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

23:25:19 Build Failed. 2 errors, 0 warnings. (took 4s.473ms)

I then tried to make it work on codeblocks (as I read on an other issue that it was easier to make it work). But same problem again as you can read :

||=== Build: Debug in LittlevGL (compiler: GNU GCC Compiler) ===|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\display\fbdev.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\display\monitor.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\display\R61581.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\display\SSD1963.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\display\ST7565.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\indev\AD_touch.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\indev\evdev.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\indev\FT5406EE8.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\indev\keyboard.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\indev\mouse.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\indev\XPT2046.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_drivers\win_drv.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_apps\benchmark\benchmark.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_apps\benchmark\benchmark_bg.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_apps\demo\demo.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_apps\demo\img_bubble_pattern.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_apps\sysmon\sysmon.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_apps\terminal\terminal.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_apps\tpcal\tpcal.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_group\lv_test_group.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_misc\lv_test_task.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_obj\lv_test_obj.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_arc\lv_test_arc.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_bar\lv_test_bar.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_btn\lv_test_btn.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_btnm\lv_test_btnm.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_canvas\lv_test_canvas.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_cb\lv_test_cb.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_chart\lv_test_chart.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_cont\lv_test_cont.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_ddlist\lv_test_ddlist.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_gauge\lv_test_gauge.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_img\img_flower_icon.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_img\lv_test_img.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_1.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_2.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_3.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_4.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\lv_test_imgbtn.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_kb\lv_test_kb.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_label\lv_test_label.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_led\lv_test_led.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_line\lv_test_line.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_list\lv_test_list.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_lmeter\lv_test_lmeter.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_mbox\lv_test_mbox.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_page\lv_test_page.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_preload\lv_test_preload.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_roller\lv_test_roller.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_slider\lv_test_slider.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_sw\lv_test_sw.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_ta\lv_test_ta.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_table\lv_test_table.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_tabview\lv_test_tabview.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_tileview\lv_test_tileview.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_objx\lv_test_win\lv_test_win.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_stress\lv_test_stress.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_theme\lv_test_theme_1.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tests\lv_test_theme\lv_test_theme_2.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\10_keyboard\lv_tutorial_keyboard.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\1_hello_world\lv_tutorial_hello_world.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\2_objects\lv_tutorial_objects.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\3_styles\lv_tutorial_styles.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\4_themes\lv_tutorial_themes.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\5_antialiasing\apple_icon_alpha.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\5_antialiasing\apple_icon_chroma.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\5_antialiasing\lv_tutorial_antialiasing.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\6_images\flower_icon_alpha.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\6_images\lv_tutorial_images.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\6_images\red_flower.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\6_images\red_rose_16.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\7_fonts\arial_20.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\7_fonts\lv_tutorial_fonts.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\8_animations\lv_tutorial_animations.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lv_examples\lv_tutorial\9_responsive\lv_tutorial_responsive.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\porting\lv_port_disp_template.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\porting\lv_port_fs_template.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\porting\lv_port_indev_template.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_core\lv_debug.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_core\lv_disp.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_core\lv_group.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_core\lv_indev.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_core\lv_obj.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_core\lv_refr.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_core\lv_style.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_draw.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_draw_arc.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_draw_basic.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_draw_img.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_draw_label.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_draw_line.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_draw_rect.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_draw_triangle.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_img_cache.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_draw\lv_img_decoder.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font_fmt_txt.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font_roboto_12.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font_roboto_12_subpx.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font_roboto_16.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font_roboto_22.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font_roboto_28.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font_roboto_28_compressed.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_font\lv_font_unscii_8.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_hal\lv_hal_disp.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_hal\lv_hal_indev.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_hal\lv_hal_tick.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_anim.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_area.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_async.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_bidi.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_circ.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_color.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_fs.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_gc.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_ll.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_log.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_math.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_mem.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_printf.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_task.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_templ.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_txt.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_misc\lv_utils.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_arc.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_bar.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_btn.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_btnm.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_calendar.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_canvas.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_cb.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_chart.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_cont.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_cpicker.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_ddlist.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_gauge.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_img.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_imgbtn.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_kb.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_label.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_led.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_line.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_list.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_lmeter.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_mbox.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_objx_templ.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_page.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_preload.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_roller.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_slider.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_spinbox.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_sw.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_ta.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_table.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_tabview.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_tileview.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_objx\lv_win.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme_alien.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme_default.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme_material.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme_mono.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme_nemo.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme_night.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme_templ.c|
||WARNING: Can't read file's timestamp: C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\lvgl\src\lv_themes\lv_theme_zen.c|
C:\Users\pauld\Downloads\lv_sim_codeblocks_win-master\lv_sim_codeblocks_win-master\main.c|13|fatal error: lvgl/lvgl.h: No such file or directory|
||=== Build failed: 1 error(s), 166 warning(s) (0 minute(s), 0 second(s)) ===|

I must say I'm a bit of a newbie here, I mostly code on the arduino ide or in python. What did I do wrong ?

Thanks !

About the task's scheduled period ?

Hi, i have a question about the task's schedule period.

I have seen your code about function : ptask_exec.

Then i understood that the tasks will be execute every ptask_p->period times in millisecond.

But i also have seen your main function code:

while(1) {
        /* Periodically call the ptask handler.
         * It could be done in a timer interrupt or an OS task too.*/
        ptask_handler();
        usleep(5000);

    }

When i use the function: ptask_create to create a task, and parameter two is 5ms.

It seems like that the task will be execute every 25ms.

Did i wrong?

Why you use delay function at there?

PC Simulator v5.2 Build Error

Eclipse reported an error during a PC Simulator build (see below).

PC-Simulator v5.2
System: HP ZBook 15u G3
System Type: x64-based PC
OS Name: Microsoft Windows 10 Enterprise
Version: 10.0.17134 Build 17134
Build Env: msys64 / gcc (GCC) 7.3.0

Eclipse IDE for C/C++ Developers
Version: 2018-09 (4.9.0)
Build id: 20180917-1800

build errors

Description | Resource | Path | Location | Type
'_beginthreadex' undeclared (first use in this function) | monitor.c | /pc_simulator/lv_drivers/display | line 88 | C/C++ Problem
'_endthreadex' undeclared (first use in this function); did you mean '_beginthreadex'? | monitor.c | /pc_simulator/lv_drivers/display | line 88 | C/C++ Problem

full console log

08:52:08 **** Incremental Build of configuration Debug for project pc_simulator ****
Info: Internal Builder is used for build
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_drivers\indev\keyboard.o" "..\lv_drivers\indev\keyboard.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_fonts\lv_font_dejavu_30.o" "..\lvgl\lv_fonts\lv_font_dejavu_30.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_apps\demo\demo.o" "..\lv_examples\lv_apps\demo\demo.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_drivers\indev\evdev.o" "..\lv_drivers\indev\evdev.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_tutorial\4_themes\lv_tutorial_themes.o" "..\lv_examples\lv_tutorial\4_themes\lv_tutorial_themes.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_fonts\lv_font_builtin.o" "..\lvgl\lv_fonts\lv_font_builtin.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_tests\lv_test_theme\lv_test_theme.o" "..\lv_examples\lv_tests\lv_test_theme\lv_test_theme.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_apps\benchmark\benchmark_bg.o" "..\lv_examples\lv_apps\benchmark\benchmark_bg.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_tests\lv_test_objx\lv_test_gauge\lv_test_gauge.o" "..\lv_examples\lv_tests\lv_test_objx\lv_test_gauge\lv_test_gauge.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_tutorial\0_porting\lv_tutorial_porting.o" "..\lv_examples\lv_tutorial\0_porting\lv_tutorial_porting.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_objx\lv_line.o" "..\lvgl\lv_objx\lv_line.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_2.o" "..\lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_2.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_core\lv_group.o" "..\lvgl\lv_core\lv_group.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_objx\lv_ddlist.o" "..\lvgl\lv_objx\lv_ddlist.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_tutorial\6_images\red_flower.o" "..\lv_examples\lv_tutorial\6_images\red_flower.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_tutorial\5_antialiasing\apple_icon_alpha.o" "..\lv_examples\lv_tutorial\5_antialiasing\apple_icon_alpha.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_objx\lv_img.o" "..\lvgl\lv_objx\lv_img.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_examples\lv_tests\lv_test_objx\lv_test_page\lv_test_page.o" "..\lv_examples\lv_tests\lv_test_objx\lv_test_page\lv_test_page.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_objx\lv_tabview.o" "..\lvgl\lv_objx\lv_tabview.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_themes\lv_theme_nemo.o" "..\lvgl\lv_themes\lv_theme_nemo.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_drivers\display\fbdev.o" "..\lv_drivers\display\fbdev.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lvgl\lv_objx\lv_btnm.o" "..\lvgl\lv_objx\lv_btnm.c"
gcc "-IC:\sandbox\pc-simulator\pc_simulator" -O0 -g3 -Wall -c -fmessage-length=0 -o "lv_drivers\display\monitor.o" "..\lv_drivers\display\monitor.c"
In file included from /usr/include/SDL2/SDL_audio.h:35:0,
from /usr/include/SDL2/SDL.h:36,
from ..\lv_drivers\display\monitor.c:19:
..\lv_drivers\display\monitor.c: In function 'monitor_init':
..\lv_drivers\display\monitor.c:88:5: error: '_beginthreadex' undeclared (first use in this function)
SDL_CreateThread(monitor_sdl_refr_thread, "sdl_refr", NULL);
^
..\lv_drivers\display\monitor.c:88:5: note: each undeclared identifier is reported only once for each function it appears in
..\lv_drivers\display\monitor.c:88:5: error: '_endthreadex' undeclared (first use in this function); did you mean '_beginthreadex'?
SDL_CreateThread(monitor_sdl_refr_thread, "sdl_refr", NULL);
^

08:52:44 Build Failed. 2 errors, 0 warnings. (took 36s.29ms)

_BSD_SOURCE deprecated

@embeddedt
I saw that you added _BSD_SOURCE in 2bb03e7 but I got a wrning for it:

#warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]

Should we update it?

Window sometimes doesn't update

The simulator is a very nice tool!

However, sometimes the (SDL) window stops updating. I'm not sure of a clear way of reproducing yet, it works fine most of the time.

When the problem occurs, the window isn't redrawn, e.g. a blinking icon stops blinking, when I turn the mousewheel (encoder), the actual focus changes, but it isn't drawn on the screen.
Only in certain cases the window still does redraw, e.g. when I move my mouse over the minimize/close buttons of the SDL window (i.e. the OS title bar). So if I keep moving the mouse there, the window updates fine, as soon as I stop, the redrawing stops too.

I have to close the application and start it again. Sometimes it then doesn't work for a number of times, sometimes it starts working again. So far, it seems that it either 'just works' after starting and then keeps working, or it 'just doesn't work' after starting, and also stays broken until I restart.

I tried to debug it a bit, and it appears that sdl_refr_qry is still being set to true in monitor_flush() and being 'handled' (and set to false) in monitor_sdl_refr_core(). I compared the render code to SDL examples, and can't spot an obvious error in that either.

It happens both on my own code, and with lv_test_group_1().

So I have no clue why it may be happening...

Tags

@kisvegabor Could you create tags for different versions of lvgl? Right now the only tag present here is v5.2.

I have identified two commits for v5.3 and v6.0

v5.3: 7257873
update to lvgl v5.3
kisvegabor committed on Feb 1, 2019

v6.0: e36087b
Merge branch 'master' of https://github.com/littlevgl/pc_simulator
kisvegabor committed on Jun 30, 2019

develop Embedded GUI using frame buffer

I want to use this tutorial for embedded Linux frame buffer,
I have encountered two main Issues,
First
It cant be Cross compile easily

second
there is no tutorial for using Linux frame buffer

Mac Linking problem with pc simulator in Catalina

This problem was reportedly addressed previously, but with the latest code I'm running into the linking problem again trying to build the simulator.

12:21:34 **** Incremental Build of configuration Debug for project pc_simulator ****
make all
Building target: pc_simulator
Invoking: Cross GCC Linker
gcc -o "pc_simulator" ./main.o ./mouse_cursor_icon.o -lSDL2main -lSDL2 -lm
Undefined symbols for architecture x86_64:
"_demo_create", referenced from:
_main in main.o
"_keyboard_handler", referenced from:
_main in main.o
"_lv_disp_buf_init", referenced from:
_hal_init in main.o
"_lv_disp_drv_init", referenced from:
_hal_init in main.o
"_lv_disp_drv_register", referenced from:
_hal_init in main.o
"_lv_disp_get_scr_act", referenced from:
_hal_init in main.o
"_lv_img_create", referenced from:
_hal_init in main.o
"_lv_img_set_src", referenced from:
_hal_init in main.o
"_lv_img_src_get_type", referenced from:
_ICON_LVGL_runLength_info in main.o
"_lv_indev_drv_init", referenced from:
_hal_init in main.o
"_lv_indev_drv_register", referenced from:
_hal_init in main.o
"_lv_indev_set_cursor", referenced from:
_hal_init in main.o
"_lv_init", referenced from:
_main in main.o
"_lv_mem_monitor", referenced from:
_memory_monitor in main.o
"_lv_task_create", referenced from:
_hal_init in main.o
"_lv_task_handler", referenced from:
_main in main.o
"_lv_tick_inc", referenced from:
_tick_thread in main.o
"_monitor_flush", referenced from:
_hal_init in main.o
"_monitor_init", referenced from:
_hal_init in main.o
"_mouse_handler", referenced from:
_main in main.o
"_mouse_init", referenced from:
_hal_init in main.o
"_mouse_read", referenced from:
_hal_init in main.o
"_mousewheel_handler", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pc_simulator] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

I have the SDL2 libraries from brew.

Run pc_simulator with WSL + XServer from Windows 10

Hi,

I just wanted to share with you a new way to run simulation within Windows OS, with no need of an IDE.

All we need is:

  1. Windows Subsystem for Linux (WSL from now on). You can check how to install it from here

  2. Install a program to launch Server X within windows, eg: VcXsrv

  3. From WSL install SDL 2 dependencies for Linux as in documentation.

  4. Run xLaunch application installed on step 2 and keep it open.

  5. From WSL, compile project using: $> make.

  6. After compiling finishes, launch demo from WSL: $> ./demo. Now, on xLaunch application we can see the simulated screen.

Note: some other dependencies may be required as indicated on Dockerfile.

Display scaling

I am targeting a final display with 240x320 resolution.
On the pc simulator ( eclipse / linux ) the output display window is tiny.

How can I go about scaling the size of the simulator output up?
I would rather not apply a multiplier to the display resolution in lv_conf.h as it will impact expectations regarding final output and negatively impact dev turnaround.

Workaround to run under MacOS

Hi,

I just started using the PC_SIMULATOR under MacOS 10.12.6 and I ran into the following issue.

Using the default source code when running the pc_simulator application the app crashes with the following message

Martins-MacBook-Pro:Debug tinno$ ./pc_simulator
2018-04-03 10:17:46.692 pc_simulator[4326:483915] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fffcdaaf2cb __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fffe28c648d objc_exception_throw + 48
	2   AppKit                              0x00007fffcbc98e82 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4480
	3   SDL2                                0x00000001056195f5 SDL2 + 140789
	4   SDL2                                0x00000001056038dd SDL2 + 51421
	5   pc_simulator                        0x00000001053faa5b sdl_refr + 395
	6   SDL2                                0x00000001056176ac SDL2 + 132780
	7   SDL2                                0x0000000105617139 SDL2 + 131385
	8   libsystem_pthread.dylib             0x00007fffe33c593b _pthread_body + 180
	9   libsystem_pthread.dylib             0x00007fffe33c5887 _pthread_body + 0
	10  libsystem_pthread.dylib             0x00007fffe33c508d thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

This seems to be due to the fact that you can't Poll from event outside the main thread, at least it seems to be an issue on MacOS, I don't have experience with SDL. Currently monitor.c initialises SDL and monitors for mouse and keyboard events.

To workaround this issue, what I did was.

I modified monitor_init() so that the SDL initialisation is done from main.c thread like so,

void monitor_init(void)
{
	/*Initialize the SDL*/
    SDL_Init(SDL_INIT_VIDEO);

    SDL_SetEventFilter(quit_filter, NULL);

	window = SDL_CreateWindow("TFT Simulator",
		SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
		MONITOR_HOR_RES, MONITOR_VER_RES, 0);       /*last param. SDL_WINDOW_BORDERLESS to hide borders*/

	renderer = SDL_CreateRenderer(window, -1, 0);
	texture = SDL_CreateTexture(renderer,
		SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, MONITOR_HOR_RES, MONITOR_VER_RES);

	/*Initialize the frame buffer to gray (77 is an empirical value) */
	memset(tft_fb, 77, MONITOR_HOR_RES * MONITOR_VER_RES * sizeof(uint32_t));
	SDL_UpdateTexture(texture, NULL, tft_fb, MONITOR_HOR_RES * sizeof(uint32_t));
	sdl_refr_qry = true;

	SDL_CreateThread(sdl_refr, "sdl_refr", NULL);
	while(sdl_inited == false); /*Wait until 'sdl_refr' initializes the SDL*/
}

I then modified the monitor thread to just do the drawing routines,

static int sdl_refr(void * param)
{
    (void)param;
	sdl_inited = true;

	/*Run until quit event not arrives*/
	while(sdl_quit_qry == false) {

		/*Refresh handling*/
		if(sdl_refr_qry != false) {
            sdl_refr_qry = false;
            SDL_UpdateTexture(texture, NULL, tft_fb, MONITOR_HOR_RES * sizeof(uint32_t));
            SDL_RenderClear(renderer);
            SDL_RenderCopy(renderer, texture, NULL, NULL);
            SDL_RenderPresent(renderer);
		}

		/*Sleep some time*/
		SDL_Delay(SDL_REFR_PERIOD);
	}

	SDL_DestroyTexture(texture);
	SDL_DestroyRenderer(renderer);
	SDL_DestroyWindow(window);
	SDL_Quit();

	exit(0);

	return 0;
}

On the main.c thread I included the polling for mouse and keyboard events like so,

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

	    SDL_Event event;
	    while(SDL_PollEvent(&event)) {
#if USE_MOUSE != 0
            mouse_handler(&event);
#endif

#if USE_KEYBOARD
            keyboard_handler(&event);
#endif
	    }

    }

There is probably a better way to do this, but because I have zero experience with SDL I'm not sure of other solution may apply.

Cheers,
Martin

Suggestion: Visual studio support

Is it possible to support visual studio without sdl library? I know it's possible, just need so effort to port it.

A example project including simulator project is here https://github.com/rossumur/microtouch

This is originally for an atmega32u4, but since it's done very simple, it's easy to adapt! :)

Why am I suggesting this?
To get people to dev easier on the PC simulator by just a few steps to undertake.

lv_drv_conf.h` #if and #endif mismatch

The file lv_drv_conf.h has a mismatch between the #if statements at start of file and the corresponding #endif statements at the end of the file.

It's purely a semantic issue. Either the #if or the #endif statements needs to be swapped.

Also, if I edit this file, then I get merge conflicts when pulling changes. I would have thought this file should only exist as a template file to be copied, and should not exist in the repo.

#ifndef LV_DRV_CONF_H
#define LV_DRV_CONF_H
/*
 * COPY THIS FILE AS lv_drv_conf.h
 */

#if 1 /*Set it to "1" to enable the content*/

....

#endif  /*LV_DRV_CONF_H*/

#endif /*End of "Content enable"*/

Eclipse simulator project: Release build error (arial20.c)

Hello,
building the LittleVL pc_simulator Eclipse project (Eclipse IDE for C/C++ Developers Version: 2020-03 (4.15.0) Build id: 20200313-1211) on Ubuntu 18.04 fails in Release configuration.
Builds OK in Debug configuration.

Build error:


Building file: ../lv_examples/lv_tutorial/7_fonts/arial_20.c
Invoking: Cross GCC Compiler
gcc -I"/home/fernando/src/eclipse-workspace" -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"lv_examples/lv_tutorial/7_fonts/arial_20.d" -MT"lv_examples/lv_tutorial/7_fonts/arial_20.o" -o "lv_examples/lv_tutorial/7_fonts/arial_20.o" "../lv_examples/lv_tutorial/7_fonts/arial_20.c"
../lv_examples/lv_tutorial/7_fonts/arial_20.c:1:10: fatal error: lvgl/lvgl.h: No such file or directory
 #include "lvgl/lvgl.h"
          ^~~~~~~~~~~~~
compilation terminated.
make: *** [lv_examples/lv_tutorial/7_fonts/arial_20.o] Error 1
lv_examples/lv_tutorial/7_fonts/subdir.mk:21: recipe for target 'lv_examples/lv_tutorial/7_fonts/arial_20.o' failed
"make all" terminated with exit code 2. Build might be incomplete.

Version for Codeblocks

Hello,
I have just ported Eclipse project to Codevision, may be it would be interested for other users?
Codeblocks seems to be more quicky and reliable and doesn't need anything to be installed, MinGW comes already with the software and you need only SDL2 includes and libraries to be able to run simulation project.
Waiting for your reply.

Regression: Crash under Mac OSX because SDL_PollEvent() is being called from non-main thread

I just tried building from the github master and running on my system (High Sierra, eclipse, sdl2 installed from Homebrew) and got the same crash. The only change I needed to make to get it to build was to remove the #define of USE_FBDEV in lv_drv_conf.h.

It looks like the SDL event pump is still running from the monitor thread.

It looks like this was broken in commit 5e42767 when SDL_PollEvent() was added to monitor_sdl_refr_core().

crash_report.txt

Originally posted by @bikeNomad in https://github.com/littlevgl/pc_simulator/issue_comments#issuecomment-430713089

Cross compiling demo application failed

Hi,
I have downloaded the PC simulator and I was able to run the demo application on PC. But my end goal was to run the demo application on i.MX6. So, for that I was trying to cross compile the PC simulator project but it was failed. The error is as below:
lv_drivers/display/monitor.c:19:34: fatal error: SDL2/SDL.h: No such file or directory
compilation terminated.
Makefile:45: recipe for target 'lv_drivers/display/monitor.o' failed
make: *** [lv_drivers/display/monitor.o] Error 1

Is it possible to add dev-5.2 branch to pc_simulator?

Hi, the lvgl master is already updated to dev-5.2 but it looks like pc_simulator version still not have dev-5.2 changes.
If someone who experiment with pc_simulator version will not get the dev-5.2 in this case (even for PR).
Could you please let me know whether this can be updated accordingly.

NEED FOR HELP

Hello,boys:
I used eclipse CDT to run this code,but got an error.
"../main.c:44:5: error: conflicting types for 'SDL_main'
int main (void)"
How to solve this problem?

problems in building the project by eclipse in Mac OS X

build the project by eclipse in Mac OS X ,build error:
ld: library not found for -lSDL2
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have already install SDL ,Copy the SDL2.framework to /Library/Frameworks
Could you help me

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.