The bsp I adopt is i386/pc386. I use a universal VGA graphics card as the RTEMS frame buffer. When writing code to draw a straight line, the three parameters fbxres, fbyres, and fbbpp obtained are all 0. Could you please give me some suggestions for drawing graphics using frame buffers?
The Microwindows/Nano-X include RTEMS support
There is even RTEMS Source Builder package build provided for Microwidows build
which allows to build graphic package, i.e.:
../source-builder/sb-set-builder \
--log=graphic-build-log.txt \
--prefix=/opt/rtems/7 \
--rtems-bsp=i386/pc686 \
--with-rtems-bsp=pc686 \
--pkg-tar-files \
graphics/graphics-all.bset
We have contributed basic VESA BIOS support into RTEMS long time ago to allow switch to graphic mode at startup in the real-mode before switch to protected one
https://gitlab.rtems.org/rtems/rtos/rtems/-/blob/main/bsps/i386/pc386/console/fb_vesa_rm.c
This worked on more graphics cards including some Nvidia if I remember correctly.
There is even GSoC result which I have led long time ago which allows direct setup of graphic mode for QEMU provided Cyrrus PCI card
https://gitlab.rtems.org/rtems/rtos/rtems/-/blob/main/bsps/i386/pc386/console/fb_cirrus.c
There is some RTEMS RTOS config which I have used for graphics build
#!/bin/sh
MY_DIR="$(cd "$(dirname "$0")" ; pwd -L )"
RTEMS_DIR=../../../git/rtems
$RTEMS_DIR/waf bspdefaults --rtems-bsps=i386/pc686 -t "$RTEMS_DIR" -o "$MY_DIR" --prefix "/opt/rtems/6" >config.ini || exit 1
mv config.ini config.ini.default
sed <config.ini.default >config.ini \
-e 's/^RTEMS_POSIX_API .*$/RTEMS_POSIX_API = True/' \
-e 's/^BSP_ENABLE_COM1_COM4 .*$/BSP_ENABLE_COM1_COM4 = True/' \
-e 's/^USE_COM1_AS_CONSOLE .*$/USE_COM1_AS_CONSOLE = True/' \
-e 's/^USE_VBE_RM .*$/USE_VBE_RM = True/' \
-e 's/^USE_CIRRUS_GD5446 .*$/USE_CIRRUS_GD5446 = True/' \
# -e 's/^RTEMS_SMP .*$/RTEMS_SMP = True/' \
# -e 's/^BSP_CONSOLE_MINOR .*$/BSP_CONSOLE_MINOR = 0/' \
$RTEMS_DIR/waf configure -t "$RTEMS_DIR" -o "$MY_DIR" --rtems-config "$MY_DIR/config.ini" --prefix "/opt/rtems/6" || exit 1
$RTEMS_DIR/waf || exit 1
$RTEMS_DIR/waf install || exit 1
We have used graphics with Microwidows on RTEMS even with own drivers on ARM
But that has been long time ago.
So in general, support known to work (at some time) is there but expect that some updates and fixes would be required.
