-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(example): add support for PlatformIO (#42)
Closes #37
- Loading branch information
Showing
14 changed files
with
1,603 additions
and
23 deletions.
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
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
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
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,5 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch |
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,41 @@ | ||
# PlatformIO Example | ||
|
||
The example is used to guide how to use this library in PlatformIO. It also demonstrates how to port LVGL (v8.3.x). And for RGB LCD, it can enable the avoid tearing fucntion. | ||
|
||
It is by default suitable for **ESP32-S3-LCD-EV-Board** and **ESP32-S3-LCD-EV-Board-2** boards. Users should modify the [boards/ESP-LCD.json](boards/ESP-LCD.json) file as needed. | ||
|
||
## How to Use | ||
|
||
Follow the steps below to configure: | ||
|
||
1. For **ESP32_Display_Panel**: | ||
|
||
- Follow the [steps](../../README.md#configuring-drivers) to configure drivers if needed. | ||
- If using a supported development board, follow the [steps](../../README.md#using-supported-development-boards) to configure it. | ||
- If using a custom board, follow the [steps](../../README.md#using-custom-development-boards) to configure it. | ||
|
||
2. For **lvgl**: | ||
|
||
- Follow the [steps](../../README.md#configuring-lvgl) to add *lv_conf.h* file and change the configurations. | ||
- Modify the macros in the [lvgl_port_v8.h](./lvgl_port_v8.h) file to configure the LVGL porting parameters. | ||
|
||
3. Navigate to the `Tools` menu in the Arduino IDE to choose a ESP board and configure its parameters. For supported boards, please refter to [Configuring Supported Development Boards](../../README.md#configuring-supported-development-boards) | ||
4. Verify and upload the example to your ESP board. | ||
|
||
## Serial Output | ||
|
||
```bash | ||
... | ||
LVGL porting example start | ||
Initialize panel device | ||
Initialize LVGL | ||
Create UI | ||
LVGL porting example end | ||
IDLE loop | ||
IDLE loop | ||
... | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
Please check the [FAQ](../../README.md#faq) first to see if the same question exists. If not, please create a [Github issue](https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues). We will get back to you as soon as possible. |
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,39 @@ | ||
{ | ||
"build": { | ||
"arduino": { | ||
"ldscript": "esp32s3_out.ld", | ||
"partitions": "default_16MB.csv", | ||
"memory_type": "qio_opi" | ||
}, | ||
"core": "esp32", | ||
"extra_flags": [ | ||
"-DBOARD_HAS_PSRAM", | ||
"-DARDUINO_USB_MODE=1", | ||
"-DARDUINO_RUNNING_CORE=1", | ||
"-DARDUINO_EVENT_RUNNING_CORE=1" | ||
], | ||
"f_cpu": "240000000L", | ||
"f_flash": "80000000L", | ||
"flash_mode": "qio", | ||
"hwids": [["0x303A", "0x1001"]], | ||
"mcu": "esp32s3", | ||
"variant": "esp32s3" | ||
}, | ||
"connectivity": ["wifi"], | ||
"debug": { | ||
"default_tool": "esp-builtin", | ||
"onboard_tools": ["esp-builtin"], | ||
"openocd_target": "esp32s3.cfg" | ||
}, | ||
"frameworks": ["arduino", "espidf"], | ||
"name": "ESP-LCD (16M QIO Flash & OPI PSRAM)", | ||
"upload": { | ||
"flash_size": "16MB", | ||
"maximum_ram_size": 327680, | ||
"maximum_size": 16777216, | ||
"require_upload_port": true, | ||
"speed": 921600 | ||
}, | ||
"url": "https://www.espressif.com", | ||
"vendor": "ESP-LCD" | ||
} |
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,22 @@ | ||
[env:ESP-LCD] | ||
platform = espressif32 | ||
board = ESP-LCD | ||
framework = arduino | ||
platform_packages = | ||
platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git | ||
platformio/framework-arduinoespressif32-libs@https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1 | ||
upload_speed = 921600 | ||
monitor_speed = 115200 | ||
build_flags = | ||
-DBOARD_HAS_PSRAM | ||
-DLV_CONF_INCLUDE_SIMPLE | ||
-DDISABLE_ALL_LIBRARY_WARNINGS | ||
-DARDUINO_USB_CDC_ON_BOOT=1 | ||
-DCORE_DEBUG_LEVEL=1 | ||
-DLV_LVGL_H_INCLUDE_SIMPLE | ||
-I src | ||
lib_deps = | ||
https://github.com/esp-arduino-libs/ESP32_Display_Panel.git | ||
https://github.com/esp-arduino-libs/ESP32_IO_Expander.git | ||
https://github.com/lvgl/lvgl.git#release/v8.3 | ||
|
Oops, something went wrong.