当前位置:网站首页>STM32 porting lvgl8.2
STM32 porting lvgl8.2
2022-07-21 00:49:00 【ValentineHP】
One . Preface
Transplanted for most of the day , The final success lies in stm32 On the platform lvgl8.2, I'm really tired .lvgl As a recently popular embedded GUI Open source library , Very powerful , So I chose it . In the process of transplantation , Stepped on many pits , Share it here , Avoid stepping on the pit repeatedly , A waste of time .
Let's first look at the transplant effect , The picture taken by mobile phone is not very clear , You can barely see the effect .
The complete project will be in WeChat official account FPGA The journey give .
The official account of WeChat reply STM32 transplant LVGL Get download link . If the migration fails , For comparison .
Two . Related preparations
- Prepare one stm32 Complete project , With timer interrupt , as well as lcd Screen drive .
- lvgl The source code file , The latest one is 8.3 edition .
When you are ready, you can transplant .
3、 ... and . Migration start
- stay stm32 Project directory , Create a folder lvgl, It is stored in this lvgl All files for .
- take lvgl Medium src,examples/porting, These two folders , as well as lv_conf_template.h and lvgl.h Copy to the lvgl In the folder .
- Get rid of porting All under folder template suffix .lv_conf_template.h It's also .
4. take src and porting All files under the folder are added into stm32 List of projects ( Remember all the files , No doubt. ), It's time to test patience . After adding , Then add three more paths
- take lv_conf.g ,lv_port_disp.c and lv_port_disp.h Medium if 0 Change to if 1
- Choose one of the following three , Then comment out the remaining two , then draw_buf That line , Just change it to the one you selected .
- This is the point , stay disp_init Add screen initialization function , And then in disp_flush Add drawing function in . This is to draw the rectangular area . notes Meaning focus ,color_p It's a pointer . It stores this area , Pixel value of each point . Instead of this area showing a color . This is where I misunderstood , I've been debugging for a long time .
- Medium timer interrupt medium , Add this function .
- Main function , initialization lvgl, And display devices , And call timer_handler
- stay lv_conf.h Open the following two macros , Run the program , If there is no mistake , It will be at the bottom of the screen , See the memory usage and frame rate . In this way, there is no need to use routines to determine lvgl Whether it can be displayed normally .
End
边栏推荐
- 央视新闻《杭州开餐饮手撕定额发票》新闻频道_人民网
- How to use parallel programming to improve task execution efficiency
- Internet of things communication protocols: mqtt, COAP, nb-iot, RFID, Bluetooth, NFC
- Developers must read: 2022 mobile application operation growth insight white paper
- QT_ code
- 央视新闻《北京开餐饮手撕定额发票》新闻频道_人民网
- Re understand the life world and ourselves
- Create the future and enjoy extraordinary. Opengauss Developer Day 2022 was successfully held
- Apipost: a useful weapon
- Luogu p5250 timber warehouse
猜你喜欢
【翻译】C#表达式中的动态查询
解锁高评分 | eBay 深耕用户体验,优化大屏幕设备应用
推荐一个开源商城
苦劝无果,民警现场写代码揭诈骗,这事让我有一个脑洞
Create the future and enjoy extraordinary. Opengauss Developer Day 2022 was successfully held
Three principles CIOs should follow in order to successfully carry out digital transformation
Typeof and keyof
How to get started NET Core ? Recommend these 10 excellent open source projects!
Deeply participated in opengauss Developer Day 2022, cloud and enmo showed their style in a number of activities
企业应积极探索,把握元宇宙新业态与新趋势
随机推荐
APP UI自动化测试常见面试题,或许有用呢~
张量的通俗理解
央视新闻《广州开住宿手撕定额发票》新闻频道_人民网
Deeply participated in opengauss Developer Day 2022, cloud and enmo showed their style in a number of activities
央视新闻《天津开住宿手撕定额发票》新闻频道_人民网
【JVM 系列】JVM 中常见的垃圾回收器
开发者必读:2022年移动应用运营增长洞察白皮书
CCTV news news news channel "Jinan opens catering quota invoice by hand"_ People's network
开发那些事儿:EasyCVR集群该如何配置参数?
C asynchronous programming read this article is enough
模型压缩-方案(一)-参数共享:ALBERT、BERT-of-Theseus
Typeof and keyof
Web性能测试需求分析,具体应该怎么做?
这款国产良心软件正式开源!
[leetcode] split the basic template and find the left and right boundaries
央视新闻《郑州开餐饮手撕定额发票》新闻频道_人民网
Codeworks 5 questions per day (average 1500) - day 20
怎么使用mySQL语句导出表
Luogu p1918 bowling ball
Main research directions of Intelligent Question Answering