espressif / esp-dev-kits

Docs, Schematics, Factory Firmwares for ESP Development Kits
Other
352 stars 184 forks source link

runing the LVGL demo with a slight modification (AEGHB-638) #94

Closed ganindu7 closed 5 months ago

ganindu7 commented 5 months ago

Answers checklist.

General issue report

I'm trying to run the lvgl demo with a slight modification tot he graphics asset. (just to understand how this works becase I am not familiar with ESP32 at all.

all I did was simply modify the .png file {............}/examples/lvgl_demos/components/lvgl__lvgl/demos/widgets/assets/avatar.png

then I ran

idf.py fullclean

and

idf.py -p /dev/ttyUSB0 flash monitor

bit I keep getting the old avarar.png I guess that this is becase this is coming from a binary blob being used instead of my changes.

my question is how do I get to the point where my changes get reflected downstream.

is there a setting to force rebuild including my changes.

Lzw655 commented 5 months ago

Hi @ganindu7, did you copy the component lvgl__lvgl from the folder {............}/examples/lvgl_demos/managed_components to the folder {............}/examples/lvgl_demos/components? If so, please also delete the file {............}/examples/lvgl_demos/dependencies.lock and build again. Otherwise, the project will always use the lvgl in the folder {............}/examples/lvgl_demos/managed_components.

ganindu7 commented 5 months ago

Thanks will do and let you know

Sent from Gmail Mobile

On Tue, 7 May 2024 at 02:51, Zhongwei Liu @.***> wrote:

Hi @ganindu7 https://github.com/ganindu7, did you copy the component lvgl__lvgl from the folder {............}/examples/lvgl_demos/managed_components to the folder {............}/examples/lvgl_demos/components? If so, please also delete the file {............}/examples/lvgl_demos/dependencies.lock and build again. Otherwise, the project will always use the lvgl in the folder {............}/examples/lvgl_demos/managed_components.

— Reply to this email directly, view it on GitHub https://github.com/espressif/esp-dev-kits/issues/94#issuecomment-2097234478, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG4JUSIJNCPKFUS4YARIMLZBAXRVAVCNFSM6AAAAABHA7J3TWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJXGIZTINBXHA . You are receiving this because you were mentioned.Message ID: @.***>

ganindu7 commented 5 months ago

Hi I have deleted the lock but it still builds the same way (with the default demo not changing)

I have added my folder structure from my workspace(with depeth limited to 3 for clarity) can you splot anything wrong here.

