-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlatformIO instructions are incomplete #220
Comments
When LV_LVGL_H_INCLUDE_SIMPLE is not defined (the default) then `"lvgl/lvgl.h"` is included, else `"lvgl.h"` is included. This is for other build systems (like PlatformiIO) which setup build paths differently than esp-idf. More info in issue lvgl#220.
PlatformIO compiles using a different include path strategy than esp-idf. If PLATFORMIO is defined then `"lv_core/lv_refr.h"` will be included, otherwise `"lvgl/src/lv_core/lv_refr.h"`. More info in issue lvgl#220.
I managed to get my project running with lv_port_esp32. Here's what I had to do:
Here is what I'd like to do to complete support for PlatformIO for this project - as far as I can tell lv_port_esp32 really isn't yet compatible with PlatformIO.
If anybody knows PlatformIO better, please let me know if I'm not seeing an easier solution, but this is the cleanest solution I can come up with at the moment. |
Hi Chris, Thanks for sharing your experiences. The things you have pointed out seems correct. In the very near future, we will make Finally, the drivers part from this repo will be moved to its own repo. The changes you have suggested for the driver part seems valid to me. However, @C47D is the maintainer of this repo and he knows it much better. 🙂 |
This change wraps driver header/source files in the appropriate constants to effectively make them empty if that driver is not used in this build. The ESP-IDF build system is smart enough to conditionally build source files depending on project settings (see CMakeLists.txt in drivers folders). PlatformIO is not, and always builds every file. This change effectively makes those files no-ops which serves the same purpose and makes this project able to compile with PlatformIO (and other build systems). This addresses, but does not entirely fix, issue lvgl#220.
OK. user @davidjade was very helpful on PR #225, and I think this would be a more clear way to describe how to build this project using PlatformIO.
I think it we should keep the reference to the lv_platformio project as a more complete example. I still think that ideally PlatformIO projects should utilize Platform IO Library Management to source project dependencies (LVGL, lv_port_esp32, etc.). To avoid confusion, But, I think it's best to have that discussion in a different bug - probably after @C47D finishes his lv_drivers refactoring. |
@cmumford Thanks for sharing this. I wonder if we can add these environment settings to platform.ini file |
This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is more work being done on this topic? Should I just follow steps as @cmumford described? The instructions for set up with platformio are still incomplete and this post doesn't seem like it should be left closed. |
Hi @tlechman49, can you try the @cmumford steps? If they work please let us know, on the meantime I reopen the issue. |
I'm happy to put together a PR with these changes if @tlechman49 concludes they are correct. |
So I actually just posted a pull request ( #234 ) for this that worked fine for me. If someone else tests that, I guess further notes should be added on how to set the .ini file in the readme and then this would be solved. |
This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The PR is merged so I close this issue. Thank you @tlechman49 |
I'm new to PlatformIO, but I'm pretty sure that the platformio instructions in README.md are incorrect. I read through issue #168 and it only recommends the following:
platformio.ini
main.cc
I think it is ambiguous whether it is necessary to create the git submodule in the lv_platformio project is required as described in Build this repository standalone and run the demo. If this was done, then this would result in two copies of lvgl. One in
//components/lv_port_esp32/components/lvgl/lvgl/
, and a second in//lib/lvgl/
. If the submodule is not created, then there is a missing step to add lv_port_esp32 as a dependency (lib_deps) in platformio.ini.There is a comment in issue 168 which says that following the README.md steps successfully builds - which it does, but the default app doesn't use any drivers and doesn't display anything.
Maybe somebody with more PlatformIO knowledge can see what I might be doing wrong, but from what I can see this project is not compatible (or ready to be used by) PlatformIO.
The text was updated successfully, but these errors were encountered: