-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,382 changed files
with
1,377,052 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.28) | ||
project(lvgl_port_gl C) | ||
|
||
set(CMAKE_C_STANDARD 99) | ||
|
||
add_subdirectory(lvgl) | ||
|
||
add_executable(lvgl_port_gl | ||
porting/lv_port_disp.c | ||
porting/lv_port_fs.c | ||
porting/lv_port_indev.c | ||
main.c | ||
/workspace/share/main.S) | ||
|
||
set_source_files_properties(foo.cpp PROPERTIES COMPILE_FLAGS "-T /workspace/share/t1.ld") | ||
|
||
#find_package(glfw3 3.4.0 EXACT REQUIRED PATHS /opt/homebrew/Cellar/glfw/3.4/lib/cmake/glfw3) | ||
#find_package(OpenGL REQUIRED) | ||
|
||
target_link_libraries(lvgl_port_gl PRIVATE lvgl) | ||
#target_link_libraries(lvgl_port_gl PRIVATE glfw3) | ||
#target_link_libraries(lvgl_port_gl PRIVATE OpenGL::GL) | ||
|
||
#target_include_directories(lvgl_port_gl PRIVATE /opt/homebrew/Cellar/glfw/3.4/include) | ||
#target_link_libraries(lvgl_port_gl PRIVATE /opt/homebrew/Cellar/glfw/3.4/lib/libglfw.dylib) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# disp.lvgl | ||
|
||
This is an example of running lvgl on T1. | ||
|
||
## Build & Run instructions | ||
|
||
``` | ||
# Create a directory for compiling | ||
cd /workspace/examples/disp.lvgl # Should be the directory where this README lives | ||
mkdir build && cd build | ||
# Generate build files using cmake | ||
cmake .. \ | ||
-DLV_CONF_BUILD_DISABLE_DEMOS=TRUE \ | ||
-DLV_CONF_BUILD_DISABLE_EXAMPLES=TRUE \ | ||
-DLV_CONF_BUILD_DISABLE_THORVG_INTERNAL=TRUE \ | ||
-DT1_PLATFORM=TRUE \ | ||
-DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake | ||
# Build using make | ||
make -j$(nproc) | ||
# Since T1's elf need a special entry point, manually link a new elf here. | ||
# (This should be done in cmake, though I haven't invest in time to figure it out) | ||
t1-cc -T /workspace/share/t1.ld /workspace/share/main.S \ | ||
../main.c \ | ||
-DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE \ | ||
-isystem /workspace/examples/disp.lvgl/lvgl \ | ||
-isystem /workspace/examples/disp.lvgl/build/lvgl \ | ||
CMakeFiles/lvgl_port_gl.dir/porting/lv_port_disp.c.obj \ | ||
CMakeFiles/lvgl_port_gl.dir/porting/lv_port_fs.c.obj \ | ||
CMakeFiles/lvgl_port_gl.dir/porting/lv_port_indev.c.obj \ | ||
lvgl/lib/liblvgl.a \ | ||
-o lvgl.elf | ||
# Run the elf binary through emulator | ||
t1rocketemu-verilated-simulator +t1_elf_file=lvgl.elf | ||
``` |
Oops, something went wrong.