Skip to content

fix(kconfig) add LV_ATTRIBUTE_MEM_ALIGN, LV_ATTRIBUTE_LARGE_CONST and LV_SYSMON_GET_IDLE configs - #7131

Merged
kisvegabor merged 1 commit into
lvgl:release/v9.2from
nxp-mcuxpresso:bugfix/kconfig
Oct 24, 2024
Merged

kisvegabor merged 1 commit into
lvgl:release/v9.2from
nxp-mcuxpresso:bugfix/kconfig

Conversation

@cosmindanielradu19

Copy link
Copy Markdown
Contributor

add LV_ATTRIBUTE_MEM_ALIGN default value

Notes

@liamHowatt liamHowatt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm the only risk is that not all compilers support __attribute__ directives. That being said, in the real world many projects using Kconfig will be building with a compiler that supports it.

@kisvegabor

Copy link
Copy Markdown
Member

It's really not a platform independent portable change. 🙁
Adding it as a suggestion in the help can help a little, but it's not a perfect solution for sure.

@nicusorcitu

Copy link
Copy Markdown
Contributor

There are also another configs which are missing from Kconfig:

+                config LV_ATTRIBUTE_LARGE_CONST
+                        string "Attribute to mark large constant arrays for example font's bitmaps"
+                        default ""

+                config LV_SYSMON_GET_IDLE
+                        string "Get the idle percentage. E.g. uint32_t my_get_idle(void)"
+                       depends on LV_USE_SYSMON
+                        default "lv_timer_get_idle"

@cosmindanielradu19

Copy link
Copy Markdown
Contributor Author

It's really not a platform independent portable change. 🙁 Adding it as a suggestion in the help can help a little, but it's not a perfect solution for sure.

Ok, then I will change the default value to an empty string, and move the current default to help

Shall we also add the configs that @nicusorcitu mentioned above?

@kisvegabor

Copy link
Copy Markdown
Member

Shall we also add the configs that @nicusorcitu mentioned above?

Yes, please.

…LV_SYSMON_GET_IDLE configs

Signed-off-by: Cosmin-Daniel Radu <[email protected]>
@cosmindanielradu19 cosmindanielradu19 changed the title fix(kconfig) add LV_ATTRIBUTE_MEM_ALIGN default value fix(kconfig) add LV_ATTRIBUTE_MEM_ALIGN, LV_ATTRIBUTE_LARGE_CONST and LV_SYSMON_GET_IDLE configs Oct 24, 2024
@kisvegabor

Copy link
Copy Markdown
Member

Great! Thank you!

@kisvegabor
kisvegabor merged commit c897fe8 into lvgl:release/v9.2 Oct 24, 2024
@cristian-stoica
cristian-stoica deleted the bugfix/kconfig branch October 25, 2024 09:14
@tore-espressif

Copy link
Copy Markdown
Contributor

@kisvegabor this last-minute change broke v9.2.1 on ESPs ... #7154 :(

@cosmindanielradu19

cosmindanielradu19 commented Oct 25, 2024 •

Copy link
Copy Markdown
Contributor Author

@kisvegabor as long as those configs broke the ESP build, and the fact that they are compiler dependent, I would suggest adding a lv_compiler.h file that should contain all the COMPILER SETTINGS from kconfig. The defines can remain only in the new header, and can be removed from both lv_conf.h and kconfig file.

E.g.

/**
 * @file lv_compiler.h
 * Configuration file for LVGL based on the compiler
 */

#ifndef LV_COMPILER_H
#define LV_COMPILER_H

#ifdef __GNUC__
#define CONFIG_LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(LV_ATTRIBUTE_MEM_ALIGN_SIZE)))
#define LV_ATTRIBUTE_LARGE_CONST __attribute__((section("DataQuickAccess"))) 
#else
#define CONFIG_LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_LARGE_CONST
#endif

#endif /*LV_COMPILER_H*/

But for the moment, for the 9.2.1 release, I believe that the fastest fix would be to revert that PR

kisvegabor added a commit that referenced this pull request Oct 25, 2024
…CONST and LV_SYSMON_GET_IDLE configs (#7131)"

This reverts commit c897fe8.
@kisvegabor

Copy link
Copy Markdown
Member

Ahhhh! Damn it.

I wonder how it passed through as we have an ESP-IDF CI test running for MicroPython.

Anyway, it makes sense that these LV_ATTRIBUTEs cannot be supported in Kconfig, as Kconfig will export these as strings. @nicusorcitu @cosmindanielradu19 I wonder how and in which environment did it wok for you.


I think we should revert this commit and release v9.2.2 ASAP. I've pushed the revert to the release/v9.2 branch. Please try it out.

nicusorcitu pushed a commit to nxp-mcuxpresso/lvgl that referenced this pull request Oct 26, 2024
…CONST and LV_SYSMON_GET_IDLE configs (lvgl#7131)"

This reverts commit c897fe8.
@cosmindanielradu19

Copy link
Copy Markdown
Contributor Author

Anyway, it makes sense that these LV_ATTRIBUTEs cannot be supported in Kconfig, as Kconfig will export these as strings. @nicusorcitu @cosmindanielradu19 I wonder how and in which environment did it wok for you.

In our case, it worked with west. If the default value was needed, instead of "", the config was empty (the default value was interpreted as no character).

liamHowatt pushed a commit to liamHowatt/lvgl that referenced this pull request Nov 6, 2024
…d LV_SYSMON_GET_IDLE configs (lvgl#7131)

Signed-off-by: Cosmin-Daniel Radu <[email protected]>
pnb990 pushed a commit to pnb990/lvgl that referenced this pull request Dec 10, 2024
…nt_code_get_name

* origin/release/v9.2: (77 commits)
  fix docs exemple
  chore(cmsis-pack): update the cmsis-pack for the v9.2.2 patch (lvgl#7177)
  docs(CHANGLOG): add link to v9.2.1 changelog
  chore: update versions and CHANGELOG
  fix(changelog): fix the version number
  fix(nuttx): fix assert when release LCD draw buffer (lvgl#7159)
  Revert "fix(kconfig): add LV_ATTRIBUTE_MEM_ALIGN, LV_ATTRIBUTE_LARGE_CONST and LV_SYSMON_GET_IDLE configs (lvgl#7131)"
  docs(CHANGELOG): update the CHANGELOG
  fix(kconfig): add LV_ATTRIBUTE_MEM_ALIGN, LV_ATTRIBUTE_LARGE_CONST and LV_SYSMON_GET_IDLE configs (lvgl#7131)
  fix(sysmon) disable all performance banners from screen with serial redirect
  Revert "fix(freertos): use xSemaphoreTakeRecursive (lvgl#6803)"
  fix(display): remove lv_display_set_buffers_with_stride function (lvgl#7087)
  chore(cmsis-pack): create cmsis-pack for v9.2.1 patch (lvgl#7092)
  fix(pxp): sync rotation direction with SW render (lvgl#7063)
  fix(vglite) triangle gradient areas fix
  fix(conf) Remove empty line to make comment more condens.
  docs(PXP): update PXP for rotation only feature
  fix(pxp) invalidate cache for the whole frame buffer
  fix(vglite) invalidate cache for the whole frame buffer
  fix(vglite) Small cleanup.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants