博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
LinuxMint 编译 LittlevGL GUI
阅读量:5298 次
发布时间:2019-06-14

本文共 3123 字,大约阅读时间需要 10 分钟。

 编译必须 安装arm-linux-gcc-4.4.3.tar.gz

PC simulator

You can try out the Littlev Graphics Library using only your PC without any development board. Write a code, run it on the PC and see the result on the monitor. It is cross-platform: Windows, Linux and OSX is also supported!

  • Needs only few minutes setup
  • Costs $0. No PCB cost and no pay for any software
  • A TFT display is simulated and shown on the monitor of your PC
  • The touch pad is replaced by your mouse
  • The written code is portable, you can simply copy it when using an embedded hardware

Install Eclipse CDT

Eclipse CDT is C/C++ IDE. You can use other IDEs as well but in this tutorial the configuration for Eclipse CDT is shown.

Eclipse is a Java based software therefore be sure Jave Runtime Environment is installed on your system. 

On linux: sudo apt-get install default-jre

You can download Eclipse's CDT from: . Start the nstaller and choose *Eclipse CDT* from the list

Install SDL 2

The PC simulator uses the  cross platform library to simulate a TFT display and a touch pad.

Linux

On Linux you can easily install SDL 2 using a terminal:

  1. Find the current version of SDL2: apt-cache search libsdl2 (e.g. libsdl2-2.0-0)
  2. Install SDL2: sudo apt-get install libsdl2-2.0-0 (replace with the found version)    
    • 使用以下命令,使用上述命令会导致电脑重启后会出现 "failed to start X server error"
    • On a Debian-like system (e.g. Ubuntu, Linux Mint), this can be done with the command:
      • sudo apt-get install git curl libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0
    • On a Fedora system, this can be done with the command:
      • dnf install curl SDL2 SDL2_mixer SDL2_image
  3. Install SDL2 developement package: sudo apt-get install libsdl2-dev
  4. If build essentials are not installed yet: sudo apt-get install build-essential

Windows

If you are using Windows firstly you need to install  and do the following steps to add SDL2:

  1. Download the development libraries of SDL. 
    Go to  and download Development Libraries: SDL2-devel-2.0.5-mingw.tar.gz
  2. Uncompress the file and go to x86_64-w64-mingw32 directory (for 64 bit MinGW) or to i686-w64-mingw32 (for 32 bit MinGW)
  3. Copy ..._mingw32/include/SDL2 folder to C:/MinGW/include
  4. Copy ..._mingw32/lib/ content to C:/MinGW/lib
  5. Copy ..._mingw32/bin/SDL2.dll to {eclipse_worksapce}/pc_simulator/Debug/. Do it later when Eclipse is installed.

If something is not worging I suggest  to get statered with SDL

Pre-configured project

A pre-configured graphics library project (based on the lates release) is always available in PC simulator project. You can find it on  or on the  page. The project is configured for Eclipse CDT.

Add the pre-configured project to Eclipse CDT

Run Eclipse CDT. It will show a dialogue about the workspace path. Before accepting it check that path and copy (and unzip) the downloaded pre-configured project there. Now you can accept the workspace path. Of course you can modify this path b

 

 

Project > Properties > Run/Debug Settings

Click 'New...' button
Choose 'C/C++ Application' and then Edit Configuration window will be opened.
Enter Debug/"your project name"in C/C++ Application box(?) on the Main tab.

转载于:https://www.cnblogs.com/sinferwu/p/8309660.html

你可能感兴趣的文章
Linq 学习(1) Group & Join--网摘
查看>>
asp.net 调用前台JS调用后台,后台掉前台JS
查看>>
Attribute(特性)与AOP
查看>>
苹果手表:大方向和谷歌一样,硬件分道扬镳
查看>>
Competing Consumers Pattern (竞争消费者模式)
查看>>
Android面试收集录15 Android Bitmap压缩策略
查看>>
PHP魔术方法之__call与__callStatic方法
查看>>
ubuntu 安装后的配置
查看>>
web前端之路,js的一些好书(摘自聂微东 )
查看>>
【模板】对拍程序
查看>>
Pycharm安装Markdown插件
查看>>
【转】redo与undo
查看>>
C#更新程序设计
查看>>
解决升级系统导致的 curl: (48) An unknown option was passed in to libcurl
查看>>
Java Session 介绍;
查看>>
spoj TBATTLE 质因数分解+二分
查看>>
Django 模型层
查看>>
dedecms讲解-arc.listview.class.php分析,列表页展示
查看>>
Extjs6 经典版 combo下拉框数据的使用及动态传参
查看>>
【NodeJS】http-server.cmd
查看>>