Skip to content

Commit

Permalink
Deploying to gh-pages from @ 9ad992ac605e26167f9a59dc9adf070d4242a7cc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
lvgl-bot committed Jul 24, 2023
0 parents commit 6da37aa
Show file tree
Hide file tree
Showing 6,800 changed files with 4,900,827 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 4 additions & 0 deletions 6.1/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 49d3a66846b076dc435f4270a086764a
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added 6.1/.doctrees/environment.pickle
Binary file not shown.
Binary file added 6.1/.doctrees/get-started/index.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/get-started/live-demo.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/get-started/micropython.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/get-started/pc-simulator.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/get-started/quick-overview.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/index.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/lang.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/lv_examples/README.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/lv_examples/docs/LICENSE.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/arc.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/bar.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/btn.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/btnm.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/calendar.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/canvas.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/cb.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/chart.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/cont.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/cpicker.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/ddlist.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/gauge.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/img.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/imgbtn.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/index.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/kb.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/label.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/led.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/line.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/list.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/lmeter.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/mbox.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/obj.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/page.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/preload.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/roller.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/slider.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/spinbox.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/sw.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/ta.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/table.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/tabview.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/tileview.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/object-types/win.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/animation.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/display.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/drawing.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/event.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/file-system.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/font.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/image.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/indev.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/index.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/layer.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/object.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/style.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/overview/task.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/display.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/indev.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/index.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/log.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/os.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/project.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/sleep.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/sys.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/task-handler.doctree
Binary file not shown.
Binary file added 6.1/.doctrees/porting/tick.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added 6.1/_images/align.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/bidi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/button_style_example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/layers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/list_theme_example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_arc_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_arc_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_bar_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_btn_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_btnm_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_calendar_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_canvas_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_canvas_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_cb_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_chart_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_cont_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_ddlist_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_ddlist_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_gauge_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_img_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_imgbtn_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_kb_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_label_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_label_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6.1/_images/lv_ex_label_3.gif
Binary file added 6.1/_images/lv_ex_led_1.png
Binary file added 6.1/_images/lv_ex_line_1.png
Binary file added 6.1/_images/lv_ex_list_1.gif
Binary file added 6.1/_images/lv_ex_lmeter_1.png
Binary file added 6.1/_images/lv_ex_mbox_1.gif
Binary file added 6.1/_images/lv_ex_mbox_2.gif
Binary file added 6.1/_images/lv_ex_obj_1.png
Binary file added 6.1/_images/lv_ex_page_1.gif
Binary file added 6.1/_images/lv_ex_preload_1.gif
Binary file added 6.1/_images/lv_ex_roller_1.gif
Binary file added 6.1/_images/lv_ex_slider_1.gif
Binary file added 6.1/_images/lv_ex_slider_2.gif
Binary file added 6.1/_images/lv_ex_spinbox_1.gif
Binary file added 6.1/_images/lv_ex_sw_1.gif
Binary file added 6.1/_images/lv_ex_ta_1.gif
Binary file added 6.1/_images/lv_ex_ta_2.gif
Binary file added 6.1/_images/lv_ex_table_1.png
Binary file added 6.1/_images/lv_ex_tabview_1.gif
Binary file added 6.1/_images/lv_ex_tileview_1.gif
Binary file added 6.1/_images/lv_ex_win_1.gif
Binary file added 6.1/_images/lv_theme_intro.png
Binary file added 6.1/_images/par_child1.png
Binary file added 6.1/_images/par_child2.png
Binary file added 6.1/_images/par_child3.png
Binary file added 6.1/_images/simple_button_example.gif
Binary file added 6.1/_images/slider_example.gif
Binary file added 6.1/_images/style-built-in.png
Binary file added 6.1/_images/style-example.png
Binary file added 6.1/_images/symbols.png
Binary file added 6.1/_images/sys.png
Binary file added 6.1/_images/theme-example.png
16 changes: 16 additions & 0 deletions 6.1/_sources/get-started/index.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```eval_rst
:github_url: https://github.com/littlevgl/docs/blob/master/en/get-started/index.md
```
# Get started