ganindu@pc:~/Workspace/sandbox/expressif/workspace/lcd-dev-board/examples/lvgl_demos$ tree -d -L 3
.
├── build
│   ├── bootloader
│   │   ├── CMakeFiles
│   │   ├── config
│   │   └── esp-idf
│   ├── bootloader-prefix
│   │   ├── src
│   │   └── tmp
│   ├── CMakeFiles
│   │   ├── 3.22.1
│   │   ├── bootloader.dir
│   │   ├── CMakeTmp
│   │   ├── git-data
│   │   └── lvgl_demos_ganindu.elf.dir
│   ├── config
│   ├── esp-idf
│   │   ├── app_trace
│   │   ├── app_update
│   │   ├── bootloader
│   │   ├── bootloader_support
│   │   ├── bt
│   │   ├── CMakeFiles
│   │   ├── cmock
│   │   ├── console
│   │   ├── cxx
│   │   ├── driver
│   │   ├── efuse
│   │   ├── esp_adc
│   │   ├── esp_app_format
│   │   ├── esp_bootloader_format
│   │   ├── esp_coex
│   │   ├── esp_common
│   │   ├── espcoredump
│   │   ├── esp_driver_ana_cmpr
│   │   ├── esp_driver_cam
│   │   ├── esp_driver_dac
│   │   ├── esp_driver_gpio
│   │   ├── esp_driver_gptimer
│   │   ├── esp_driver_i2c
│   │   ├── esp_driver_i2s
│   │   ├── esp_driver_isp
│   │   ├── esp_driver_jpeg
│   │   ├── esp_driver_ledc
│   │   ├── esp_driver_mcpwm
│   │   ├── esp_driver_parlio
│   │   ├── esp_driver_pcnt
│   │   ├── esp_driver_rmt
│   │   ├── esp_driver_sdio
│   │   ├── esp_driver_sdm
│   │   ├── esp_driver_sdmmc
│   │   ├── esp_driver_sdspi
│   │   ├── esp_driver_spi
│   │   ├── esp_driver_tsens
│   │   ├── esp_driver_uart
│   │   ├── esp_driver_usb_serial_jtag
│   │   ├── esp_eth
│   │   ├── esp_event
│   │   ├── esp_gdbstub
│   │   ├── esp_hid
│   │   ├── esp_http_client
│   │   ├── esp_http_server
│   │   ├── esp_https_ota
│   │   ├── esp_https_server
│   │   ├── esp_hw_support
│   │   ├── esp_lcd
│   │   ├── esp_local_ctrl
│   │   ├── esp_mm
│   │   ├── esp_netif
│   │   ├── esp_netif_stack
│   │   ├── esp_partition
│   │   ├── esp_phy
│   │   ├── esp_pm
│   │   ├── esp_psram
│   │   ├── espressif__button
│   │   ├── espressif__cmake_utilities
│   │   ├── espressif__esp32_s3_lcd_ev_board
│   │   ├── espressif__esp_codec_dev
│   │   ├── espressif__esp_io_expander
│   │   ├── espressif__esp_io_expander_tca9554
│   │   ├── espressif__esp_lcd_gc9503
│   │   ├── espressif__esp_lcd_panel_io_additions
│   │   ├── espressif__esp_lcd_touch
│   │   ├── espressif__esp_lcd_touch_ft5x06
│   │   ├── espressif__esp_lcd_touch_gt1151
│   │   ├── esp_ringbuf
│   │   ├── esp_rom
│   │   ├── esp_system
│   │   ├── esp_timer
│   │   ├── esp-tls
│   │   ├── esptool_py
│   │   ├── esp_vfs_console
│   │   ├── esp_wifi
│   │   ├── fatfs
│   │   ├── freertos
│   │   ├── hal
│   │   ├── heap
│   │   ├── http_parser
│   │   ├── idf_test
│   │   ├── ieee802154
│   │   ├── json
│   │   ├── log
│   │   ├── lvgl__lvgl
│   │   ├── lwip
│   │   ├── main
│   │   ├── mbedtls
│   │   ├── mqtt
│   │   ├── newlib
│   │   ├── nvs_flash
│   │   ├── nvs_sec_provider
│   │   ├── openthread
│   │   ├── partition_table
│   │   ├── perfmon
│   │   ├── protobuf-c
│   │   ├── protocomm
│   │   ├── pthread
│   │   ├── sdmmc
│   │   ├── soc
│   │   ├── spiffs
│   │   ├── spi_flash
│   │   ├── tcp_transport
│   │   ├── touch_element
│   │   ├── ulp
│   │   ├── unity
│   │   ├── usb
│   │   ├── vfs
│   │   ├── wear_levelling
│   │   ├── wifi_provisioning
│   │   ├── wpa_supplicant
│   │   └── xtensa
│   ├── log
│   └── partition_table
├── components
│   └── lvgl__lvgl
│       ├── build
│       ├── demos
│       ├── docs
│       ├── env_support
│       ├── examples
│       ├── scripts
│       ├── src
│       └── tests
├── main
│   ├── include
│   ├── ui_printer
│   │   └── include
│   └── ui_tuner
│       └── include
└── managed_components
    ├── espressif__button
    │   ├── examples
    │   ├── include
    │   └── test_apps
    ├── espressif__cmake_utilities
    │   ├── docs
    │   ├── scripts
    │   └── test_apps
    ├── espressif__esp32_s3_lcd_ev_board
    │   ├── examples
    │   ├── include
    │   ├── priv_include
    │   └── src
    ├── espressif__esp_codec_dev
    │   ├── device
    │   ├── include
    │   ├── interface
    │   ├── platform
    │   └── test
    ├── espressif__esp_io_expander
    │   └── include
    ├── espressif__esp_io_expander_tca9554
    │   └── include
    ├── espressif__esp_lcd_gc9503
    │   ├── include
    │   └── test_apps
    ├── espressif__esp_lcd_panel_io_additions
    │   ├── include
    │   └── test_apps
    ├── espressif__esp_lcd_touch
    │   └── include
    ├── espressif__esp_lcd_touch_ft5x06
    │   └── include
    ├── espressif__esp_lcd_touch_gt1151
    │   └── include
    └── lvgl__lvgl
        ├── demos
        ├── docs
        ├── env_support
        ├── examples
        ├── scripts
        ├── src
        └── tests

for example should I be able to delete the lvgl_lvgl foldr in may managed_componsnts folder ? (currently If I delete that I get teh following error )

