Implement drivers for microwindows#3624
Draft
Acfboy wants to merge 6 commits into
Draft
Conversation
…to NuttX The Microwidows/Nano-X (https://microwindows.org/) is project developed and maintained by Gregory Haerr. It is heavily extended from predecessor NanoGUI and supports multiple APIs. The initial integration build only core parts engine, drivers and basic/included precompiled bitmap fonts. The source files are derived from list provided by Objects.rules files in appropriate Microwindows directories. The build requires fix includes in src/engine/devfont.c where #include <strings.h> is missing for strcasecmp(). Only dummy keyboard and mouse drivers are compiled. Screen driver has to be implemented/ported for NuttX FrameBuffer device API. Signed-off-by: Pavel Pisa <ppisa@pikron.com>
Signed-off-by: Acfboy <AcfboyU@outlook.com>
Signed-off-by: Acfboy <AcfboyU@outlook.com>
Signed-off-by: Acfboy <AcfboyU@outlook.com>
Signed-off-by: Acfboy <AcfboyU@outlook.com>
Signed-off-by: Acfboy <AcfboyU@outlook.com>
1 task
Contributor
|
Thanks to @Acfboy for the work and this draft request for discussion and @ghaerr for consultations and support on Microwidows side. I am leaving for four days now, but there are some my thoughts, the NuttX Microwidows screen, mouse and keyboard drivers should be submitted with appropriate build enable options to the mainline Microwindows https://github.com/ghaerr/microwindows before the final nuttx-apps pull request. |
acassis
reviewed
Jul 11, 2026
| @@ -1,5 +1,5 @@ | |||
| ############################################################################ | |||
| # apps/examples/rng90/Make.defs | |||
| # apps/examples/hello/Make.defs | |||
Contributor
|
@Acfboy please fix the issues on mwdemo: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Hello the community! Here is the work I have done in the early stage of GSoC.
Work Completed So Far
The GDI‑level Microwindows core, drivers, and
mwdemoare functional on QEMU x86‑64 and the simulator.Build System Integration
ERRORmacro inwingdi.hclashes with NuttX’senum { ERROR = -1 }. The fix was to compile with-DNOGDI, a solution accepted by ghaerr and implemented upstream.mwdemo.care compiled into binary using theconvbmptool during the build.NuttX Hardware Drivers
Framebuffer driver (
scr_nuttx.c), Keyboard driver(kbd_nuttx.c), Mouse driver (mou_nuttx.c), have been implemented to connect Microwindows to NuttX’s input/output subsystems.Demo Application
Ported
mwdemo.c(a complex Windows‑like demo) into a standalone NuttX example application. The demo runs successfully on bothqemu‑intel64:mwand the NuttX simulator (sim:mw).I have also tested the demo with #define CONTROL 1 enabled in mwdemo.c, which represents a more complex use case.
Upstream Bug Fixes
Several issues were discovered, analysed, and fixed – most of them already merged upstream:
MwSelect()blocked forever when a timer had already expired, because the code assumed no timer existed whenGdGetNextTimeoutreturned false.timeout == 0and return immediately.#if defined(ELKS)inmwtypes.hforcedMWPIXELVALHWtounsigned chareven whenELKS=0(intended to disable it). This truncated 32‑bit pixel values read from the framebuffer.#if ELKSin ghaerr/microwindows@7a2ff57.MwSelectswitches to polling (select(…, timeout=0)). The USB input thread had a lower priority (50) than the application (100), so it never got CPU time to generate events.NUTTX-specific patch will be prepared.Remaining Issues
However, despite resolving several issues, two discovered problems are still under investigation. Due to a brief interruption while preparing for final exams, I have not yet fully diagnosed them. I will resume work soon and address the following:
#define CONTROL 1is enabled inmwdemoand input is tested in an edit box, backspace handling does not work correctly under QEMU.sim), after dragging a window, the mouse cursor jumps outside the screen and drags the window off-screen as well.Both issues appear to be related to the input drivers of the respective platforms. For instance, adding
sample.point[0].x = x; sample.point[0].y = y;before the code at sim_touchscreen.c#L198-L220 resolves the mouse drift problem. It seems thatsample.point[0]was previously uninitialized; however, the code branch in question never setsTOUCH_POS_VALID, so that value should not have been read in the first place. The root cause may lie elsewhere.How to Reproduce (QEMU / Simulator)
qemu-intel64:mw
defconfigsim:mw
defconfigNotice
You can set
#define CONTROL 1manually inmwdemo.cto test more complex case.Plan for the Second Half of GSoC