Acfboy commented on issue #18566:
URL: https://github.com/apache/nuttx/issues/18566#issuecomment-5152088177

   Hi @ppisa , sorry for the long wait. I've done an initial port of Nano-X to 
NuttX. The main problem I hit is that in the current flat build everything 
lives in a single address space, which causes:
   
   1. The client and server sides of Nano-X share the same interfaces, so the 
functions collide by name.
   2. Client data is shared, so multiple clients cannot run at the same time.
   
   Fortunately, I found that the existing Microwindows eCos support already 
contains solutions to both of these problems, though they look a bit dated. I 
adapted the eCos approach and moved it over to the NuttX support. Specifically, 
I made the server include `serv.h` to rename the `GrXXX` symbols to 
`SVR_GrXXX`, and I used the POSIX per-thread key mechanism to keep a pointer to 
the per-client data in each task's own TLS. What do you think of this approach 
(https://github.com/ghaerr/microwindows/commit/b45f8208dd376a928da8dc3fbcdc0ad2bef7b3ff)?
 @ghaerr  
   
   As for examples, I ported `nxcalc` and `nxterm`. `nxterm` turns into a 
terminal emulator running NSH over a pseudo terminal, and I made `nxterm` the 
init entry point: when you run `sim:nanox`, an `nxterm` window appears, and 
typing `nanoxcalc` inside it opens the calculator. 
https://github.com/apache/nuttx-apps/pull/3689
   
   However, I still have a few open issues, e.g. running it directly on qemu 
seems to fail, and when the calculator opens it overlaps the nxterm window and 
the text in nxterm disappears. I'm still investigating the causes. Once these 
are resolved, I'll submit a PR for the community to review and try out.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to