-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix(Kconfig) add missing LV_BUILD_EXAMPLES configuration #2555
Conversation
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
When boolean symbols are defined to n the symbol is not "defined", so I think the value in line 1527 should be changed from 1 to 0. |
There are many options that have this problem, such as |
I haven't been able to take a look into the additions to the Kconfig, maybe they are enabled by default. |
Does it mean we should disable everything by default? Including all the widgets and features? |
I remember we followed the default configuration (the one in |
Ah, so it the Kconfig and Using |
E.g. with
#ifndef LV_USE_ASSERT_NULL
# ifdef CONFIG_LV_USE_ASSERT_NULL
# define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
# else
# define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/
# endif
#endif I wonder if we should alter the logic in #ifdef CONFIG_LV_COLOR_DEPTH
# define LV_KCNFIG_PRESENT
#endif And with the configs: #ifndef LV_USE_ASSERT_NULL /*Do not overwrite externally set defines*/
# ifdef LV_KCNFIG_PRESENT /*Use the value from Kcfonfig if present*/
# ifdef CONFIG_LV_USE_ASSERT_NULL
# define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
# else
# define LV_USE_ASSERT_NULL 0 /*If a config is not defined then should be evaluated as 0*/
# endif
# else /*Without Kconfig set the default value*/
# define LV_USE_ASSERT_NULL 1
# endif
#endif What do you think? |
I think the logic in the configuration files will become huge. Maybe we should use the Maybe we can add something like this in #ifndef LV_BUILD_EXAMPLES
#ifdef CONFIG_LV_BUILD_EXAMPLES // Default value, used when LV_BUILD_EXAMPLES is enabled in the Kconfig
#define LV_BUILD_EXAMPLES_DEFAULT 1
#else
#define LV_BUILD_EXAMPLES_DEFAULT 0 // Value used if we disable LV_BUILD_EXAMPLES in Kconfig
#endif
#endif Then in #ifndef LV_BUILD_EXAMPLES
#define LV_BUILD_EXAMPLES LV_BUILD_EXAMPLES_DEFAULT
#endif Does it makes sense? |
IMO it doesn't matter much. It's a long, boring, repetitive file which is generated by a script. Not intended to read/edited by humans. (Although it's quite readable)
If you agree I can update the script to see how it works. |
I totally forgot that
Are you thinking of updating the script just for those options ( |
For all. This seems like a more robust value checking for all options #ifndef LV_USE_ASSERT_NULL /*Do not overwrite externally set defines*/
# ifdef LV_KCONFIG_PRESENT /*Use the value from Kcfonfig if present*/
# ifdef CONFIG_LV_USE_ASSERT_NULL
# define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
# else
# define LV_USE_ASSERT_NULL 0 /*If a config is not defined should be evaluated as 0*/
# endif
# else /*Without Kconfig set the default value*/
# define LV_USE_ASSERT_NULL 1
# endif
#endif |
There's a case that I think we're not considering, configure LVGL with |
If the value is set in |
If you say ok, I can add the proposed changes. |
@kisvegabor |
I'm waiting for feedback on this: #2555 (comment) |
I've pushed the changes proposed here. |
I needed to revert it due to some unexpected issues. I will investigate tomorrow. |
@xiaoxiang781216 has suggested to change bools to int with 0/1 possible values. I'm ok with this but comments from Kconfig users would be great. |
since the file should be located at zero after open Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
We are about releasing v8.1 and it'd great to fix this issue for it. If there is no objection for "change bools to int with 0/1 possible values" can someone who uses Kconfig contribute with this update? |
Thanks for looking into this. Using this pattern could be an option too. My first attempt to implement it failed because it can be applied only to config options with numeric type. But of course we can treat non-numbers and numbers differently. |
As an experiment I updated |
I merge it to see if there are any unexpected problems before the release. |
* fix(arc) format code Signed-off-by: FASTSHIFT <vifextech@foxmail.com> * fix(Kconfig) add missing LV_BUILD_EXAMPLES configuration Signed-off-by: FASTSHIFT <vifextech@foxmail.com> * fix(fsdrv): remove the seek call in fs_open (#2736) since the file should be located at zero after open Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * docs(os) add example and clarify some poinits * fix(draw border):border draw error if border width > radius (#2739) * fix(label) consider base dir lv_label_get_letter_pos in special cases related to #2712 (comment) * improve lv_conf_internal_gen.py for better Kconfig support Co-authored-by: Xiang Xiao <xiaoxiang@xiaomi.com> Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com> Co-authored-by: guoweilkd <guowei15@xiaomi.com> Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Description of the feature or fix
fix(Kconfig) add missing LV_BUILD_EXAMPLES configuration.
Checkpoints