Navigation Menu

Skip to content
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

feat(rt-thread): implement rt-thread sconscript #2674

Merged
merged 1 commit into from Oct 18, 2021
Merged

feat(rt-thread): implement rt-thread sconscript #2674

merged 1 commit into from Oct 18, 2021

Conversation

mysterywolf
Copy link
Contributor

@mysterywolf mysterywolf commented Oct 16, 2021

Description of the feature or fix

Hi,

Sorry for the late second PR, because these days I dived into the task of RT-Thread new version release.

This PR implements the Sconscript which is very essential to let RT-Thread to organize the file structure of LVGL.
Meanwhile, there is a good news: LVGL has been registered successfully in the RT-Thread software packages center and every RT-Thread user can search the LVGL official package in the RT-Thread official website. https://packages.rt-thread.org/en/detail.html?package=lvgl

I still need to several PRs to complete this RT-Thread port. Thanks ahead for your PRs reviewing.

If you want to release new version in recent days, just keep your original plan. Don't be waiting for my part.

Meco

Checkpoints

@mysterywolf mysterywolf changed the title feat(rt-thread): implement rt-thread sconscirpt feat(rt-thread): implement rt-thread sconscript Oct 16, 2021
@kisvegabor
Copy link
Member

Thank you!

Meanwhile, there is a good news: LVGL has been registered successfully in the RT-Thread software packages center

Amazing! Are there any public statistics on the packages? E.g. download count?


At first look only LV_MEM_CUSTOM_... was changed in rt-thread/lv_conf.h. If so I suggest either adding this defines into lv_conf_kconfig.h or as a build parameter. It avoids duplication and if rt-thread/lv_conf.h will be included somewhere you won't be able to overwrite the values with Kconfig. Take a look at lv_conf_internal.h. It's automatically generated to handle undefined configs. It either uses the value from Kconfig or to a default value.

@mysterywolf
Copy link
Contributor Author

mysterywolf commented Oct 16, 2021

image

Hi, Here is the download statistics.
Because I have not finished this part, thus, RT-Thread has not used official social media to announce this. Once I finished , they will use Twitter, Facebook, Youtube, Linkedin to announce this new LVGL official software to all of the RT-Thread users.

https://www.youtube.com/channel/UCdDHtIfSYPq4002r27ffqPw

https://twitter.com/rt_thread

https://www.facebook.com/RT-Thread-IoT-OS-110395723808463

https://www.linkedin.com/company/rt-thread-iot-os/


In terms of rt-thread/lv_conf.h, I considered your suggestions carefully, but I still think I need to keep rt-thread/lv_conf.h, because:

  • this PR only is a beginning. In the next PRs, I will change them maybe a lot.
  • RT-Thread also use Kconfig to config , but the configuration's method is different from that of LVGL. By the way, the Kconfig file will not be put in LVGL repository. RT-Thread has a particular repository to manage all of the software packages at here: https://github.com/RT-Thread/packages/blob/master/README_en.md

@kisvegabor
Copy link
Member

Here is the download statistics.

Oh, I missed that, thanks.

Once I finished , they will use Twitter, Facebook, Youtube, Linkedin to announce this new LVGL official software to all of the RT-Thread users.

It'd be great. We will also post it on Forum, Blog and LinkedIn.

this PR only is a beginning. In the next PRs, I will change them maybe a lot.

Okay. In this case I still suggest adding only the defines you have modified and let lv_conf_internal.h handle the rest.

RT-Thread also use Kconfig to config , but the configuration's method is different from that of LVGL. By the way, the Kconfig file will not be put in LVGL repository.

Is it possible to reuse lvgl's Kconfig with source (or somehow)? IMO it'd be important to avoid maintaining a second Kconfig file too when we add/change configs.

@mysterywolf
Copy link
Contributor Author

mysterywolf commented Oct 16, 2021

Is it possible to reuse lvgl's Kconfig with source (or somehow)? IMO it'd be important to avoid maintaining a second Kconfig file too when we add/change configs.

Yes, this is a problem.

@mysterywolf
Copy link
Contributor Author

Sorry , gives me a second to change this as you said, I maybe find a better way.

@mysterywolf
Copy link
Contributor Author

mysterywolf commented Oct 16, 2021

Hi,
I changed the structure as following your suggestions. This is much much better. Thank you for insisting your suggestion!!😁

@mysterywolf
Copy link
Contributor Author

mysterywolf commented Oct 16, 2021

Hi, all set. I still keep thread/lv_conf.h, but it just contains some configurations that RT-Thread has to change, and rest of them will be taken over by lv_conf_internal.h, just like you mentioned.

Meanwhile, RT-Thread can also change these configurations by: lv_config.h ->rtthread.h -> rtconfig.h
rtconfig.h is generated by Kconfig of RT-Thread side, which means RT-Thread users can use RT-Thread Kconfig to config the LVGL's features, just like other software packages.

All in all:
lv_conf.h will take over the fixed configurations part, which is related to RT-Thread itself and users don't need to change them;
rtconfig.h will take over the dynamic configurations part which will be set by users;
lv_conf_internal.h will take over the rest of them as default configurations.

Again, thanks for your suggestions!

@embeddedt
Copy link
Member

Hi @mysterywolf, first of all, thanks for your contribution!

Could you explain a bit how the RT-Thread project structure works for external packages? Maybe it's just me, but it seems a little strange to have a downstream project's full build script/logic in our own repository. Normally I would think that these files would be in your repository and LVGL would either be a submodule or there would be logic to download a specific commit/version at build time.

@mysterywolf
Copy link
Contributor Author

mysterywolf commented Oct 17, 2021

Hi, @embeddedt , the rt-thread folder which is in LVGL repository does not only simply contain a script file. Because this PR is just part of them and I have not finished the whole port task yet, it gives you an illusion that rt-thread folder only contains script file. Actually, this folder's main job is to contain the port *.c and *.h files. Just like in Micropython, there are some operating system's port folder, such as Linux, zephyr and so on..

In the next PR, I will take a video to demonstrate how to use LVGL in RT-Thread projects. Because this PR has not merged, it does not work right now. That's why this PR is essential.

@kisvegabor kisvegabor mentioned this pull request Oct 18, 2021
Copy link
Member

@kisvegabor kisvegabor left a comment

Choose a reason for hiding this comment

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

Thank you! Looks good, I had only a few comments.

COLOR SETTINGS
*====================*/

#ifdef PKG_LVGL_ENABLE_COLOR_16_SWAP
Copy link
Member

Choose a reason for hiding this comment

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

Why is it needs to be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your reviewing. 😊
This is needed. It will let RT-Thread users to use RT-Thread Studio IDE to enable some features by using GUI method.

RT-Thread's configuration method is a little bit different from that of LVGL:

  • LVGL use 1 to represent enable, 0 to represent disable.
  • RT-Thread uses to define this micro to represent enable, not to define to represent disable.

Thus, it needs to do a transition.

Copy link
Member

Choose a reason for hiding this comment

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

All lvgl config needs to be converted to be Rt-thread compatible?

Anyway, I merge this to let you make test and we can discuss the details in other PRs.

rt-thread/lv_conf.h Outdated Show resolved Hide resolved
@kisvegabor kisvegabor merged commit 9ece84d into lvgl:master Oct 18, 2021
@mysterywolf
Copy link
Contributor Author

Thank you very much!😊

@mysterywolf mysterywolf deleted the aaa branch October 18, 2021 12:56
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.

None yet

3 participants