```eval_rst

.. toctree::
:maxdepth: 2

live-demo
pc-simulator
quick-overview
micropython
```

8 changes: 8 additions & 0 deletions 6.1/_sources/get-started/live-demo.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```eval_rst
:github_url: https://github.com/littlevgl/docs/blob/master/en/get-started/live-demo.md
```
# Live demos

You can see how LittlevGL looks like without installing and downloading anything either on target platform or on the host machine. There are some ready made user interfaces which you can easily try in your browser.

Go to the [Live demo](https://littlevgl.com/live-demo) page and choose a demo you are interested in.
93 changes: 93 additions & 0 deletions 6.1/_sources/get-started/micropython.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
```eval_rst
:github_url: https://github.com/littlevgl/docs/blob/master/en/get-started/micropython.md
```
# Micropython

## What is Micropython?

[Micropython](http://micropython.org/) is Python for microcontrollers.
Using Micropython, you can write Python3 code and run it even on a bare metal architecture with limited resources.

### Highlights of Micropython

- **Compact** - Fits and runs within just 256k of code space and 16k of RAM. No OS is needed, although you can also run it with an OS, if you want.
- **Compatible** - Strives to be as compatible as possible with normal Python (known as CPython).
- **Versatile** - Supports many architectures (x86, x86-64, ARM, ARM Thumb, Xtensa).
- **Interactive** - No need for the compile-flash-boot cycle. With the REPL (interactive prompt) you can type commands and execute them immediately, run scripts etc.
- **Popular** - Many platforms are supported. The user base is growing bigger. Notable forks: [MicroPython](https://github.com/micropython/micropython), [CircuitPython](https://github.com/adafruit/circuitpython), [MicroPython_ESP32_psRAM_LoBo](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo)
- **Embedded Oriented** - Comes with modules specifically for embedded systems, such as the [machine module](https://docs.micropython.org/en/latest/library/machine.html#classes) for accessing low-level hardware (I/O pins, ADC, UART, SPI, I2C, RTC, Timers etc.)

---

## Why Micropython + LittlevGL?

Currently, Micropython [does not have a good high-level GUI library](https://forum.micropython.org/viewtopic.php?f=18&t=5543) by default. LittlevGL is an [Object Oriented Component Based](https://blog.littlevgl.com/2018-12-13/extend-lvgl-objects) high-level GUI library, which seems to be a natural candidate to map into a higher level language, such as Python. LittlevGL is implemented in C and its APIs are in C.

### Here are some advantages of using LittlevGL in Micropython:

- Develop GUI in Python, a very popular high level language. Use paradigms such as Object Oriented Programming.
- Usually, GUI development requires multiple iterations to get things right. With C, each iteration consists of **`Change code` > `Build` > `Flash` > `Run`**.
In Micropython it's just **`Change code` > `Run`** ! You can even run commands interactively using the [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) (the interactive prompt)

### Micropython + LittlevGL could be used for:

- Fast prototyping GUI.
- Shorten the cycle of changing and fine-tuning the GUI.
- Model the GUI in a more abstract way by defining reusable composite objects, taking advantage of Python's language features such as Inheritance, Closures, List Comprehension, Generators, Exception Handling, Arbitrary Precision Integers and others.
- Make LittlevGL accessible to a larger audience. No need to know C in order to create a nice GUI on an embedded system.
This goes well with [CircuitPython vision](https://learn.adafruit.com/welcome-to-circuitpython/what-is-circuitpython). CircuitPython was designed with education in mind, to make it easier for new or unexperienced users to get started with embedded development.
- Creating tools to work with LittlevGL at a higher level (e.g. drag-and-drop designer).

---

## So what does it look like?

> TL;DR:
> It's very much like the C API, but Object Oriented for LittlevGL components.

Let's dive right into an example!

### A simple example

```python
import lvgl as lv
lv.init()
scr = lv.obj()
btn = lv.btn(scr)
btn.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
label = lv.label(btn)
label.set_text("Button")
lv.scr_load(scr)
```

## How can I use it?

### Online Simulator

If you want to experiment with LittlevGL + Micropython without downloading anything - you can use our online simulator!
It's a fully functional LittlevGL + Micropython that runs entirely in the browser and allows you to edit a python script and run it.

[Click here to experiment on the online simulator](https://sim.littlevgl.com/v6/micropython/ports/javascript/lvgl_editor.html)

[Hello World](https://sim.littlevgl.com/v6/micropython/ports/javascript/lvgl_editor.html?script=https://gist.githubusercontent.com/amirgon/51299ce9b6448328a855826149482ae6/raw/0f235c6d40462fd2f0e55364b874f14fe3fd613c/lvgl_hello_world.py&script_startup=https://gist.githubusercontent.com/amirgon/7bf15a66ba6d959bbf90d10f3da571be/raw/8684b5fa55318c184b1310663b187aaab5c65be6/init_lv_mp_js.py)

### PC Simulator

Micropython is ported to many platforms. One notable port is "unix", which allows you to build and run Micropython (+LittlevGL) on a Linux machine. (On a Windows machine you might need Virtual Box or WSL or MinGW or Cygwin etc.)

[Click here to know more information about building and running the unix port](https://github.com/littlevgl/lv_micropython)

### Embedded platform

At the end, the goal is to run it all on an embedded platform.
Both Micropython and LittlevGL can be used on many embedded architectures, such as stm32, ESP32 etc.
You would also need display and input drivers. We have some sample drivers (ESP32+ILI9341, as well as some other examples), but most chances are you would want to create your own input/display drivers for your specific purposes.
Drivers can be implemented either in C as Micropython module, or in pure Micropython!

## Where can I find more information?

- On the [Blog Post](https://blog.littlevgl.com/2019-02-20/micropython-bindings)
- On `lv_micropython` [README](https://github.com/littlevgl/lv_micropython)
- On `lv_binding_micropython` [README](https://github.com/littlevgl/lv_binding_micropython)
- On LittlevGL forum (Feel free to ask anything!)
- On Micropython [docs](http://docs.micropython.org/en/latest/) and [forum](https://forum.micropython.org/)
124 changes: 124 additions & 0 deletions 6.1/_sources/get-started/pc-simulator.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
```eval_rst
:github_url: https://github.com/littlevgl/docs/blob/master/en/get-started/pc-simulator.md
```
# Simulator on PC


You can try out the LittlevGL **using only your PC** (i.e. without any development boards). The LittlevGL will run on a simulator environment on the PC where anyone can write and experiment the real LittlevGL applications.

Simulator on the PC have the following advantages:
- Hardware independent - Write a code, run it on the PC and see the result on the PC monitor.
- Cross-platform - Any Windows, Linux or OSX PC can run the PC simulator.
- Portability - the written code is portable, which means you can simply copy it when using an embedded hardware.
- Easy Validation - The simulator is also very useful to report bugs because it means common platform for every user. So it's a good idea to reproduce a bug in simulator and use the code snippet in the [Forum](https://forum.littlevgl.com).

## Select an IDE

The simulator is ported to various IDEs (Integrated Development Environments). Choose your favorite IDE, read its README on GitHub, download the project, and load it to the IDE.

```eval_rst
.. raw:: html

<table style="width:100%">
<thead>
<tr>
<th>Eclipse</th>
<th>CodeBlocks</th>
<th>Visual Studio</th>
<th>PlatformIO</th>
<th>Qt Creator</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://github.com/littlevgl/pc_simulator_sdl_eclipse"><img src="https://littlevgl.com/logo/ide/eclipse.jpg"></a> </td>
<td><a href="https://github.com/littlevgl/pc_simulator_win_codeblocks"><img src="https://littlevgl.com/logo/ide/codeblocks.jpg"></a></td>
<td><a href="https://github.com/littlevgl/visual_studio_2017_sdl_x64"><img src="https://littlevgl.com/logo/ide/visualstudio.jpg"></a></td>
<td><a href="https://github.com/littlevgl/pc_simulator_sdl_platformio"><img src="https://littlevgl.com/logo/ide/platformio.jpg"></a></td>
<td><a href="https://blog.littlevgl.com/2019-01-03/qt-creator"><img src="https://littlevgl.com/logo/ide/qtcreator.jpg"> </a></td>
</tr>

<tr>
<td>Cross-platform<br>with SDL
</td><td>Native Windows </td>
<td>Cross-platform<br>with SDL </td>
<td>Cross-platform<br>with SDL </td>
<td>Cross-platform<br>with SDL </td>
</tr>
</tbody></table>
```


You can use any IDEs for the development but, for simplicity, the configuration for Eclipse CDT is focused in this tutorial.
The following section describes the set-up guide of Eclipse CDT in more details.

**Note: If you are on Windows, it's usually better to use the Visual Studio or CodeBlocks projects instead. They work out of the box without requiring extra steps.**

## Set-up Eclipse CDT

### Install Eclipse CDT

[Eclipse CDT](https://eclipse.org/cdt/) is a C/C++ IDE.

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

On Debian-based distros (e.g. Ubuntu): `sudo apt-get install default-jre`

Note: If you are using other distros, then please refer and install 'Java Runtime Environment' suitable to your distro.
Note: If you are using macOS and get a "Failed to create the Java Virtual Machine" error, uninstall any other Java JDK installs and install Java JDK 8u. This should fix the problem.

You can download Eclipse's CDT from: [https://www.eclipse.org/cdt/downloads.php](https://www.eclipse.org/cdt/downloads.php). Start the installer and choose *Eclipse CDT* from the list.

### Install SDL 2

The PC simulator uses the [SDL 2](https://www.libsdl.org/download-2.0.php) cross platform library to simulate a TFT display and a touch pad.

#### Linux
On **Linux** you can easily install SDL2 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)
3. Install SDL2 development 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 MinGW ([64 bit version](http://mingw-w64.org/doku.php/download)). After installing MinGW, do the following steps to add SDL2:

1. Download the development libraries of SDL.
Go to [https://www.libsdl.org/download-2.0.php](https://www.libsdl.org/download-2.0.php) and download _Development Libraries: SDL2-devel-2.0.5-mingw.tar.gz_
2. Decompress 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/.../x86_64-w64-mingw32/include_
4. Copy _..._mingw32/lib/_ content to _C:/MinGW/.../x86_64-w64-mingw32/lib_
5. Copy _..._mingw32/bin/SDL2.dll_ to _{eclipse_worksapce}/pc_simulator/Debug/_. Do it later when Eclipse is installed.

Note: If you are using **Microsoft Visual Studio** instead of Eclipse then you don't have to install MinGW.

#### OSX
On **OSX** you can easily install SDL2 with brew: `brew install sdl2`

If something is not working, then please refer [this tutorial](http://lazyfoo.net/tutorials/SDL/01_hello_SDL/index.php) to get started with SDL.

### Pre-configured project

A pre-configured graphics library project (based on the latest release) is always available to get started easily.
You can find the latest one on [GitHub](https://github.com/littlevgl/proj_pc) or on the [Download](https://littlevgl.com/download) page.
(Please note that, 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 the path, check that path and copy (and unzip) the downloaded pre-configured project there. After that, you can accept the workspace path. Of course you can modify this path but, in that case copy the project to the corresponding location.

Close the start up window and go to **File-&gt;Import** and choose **General-&gt;Existing project into Workspace**. **Browse the root directory** of the project and click **Finish**

On **Windows** you have to do two additional things:

- Copy the **SDL2.dll** into the project's Debug folder
- Right click on the project -&gt; Project properties -&gt; C/C++ Build -&gt; Settings -&gt; Libraries -&gt; Add ... and add _mingw32_ above SDLmain and SDL. (The order is important: mingw32, SDLmain, SDL)

### Compile and Run

Now you are ready to run the LittlevGL Graphics Library on your PC. Click on the Hammer Icon on the top menu bar to Build the project. If you have done everything right, then you will not get any errors. Note that on some systems additional steps might be required to "see" SDL 2 from Eclipse but, in most of cases the configurations in the downloaded project is enough.

After a success build, click on the Play button on the top menu bar to run the project. Now a window should appear in the middle of your screen.

Now everything is ready to use the LittlevGL Graphics Library in the practice or begin the development on your PC.
Loading

0 comments on commit 6da37aa

Please sign in to comment.