当前位置:网站首页>Precautions for lvgl v8.2 string display on keil MDK (take little bear pie as an example)
Precautions for lvgl v8.2 string display on keil MDK (take little bear pie as an example)
2022-07-01 09:37:00 【Engineer-Bruce_ Yang】
Click on the above “ Embedded Application Research Institute ”, choice “ Roof placement / Official account of star standard ”
Dry goods benefits , First time delivery !
source | Embedded Application Research Institute
Arrangement & Typesetting | Embedded Application Research Institute
Before that LVGL Simulator CodeBlock There is a multilingual demo, For learning LVGL The application of many languages , As shown below :

Later, I transplanted it to the little bear development board , It turned out to be like this , Even the display position of the control has changed ( The specific reason for the control shift is unknown , To be analyzed later LVGL Source code ):

This is a coding problem . According to past experience , Directly find the file with Chinese string in the project directory , use notepad++ Turn it into utf-8, Then save it directly and open it again Keil MDK That's all right. , Then try it :


Next open MDK engineering , recompile , There is 6 individual Error:

1、 Wrong pit arrangement

The cause of the error shows that there are too many parameters to call the macro , But in fact, this is just a parameter ... Should not be , I began to doubt whether the compiler supported wide character display , So search Keil MDK The help manual sees this :


Follow the instructions in the documentation , I am here Misc Controls Add... To this configuration item --no-multibyte-chars, And then recompile the project :

Next, download it to the development board :


The final display is normal .
2、 The core reason
adopt STM32CubeMX The encoding format of the generated program source file is not UTF-8 perhaps UTF16, Therefore, if you write Chinese and some special national language characters under some files, you need to convert the files manually . If the source file code is UTF-8 or UTF-16, And the file begins with a byte order mark , The compiler will ignore --locale and --[no_]multibyte_chars Option and interpret the file as UTF-8 or UTF- 16.
3、 The correct approach
Usually do multi language display , We need to separate the languages of each different country into different documents , Then transcode it separately , To facilitate unified management , for example 3D Printer firmware Marlin Code , That's what it does :

And some simulation display software , The coding environment is relatively perfect , Many pits have actually helped us eliminate them in advance , Therefore, in the face of some platforms with less perfect coding environment , Understanding the environment configuration and some coding rules is more helpful for us to locate the problem . If you have a better way , Leave a comment in the comments section , Communicate together LVGL applied technology . At present, the application routine is still being modified , Later, it will be shared to Github perhaps Gitee, The address will be given in the comments section . Next issue will share how to simulate a rotary encoder to realize keyboard input .
Past highlights
Keil MDK software package (pack) Several methods of downloading
Hand in hand Keil MDK Use in GCC Compiler tool chain
Keil MDK Upgrade to Keil Studio, Here comes the black theme you want , Attached handle tutorial
I think this article is helpful to you , Let's go [ Looking at ] And forward to share , It's also my support .
边栏推荐
- Closure implementation iterator effect
- 富文本实现插值
- Flinkv1.13 implementation of financial anti fraud cases
- HMS core audio editing service 3D audio technology helps create an immersive auditory feast
- 利用闭包实现私有变量
- [pytorch] 2.4 convolution function nn conv2d
- 韦东山板子编译内核问题解决
- JS原型链
- SQL learning notes (04) - data update and query operations
- Nacos service configuration and persistence configuration
猜你喜欢

【检测技术课案】简易数显电子秤的设计与制作

2022.02.15_ Daily question leetcode six hundred and ninety

樹結構---二叉樹2非遞歸遍曆
![2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder](/img/19/cce8d8a7cdcb1021166c46adf803c1.png)
2.3 [pytorch] data preprocessing torchvision datasets. ImageFolder

嵌入式开发用到的一些工具

吃一个女富豪的瓜。。。

LVGL V8.2字符串显示在Keil MDK上需要注意的事项(以小熊派为例)

Design and manufacture of simple digital display electronic scale

Nacos service configuration and persistence configuration

炒币,亏了1000万。
随机推荐
LVGL V8.2字符串显示在Keil MDK上需要注意的事项(以小熊派为例)
js this丢失问题分析 及 解决方案
2.2 【pytorch】torchvision. transforms
Unity tips for reducing the amount of code -- empty protection extension
Hololens2 development -6-eyetracking and speech recognition
Implementation and application of queue
[ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DHT11 +nodejs local service + MySQL database
华为帐号多端协同,打造美好互联生活
MapReduce编程基础
Simple load balancing with Nacos
[pytorch] softmax function
Can diffusion models be regarded as an autoencoder?
121. thread scheduling: join() method and yield() method
Sd-wan notes
2.3 [kaggle dataset - dog feed example] data preprocessing, rewriting dataset, dataloader reading data
2.4 activation function
UE small knowledge point controller possess pawn process
闭包实现迭代器效果
IPv6 learning notes
nacos簡易實現負載均衡