How to use LittlevGL for uclinux ported on stm32F769i-Disco


We had uclinux running on stm32f769I-discovery board. I want to implement UI using linux frame buffer (/dev/fb0). Can anyone help me how to use littlevGL for uclinux on stm32f769I Discovery board?

Thank you

This Linux FB example project should be a good starting point, as I don’t believe the interface is any different.

Thank you
The above example was resulted as SIGSEGV.
The error showed after debugging the application as

" Program received signal SIGSEGV, segmentation fault.
0xc0a00044 in _stext () "

May I know the reason for this error.

Thank you

I suggest you use gdbserver running on ucLinux and step through the program to find where it crashes. The information you’ve given isn’t enough to draw any conclusions as to where the issue is.

The snapshot was attached with this email which has Segmentation fault.

Thank you

As I mentioned above, I suggest stepping through the program to see where the segmentation fault is happening. This screenshot doesn’t really show much more than what you mentioned in your previous post.

Another thing to try is enabling logging for LittlevGL in lv_conf.h and seeing if anything gets printed.


I was enabled logging but nothing is printed. The program was showing the SIGSEGV when program starts because of this I am unable to do stepping in gdbserver. We have compared the instruction words between target debugging and the disassembly file which looks same.

Please suggest me how to get rid of this error.

Thank you

Try commenting out everything in main and just adding a simple printf("Hello world\n").

It’s possible that the file isn’t being compiled with the right settings for ucLinux on Cortex-M. If that’s the case, the printf won’t work. If the printf does work, the issue is somewhere else.

printf is not working so I was adding my Makefile data in this email. Please verify this environment.

My Makefile


CC = arm-uclinuxeabi-gcc
LVGL_DIR = ${shell pwd}
LIB_FILES = ${INSTALL_ROOT}/A2F/root/usr/include -mcpu=cortex-m3 -mthumb
INCLUDE = -L ${INSTALL_ROOT}/A2F/root/usr/lib -pthread

CFLAGS = -mcpu=cortex-m3 -mthumb -Wall -Wshadow -Wundef -O -g -I$(LVGL_DIR)/ -I$(LIB_FILES) -I$(INCLUDE)
#CFLAGS = -Wall -Wshadow -Wundef -O -g -I$(LVGL_DIR)/

LDFLAGS = -lpthread
BIN = demo

#Collect the files to compile
MAINSRC = ./main.c

include $(LVGL_DIR)/lvgl/
include $(LVGL_DIR)/lv_drivers/
include $(LVGL_DIR)/lv_examples/






all: default

%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@
@echo “CC $<”

default: $(AOBJS) $(COBJS) $(MAINOBJ)

rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)


We bought uclinux from emcrafts for STM32F769NI-discovery board. Please note this is kindly for your information.

Thank you


The code is working now and am able to execute it on target board. The environment is not set properly because of this multi threading didn’t work properly. Thank you in helping me to rectify the error.

But how to enable touch on LCD (driver : /dev/input/event0) which is not working on current example. Please help me if any examples are available.

Thank you

Enabling and registering the evdev driver should work, assuming that the touchscreen shows up as a standard Linux input device.

Code snippet below not tested.

lv_indev_drv_t indev_drv;
indev_drv.read_cb = evdev_read;
lv_indev_t * mouse_indev = lv_indev_drv_register(&indev_drv);