你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

【LittlevGL LInux PC模拟器运行】

[复制链接]
andeyqi 发布时间:2018-5-30 15:03
本帖最后由 andeyqi 于 2018-6-1 11:09 编辑

闲逛论坛的时候,看到坛友分享的LittlevGL开源gui,初步了解该GUI可以再ST平台上运行,无奈现在手头没有带屛的开发板,即使没有硬件资源,但是无法阻挠继续下去的热情,有样东西叫模拟器,根据github的项目描述,作者已经实现了在模拟器上的运行,先在模拟器上搞下,有开发板时在板子上跑下。以下是github的关于模拟器的描述


PC project for LittleV Graphics Library
The Littlev Graphic Library is written mainly for microcontrollers and embedded systems however you can run the library on your PC as well without any embedded hardware. The code written on PC can be simply copied when your are using an embedded system.
Using a PC simulator instead of an embedded hardware has got several advantages:
  • Costs $0 because you you don't have to buy design PCB
  • Fast because you don't have to design an manufacture PCB
  • Collaborative because any number of developers can work without hardware requirements
  • Developer friendly because much easier and faster to debug on PC


认真观看github的描述,PC模拟器运行环境的搭建是很容易的,笔者按照搭建手顺半小时轻松搞定,成功运行起来,废话不多说了开启正文。

========================搭建从此处开启,以上当闲嗑处理===========================

本地Linux虚拟机环境UBUNTU16.04_64-bit
UsageGet the PC project
Clone the PC project and the related sub modules:
git clone http://github.com/littlevgl/proj_pc.gitcd proj_pcgit submodule update --init
or download it as zip here.
Install SDL
You can download SDL from http://www.libsdl.org/
On Linux you can install it via terminal:
  • Find the current version of SDL2: apt-cache search libsdl2 (e.g. libsdl2-2.0-0)
  • Install SDL2: sudo apt-get install libsdl2-2.0-0 (replace with the found version)
  • Install SDL2 development package: sudo apt-get install libsdl2-dev
  • If build essentials are not installed yet: sudo apt-get install build-essential
Install Eclipse CDT
Download and install Eclipse CDT from http://www.eclipse.org/cdt/
Import the PC simulator project
  • Open Eclipse CDT
  • Click File->Import and choose General->Existing project into Workspace
  • Browse the root directory of the project and click Finish
  • Build your project and run it
以上是官方的手册,
第一步是获取模拟器环境源码,
第二步安装依赖的SDL库,
第三步安装本地运行环境Eclipse,
第四步Eclikpse导入工程。

第一步是用git下载源码,安装过程中本着一个原则就可以,提示没有什么就安装什么就行。

ubuntu 使用熟悉的 sudo apt-get install XXX 就可以,安装的过程中出了以上设计的安装包外,我有额外安装了git 和 jre。

git毫无疑问,用git工具下载源码,肯定就要安装了,直接下载源码到本地也可以不安装。
jre,运行Eclipse 时需要依赖jre 或者 jdk 提示很明显,直接使用sudo apt-get install jre就可以成功安装,安装过程中可以更换下下安装源,系统自带的安装源下载速度太慢。安装的时候我使用的是以下源,root权限替换到/etc/apt/source.list中即可。


  1. deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
  2. deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
  3. deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
  4. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
  5. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
  6. deb http://mirrors.aliyun.com/ubuntu/ xenial universe
  7. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
  8. deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
  9. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
  10. deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
  11. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
  12. deb http://archive.canonical.com/ubuntu xenial partner
  13. deb-src http://archive.canonical.com/ubuntu xenial partner
  14. deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
  15. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
  16. deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
  17. deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

  18. #3.1.2:东北大学:
  19. deb-src http://mirror.neu.edu.cn/ubuntu/ xenial main restricted #Added by software-properties

  20. deb http://mirror.neu.edu.cn/ubuntu/ xenial main restricted

  21. deb-src http://mirror.neu.edu.cn/ubuntu/ xenial restricted multiverse universe #Added by software-properties

  22. deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates main restricted

  23. deb-src http://mirror.neu.edu.cn/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties

  24. deb http://mirror.neu.edu.cn/ubuntu/ xenial universe

  25. deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates universe

  26. deb http://mirror.neu.edu.cn/ubuntu/ xenial multiverse

  27. deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates multiverse

  28. deb http://mirror.neu.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

  29. deb-src http://mirror.neu.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties

  30. deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner

  31. deb http://mirror.neu.edu.cn/ubuntu/ xenial-security main restricted

  32. deb-src http://mirror.neu.edu.cn/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties

  33. deb http://mirror.neu.edu.cn/ubuntu/ xenial-security universe

  34. deb http://mirror.neu.edu.cn/ubuntu/ xenial-security multiverse

  35. #3.1.3:清华大学:
  36. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted

  37. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted

  38. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe

  39. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe

  40. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse

  41. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse

  42. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

  43. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted

  44. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

复制代码

debug运行时,提示找不到可执行程序,设置后就可以正常运行。

debug.PNG

模拟器的配置可以参照如下视频。

http://www.youtube.com/watch?v=ZzLdct2ymvg&feature=youtu.be

最后看下运行效果,有图有真相,没搞过gif,会的小伙伴可以留言教我下,简单上几个图片吧。

input.PNG
list.PNG

chart.PNG

收藏 1 评论1 发布时间:2018-5-30 15:03

举报

1个回答
电子星辰 回答时间:2018-6-13 15:14:22
谢谢分享,有时间试一试

所属标签

STM32团队

意法半导体微控制器和微处理器拥有广泛的产品线,包含低成本的8位单片机和基于ARM® Cortex®-M0、M0+、M3、M4、M33、M7及A7内核并具备丰富外设选择的32位微控制器及微处理器


最新内容

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版