-
Notifications
You must be signed in to change notification settings - Fork 684
Add fbcon example #3029
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
Add fbcon example #3029
Conversation
|
[Experimental Bot, please feedback here] Fill In The Commit Message: This PR contains a Commit with an Empty Commit Message. Please fill in the Commit Message with the PR Summary. Yes, this PR appears to mostly meet the requirements, but is missing some key information. Here's what needs improvement:
By providing this missing information, the PR will be much more complete and easier to review. |
|
Just spotted there's a left over folder and CMakeLists.txt from when I called it something else. Will remove that with any future commits here, and before I make it ready for review after the first round of checks |
|
Thanks @TimJTi amazing work!! :-) Please remember to update git commit:
Some documentation would be nice to have too on how to setup hardware so we could test on other targets :-) |
As per usual, finger trouble with git...I was sure there was a commit message lol
I was hoping the Kconfig help would explain how to use it but I can add documentation somewhere if wanted - where would you suggest and any example of similar I could refer to? |
|
I am going to add a Kconfig option for whether to intercept/redirect STDIN - it's necessary for NSH but probably is not if the FB is just used for output from the majority of otgher apps/tasks. It was suggested that I could add a splashscreen to this so NuttX could power up with a NuttX logo...but on reflection I think that would be better in NXBOOT? |
Yes, I think we need to have something similar to boot logo like Linux where the number of CPUs could be displayed as the number of NuttX logos. But I think it should be in the kernel, not in fbcon application |
acassis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove fbterm
6262881 to
480a5ee
Compare
examples/fbcon/Kconfig
Outdated
| on to the spawned app. | ||
|
|
||
| Relies on and uses NX and NXFONTS | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 20 remove tabs
examples/fbcon/Kconfig
Outdated
| string "Default framebuffer driver" | ||
| default "/dev/fb0" | ||
| ---help--- | ||
| Default framebuffer drivers. This selection can be overridden from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - had a VS Code moment as it lost all my language specific rules. Doh!
Will fix on next push
5bcc0af to
b1dd4ce
Compare
@acassis Uboot allows for a splashscreen, and Uboot is run before NuttX. Using NXboot, although it is an app, it only persists for a short while, so I am thinking there is perhaps some merit in having a splashscreen option within the NXboot app? But only for Framebuffer displays I think? What do you think? Shall I start a separate discussion topic? |
b1dd4ce to
1e527aa
Compare
Yes, maybe you can discuss this idea in the mailing list. Remember: NXBoot is a NuttX with a boot application, so if we get a "nxlogo" integrated in the kernel it could be displayed earlier. |
|
|
||
| config EXAMPLES_FBCON_CUSTOM_BPP | ||
| bool "Choose custom BPP (must not be disabled in NX)" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are missing endchoice here. This causes the build to break with errors like:
mkkconfig in /NuttX/apps
/NuttX/apps/examples/fbcon/Kconfig:62: syntax error
/NuttX/apps/examples/fbcon/Kconfig:51: missing end statement for this entry
/NuttX/apps/examples/fbcon/Kconfig:23: missing end statement for this entry
/NuttX/apps/examples/Kconfig:8: missing end statement for this entry
Kconfig:2785: missing end statement for this entry
/NuttX/apps/examples/fbcon/Kconfig:61: invalid statement
/NuttX/apps/examples/fbcon/Kconfig:62: unexpected option "prompt"
/NuttX/apps/examples/fbcon/Kconfig:63: unexpected option "depends"
/NuttX/apps/examples/fbcon/Kconfig:64: invalid statement
/NuttX/apps/examples/fbcon/Kconfig:65:warning: ignoring unsupported character ':'
/NuttX/apps/examples/fbcon/Kconfig:65: unknown statement "Note"
/NuttX/apps/examples/fbcon/Kconfig:95: unexpected end statement
/NuttX/apps/examples/fbcon/Kconfig:96: unexpected end statement
/NuttX/apps/examples/fbcon/Kconfig:173: syntax error
/NuttX/apps/examples/fbcon/Kconfig:172: unknown option "---help--"
/NuttX/apps/examples/fbcon/Kconfig:173: unknown option "Decode"
/NuttX/apps/examples/fbcon/Kconfig:205: unexpected end statement
/NuttX/apps/examples/Kconfig:211: unexpected end statement
Kconfig:2787: unexpected end statement
make: *** [tools/Unix.mk:726: olddefconfig] Error 1
ERROR: failed to refresh
Unfortunately I didn't catch it until after merged...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm...how come I didn't see this? Any suggestions on how I could have caught it when check patch and CI didn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TimJTi I'm not sure, could it be that the line was there during checks but got deleted somehow at the last second?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some RISC-V Builds are failing, I submitted the patch here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions on how I could have caught it when check patch and CI didn't?
If I remember correctly: Our CI Check uses kconfiglib but our Local Builds use kconfig-frontends. That's why Kconfigs are checked differently:
Hi @simbit18: Am I correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lupyuen the use of two tools can have different behaviors. Then you also need a style control tool for the kconfig file. There is no shortage of fun in NuttXland !!! :)
|
|
||
| choice EXAMPLES_FBCON_BPP_SELECTION | ||
| prompt "BPP Configuration" | ||
| default EXAMPLES_FBCON_BPP_NX_DEFAULT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends on?
|
Hmm was this PR marked DRAFT and merged? We need to be more careful as it broke master build for all other boards/config even those not using fbcon. DRAFT means NO MERGE! :-) Things to update (in next PR):
|
|
@cederom I think it was marked Ready For Review yesterday? |
|
Cool cool at least we have more focus now :D :D |
This PR fixes the `endchoice` and `help` in the Kconfig for fbcon - #3029 (comment) This patch will fix these build errors: ```text apps/examples/fbcon/Kconfig:62: syntax error apps/examples/fbcon/Kconfig:172: unknown option "---help--" ``` https://github.com/lupyuen/nuttx-riscv64/actions/runs/13981663903/job/39147989438#step:5:158 Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
@cederom @lupyuen It was merged very quickly after I marked it ready and - not check yet - I might hve pushed a new commit soon after as I'd not signed it.
|
CI Checks didn't catch the Kconfig Errors because it uses kconfiglib, but most of us use kconfig-frontends. So we wouldn't have known about the Kconfig Errors, even if we waited for the CI Checks to complete. Here's a trick I use on my Bigger PRs: I set my PR to Draft Mode while CI Check is still running. It gives me more time to fix things if the CI Check fails :-) |
See comment below!
I recalled - but didn't go back and check tbh - a discussion saying that Originally I did Sorry if I got it wrong...and reinforces my other reply that this was merged too soon IMHO.
I see this as a standalone example...but it can be built on of course. For example, I've just found that (perhaps of course, which is my inexperience showing) syslog messages got to /dev/console and that doesn't make its way through to FBCON. It's almost like FBCON should be an actual driver (/dev/fbcon) not an app? That's why I opened a discussion on the mail list, and left it as a draft for a while to seek feedback ;-) |
It was marked as a draft for many days with several pushes and successful CI runs...which is why I wonder if, after marked as ready for review and/or a last push from me, the last CI run wasn't allowed to, or didn't, run? I always check CI results and fix broken things, and I do use kconfiglib...and it didn't report any issues but perhaps I forgot some method or setting to ensure it reported errors. Blame old age making me forgetful lol. |
|
All good now :-) @hartmannathan found the issue and @lupyuen quickly fixed it, things like this happen sometimes, we just need to keep draft status until absolutely sure it can be merged and all work is complete :-) Have a good weekend folks :-) |

Summary
This adds a new "Example App" that allows a framebuffer character device to be used for STDOUT and/or STDERR text rendering.
Impact
It is a standalone app so has no impact on anything else
Testing
On a custom board (SAMA5D27C-D1g with 800x480 TFT