Tutorial on how to automatically display lvgl GUI on Luckfox_pico_Ultra (W) when booting
Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
Tutorial on how to automatically display lvgl GUI on Luckfox_pico_Ultra (W) when booting
Burn one of the following systems on luckfox_pico_Ultra
Get the source code of the LVGL sample program (on a virtual machine or Ubuntu host):
git clone https://github.com/luckfox-eng29/luckfox_lvgl.git
Cross-compile the sample program:
Compilation environment: WSL2 Ubuntu 22.02
mkdir build
cd build
export LUCKFOX_SDK_PATH=<absolute address of Luckfox Pico SDK>
cmake ..
make -j
Finally compiled executable file: luckfox_lvgl_demo
Use scp to copy the luckfox_lvgl_demo file to the development board:
sudo scp luckfox_lvgl_demo root@<your IP>:/
Check the running effect of luckfox_lvgl_demo:
Give luckfox_lvgl_demo executable permission:
chmod a+x ./luckfox_lvgl_demo
Execute luckfox_lvgl_demo program:
./luckfox_lvgl_demo
Display the GUI interface on the monitor
Set luckfox_lvgl_demo to start automatically at boot:
Create a script named S90LCD in the /etc/init.d/directory
nano /etc/init.d/S90LCD
The script content is as follows:
#!/bin/sh
case $1 in
start)
export LD_LIBRARY_PATH=/oem/usr/lib:$LD_LIBRARY_PATH
cd /root
echo "Starting your C program..."
/root/luckfox_lvgl_demo &
;;
stop)
echo "Stopping your C program..."
;;
*):
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
Give the S90LCD script executable permissions
chmod a+x /etc/init.d/S90LCD
Reboot to take effect
reboot
report