Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up with main repo #9

Merged
merged 40 commits into from
May 20, 2019
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d44a3a9
Merge pull request #1 from intel/master
Weining2019 May 8, 2019
c010d20
Merge pull request #2 from intel/master
Weining2019 May 9, 2019
1f398d3
convert tab to 4 spaces in header files
Weining2019 May 9, 2019
89a13e8
Merge pull request #3 from intel/master
Weining2019 May 9, 2019
5a0089e
test
Weining2019 May 16, 2019
9e3edf7
test
Weining2019 May 16, 2019
57dabc2
test
Weining2019 May 16, 2019
3315c8c
Revert "test"
Weining2019 May 16, 2019
1baddc3
Revert "test"
Weining2019 May 16, 2019
e655f51
Revert "test"
Weining2019 May 16, 2019
b4774a3
aaa
Weining2019 May 16, 2019
c9e7708
Revert "aaa"
Weining2019 May 16, 2019
0d31325
a
Weining2019 May 16, 2019
82786e5
Revert "a"
Weining2019 May 16, 2019
af37fef
aaas
Weining2019 May 16, 2019
94d9a1d
a1
Weining2019 May 16, 2019
0428ff5
a2
Weining2019 May 16, 2019
f45466a
a3
Weining2019 May 16, 2019
d386d44
a4
Weining2019 May 16, 2019
f9929dd
a5
Weining2019 May 16, 2019
e993b07
a6
Weining2019 May 16, 2019
da9064f
Revert "a6"
Weining2019 May 16, 2019
8b9e0b7
Revert "a5"
Weining2019 May 16, 2019
4a6c536
Revert "a4"
Weining2019 May 16, 2019
793661d
Revert "a3"
Weining2019 May 16, 2019
8901c5b
Revert "a2"
Weining2019 May 16, 2019
444dc48
Revert "a1"
Weining2019 May 16, 2019
d033503
Revert "aaas"
Weining2019 May 16, 2019
3238c4f
add simple
Weining2019 May 16, 2019
2da1d4d
Revert "add simple"
Weining2019 May 16, 2019
8cc885f
Merge pull request #4 from intel/master
Weining2019 May 17, 2019
e450e60
Merge pull request #5 from intel/master
Weining2019 May 17, 2019
8deb148
Merge pull request #6 from intel/master
Weining2019 May 17, 2019
eead4f6
Merge pull request #7 from intel/master
Weining2019 May 17, 2019
9da47ed
Update README.md
xwang98 May 18, 2019
b2f9063
Merge pull request #8 from intel/master
Weining2019 May 20, 2019
f64b753
Update README
Weining2019 May 20, 2019
5ab2a7b
Update README.md
wenyongh May 20, 2019
ff49e67
Merge pull request #30 from Weining2019/master
wenyongh May 20, 2019
a66f18e
update README of littlevgl sample (#31)
litian-int May 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "test"
This reverts commit 57dabc2.
  • Loading branch information
Weining2019 committed May 16, 2019
commit 3315c8c8ee6e4b070021f454968cdb60cc007bd8
127 changes: 6 additions & 121 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,124 +1,9 @@
#1.Overview
Littlevgl is an Open-source Embedded GUI Library. We definde an UI APP, and it can be running in 3 scenarios.
1. Native Linux. The App code built into Linux executables.
2. WASM VM for Different platform. WASM VM and native extension being built into Linux and Zephyr platforms. With WASM VM inside, many WASM APP can run on top of it.
3. WASM APP. This kind of binary can be run on WASM VM.
##Folder structure
├── build.sh **build script, will create build and out folder.**
├── LICENCE.txt
├── UI.JPG **UI appearence.**
├── user_guide.md **User Guide.**
### 1. vgl-native-ui-app
Littlevgl graphics app has being built into Linux application named "vgl_native_ui_app", which can directly run on Linux.
├── vgl-native-ui-app
│   ├── CMakeLists.txt
│   ├── lv_drivers **Display and input device driver sources.**
│   └── main.c **UI app logic.**
### 2. vgl-wasm-runtime
Wasm micro-runtime and littlevgl native interface built into Linux application named "littlevgl", where wasm apps can run on it.
├── vgl-wasm-runtime
│   ├── CMakeLists.txt
│   ├── src **Cantains WASM VM initialization adn native extension sources.**
│   │   ├── display_indev.h **App called methods which are implemented in WASM native.**
│   │   ├── ext-lib-export.c **WASM exported function**
│   │   ├── platform **Native method Implementation on different platform.**
│   │   │   ├── linux **Linux implementation**
│   │   │   │   ├── display_indev.c
│   │   │   │   ├── iwasm_main.c
│   │   │   │   ├── main.c
│   │   │   │   └── mouse.c
│   │   │   └── zephyr **Zephyr implementation**
│   │   │   ├── display.h
│   │   │   ├── display_ili9340_adafruit_1480.c
│   │   │   ├── display_ili9340.c
│   │   │   ├── display_ili9340.h
│   │   │   ├── display_indev.c
│   │   │   ├── LICENSE
│   │   │   ├── XPT2046.c
│   │   │   └── XPT2046.h
│   │   └── test_wasm.h
│   └── zephyr-build **Zephyr project files**
│   ├── CMakeLists.txt
│   └── prj.conf
#User Guide

###3. wasm-apps
A wasm app with littlevgl graphics.
└── wasm-apps
├── build_wasm_app.sh **Git clone lvgl and build app.**
├── Makefile_wasm_app **Makefile**
└── src **source code of UI app.**
##Introduction

#2.Install required SDK and libraries.
##1. 32 bit SDL(simple directmedia layer)
###a. Use apt-get
sudo apt-get install libsdl2-dev:i386
###b. Install from source
www.libsdl.org
`./configure C_FLAGS=-m32 CXX_FLAGS=-m32 LD_FLAGS=-m32`
` ./make`
`./sudo make install`
##2. Install EMSDK
https://emscripten.org/docs/tools_reference/emsdk.html
##3. Cmake
CMAKE version above 3.13.1.
#3.Build & Run
##1. Build and run on Linux
###a. Build
`./build.sh`
All binaries are in "out", which contains "host_tool", "vgl_native_ui_app", "TestApplet1.wasm" and "vgl_wasm_runtime".
###b.Run native Linux application
`./vgl_native_ui_app`
###c.Run WASM VM Linux applicaton & install WASM APP
####1. Start vgl_wasm_runtime in server mode
`./vgl_wasm_runtime -s`
####2. Install wasm APP
`./host_tool -i TestApplet1 -f TestApplet1.wasm`
##2. Build and run on zephyr
WASM VM and native extension method can be built into zephyr, Then we can install wasm app into STM32.
###1.Build wasm into Zephyr system
####a. clone zephyr source code
`git clone https://github.com/zephyrproject-rtos/zephyr.git`
####b. copy samples
`cd zephyr/samples/`
`cp -a <iwasm_root_dir>projects/littlevgl/vgl-wasm-runtime vgl-wasm-runtime`
`cd vgl-wasm-runtime/zephyr_build`
####c. create a link to wamr core
` ln -s <iwasm_root_dir>/core core`
####d. build source code
We use nucleo_f767zi, which is almost the same as nucleo_f746zg, except SRAM size in DTS.
Duplicate zephyr board support of nucleo_f746zg, then change SRAM size to 512KB.
`mkdir build && cd build`
`source ../../../../zephyr-env.sh`
`cmake -GNinja -DBOARD=nucleo_f767ZI ..`
` ninja flash`

###2. Test on STM32 NUCLEO_F767ZI with ILI9341 Display with XPT2046 touch.
####a. Hardware Connetions
+-------------------+-+------------------+
|NUCLEO-F767ZI || ILI9341 Display |
+-------------------+-+------------------+
| CN7.10 | CLK |
+-------------------+-+------------------+
| CN7.12 | MISO |
+-------------------+-+------------------+
| CN7.14 | MOSI |
+-------------------+-+------------------+
| CN11.1 | CS1 for ILI9341 |
+-------------------+-+------------------+
| CN11.2 | D/C |
+-------------------+-+------------------+
| CN11.3 | RESET |
+-------------------+-+------------------+
| CN9.25 | PEN interrupt |
+-------------------+-+------------------+
| CN9.27 | CS2 for XPT2046|
+-------------------+-+------------------+
| CN10.14 | PC UART RX |
+-------------------+-+------------------+
| CN11.16 | PC UART RX |
+-------------------+-+------------------+

####b. Install wasm app to zephyr using host_tool
First connect PC and STM32 with UART. Then install use host_tool.
`./host_tool -D /dev/ttyUSB0 -i TestApplet1 -f TestApplet1.wasm`
This project aims to demonstrate wasm app management and programming model of WAMR.

##Build all binaries
Execute the build.sh script then all binaries including wasm application files would be generated in 'out' directory.
`./build.sh`