anindu@pc:~/Workspace/sandbox/expressif/workspace/lcd-dev-board/examples/lvgl_demos$ idf.py -p /dev/ttyUSB0 flash monitor
Executing action: flash
Running cmake in directory /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/ganindu/.espressif/python_env/idf5.4_py3.10_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos"...
-- IDF_TARGET is not set, guessed 'esp32s3' from sdkconfig '/home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/sdkconfig'
-- Found Git: /usr/bin/git (found version "2.34.1") 
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/ganindu/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240305/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ganindu/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240305/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/ganindu/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240305/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32s3
Dependencies lock doesn't exist, solving dependencies.
Using component placed at /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/components/lvgl__lvgl for dependency lvgl/lvgl(^9.1.0), specified in /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/main/idf_component.yml
Using component placed at /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/components/lvgl__lvgl for dependency lvgl/lvgl(^8)(introduced by component espressif/esp32_s3_lcd_ev_board), specified in /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/main/idf_component.yml
....................Using component placed at /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/components/lvgl__lvgl for dependency lvgl/lvgl(^8)(introduced by component espressif/esp32_s3_lcd_ev_board), specified in /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/main/idf_component.yml
..Using component placed at /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/components/lvgl__lvgl for dependency lvgl/lvgl(^8)(introduced by component espressif/esp32_s3_lcd_ev_board), specified in /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/main/idf_component.yml
.Using component placed at /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/components/lvgl__lvgl for dependency lvgl/lvgl(^8)(introduced by component espressif/esp32_s3_lcd_ev_board), specified in /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/main/idf_component.yml
...Updating lock file at /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/dependencies.lock
Processing 12 dependencies:
[1/12] espressif/button (3.2.0)
[2/12] espressif/cmake_utilities (0.5.3)
[3/12] espressif/esp32_s3_lcd_ev_board (2.1.0)
[4/12] espressif/esp_codec_dev (1.1.0)
[5/12] espressif/esp_io_expander (1.0.1)
[6/12] espressif/esp_io_expander_tca9554 (1.0.1)
[7/12] espressif/esp_lcd_gc9503 (3.0.1)
[8/12] espressif/esp_lcd_panel_io_additions (1.0.1)
[9/12] espressif/esp_lcd_touch (1.1.1)
[10/12] espressif/esp_lcd_touch_ft5x06 (1.0.6)
[11/12] espressif/esp_lcd_touch_gt1151 (1.0.5~1)
[12/12] idf (5.4.0)
-- Project sdkconfig file /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/sdkconfig
Loading defaults file /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/sdkconfig.defaults...
-- Compiler supported targets: xtensa-esp-elf
-- Found Python3: /home/ganindu/.espressif/python_env/idf5.4_py3.10_env/bin/python (found version "3.10.12") found components: Interpreter 
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "lvgl_demos_ganindu" version: 20c9f5e-dirty
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.wdt.ld
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- BUTTON: 3.2.0
-- ESP_LCD_GC9503: 3.0.1
-- ESP_LCD_PANEL_IO_ADDITIONS: 1.0.1
CMake Error at /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/tools/cmake/component.cmake:314 (message):
  Include directory
  '/home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/managed_components/lvgl__lvgl/demos'
  is not a directory.
Call Stack (most recent call first):
  /home/ganindu/Workspace/sandbox/expressif/esp-idf/esp-idf/tools/cmake/component.cmake:482 (__component_add_include_dirs)
  main/CMakeLists.txt:10 (idf_component_register)

-- Configuring incomplete, errors occurred!
See also "/home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1, output of the command is in the /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/build/log/idf_py_stderr_output_22122 and /home/ganindu/Workspace/sandbox/expressif/workspace/esp-dev-kits/esp32-s3-lcd-ev-board/examples/lvgl_demos/build/log/idf_py_stdout_output_22122
Lzw655 commented 5 months ago

Yes, the component lvgl__lvgl in managed_components should be deleted. And the first line of file lvgl_demos/main/CMakeLists.txt should also be changed from set(LV_DEMO_DIR ../managed_components/lvgl__lvgl/demos) to set(LV_DEMO_DIR ../components/lvgl__lvgl/demos).

ganindu7 commented 5 months ago

Hi Liu,

That fixed part of the problem, Now it is building the demo from the componsnts directory instead of the managed_componsnts directory.

but the original problem (the graphic not changing) is still present.

To remind what I have done to see this change is to just change the avatar.png file on

the components/lvgl__lvgl/demos/widgets/assets folder and expect to see the updated file appear on the display. when I build it

I wonder if this is pre built and optimised

Cheers, Ganindu.

Lzw655 commented 5 months ago

For LVGL, it's usually necessary to use tools to convert images into arrays. What you need to replace is the img_demo_widgets_avatar.c file, not the image itself.

ganindu7 commented 5 months ago

HI Liu,

Thanks a lot! That essentially fixed the original issue. There are other stuff like the image looking different. I reckon that is a settings issue. Thanks a lot for your time!

On Tue, 7 May 2024 at 14:06, Zhongwei Liu @.***> wrote:

For LVGL, it's usually necessary to use tools https://lvgl.io/tools/imageconverter to convert images into arrays. What you need to replace is the img_demo_widgets_avatar.c file, not the image itself.

— Reply to this email directly, view it on GitHub https://github.com/espressif/esp-dev-kits/issues/94#issuecomment-2098363014, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG4JUW4GJ5Q5IX6UIJ2LMLZBDGU7AVCNFSM6AAAAABHA7J3TWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJYGM3DGMBRGQ . You are receiving this because you were mentioned.Message ID: @.***>

--

Best RegardsGanindu Nanayakkara

Lzw655 commented 5 months ago

You are welcome!