Skip to content

Commit 8dc956c

Browse files
authored
Merge pull request #194 from lvgl/add_platformio_instructions
Update README with instructions for platformio
2 parents 1df1f30 + 9d6974e commit 8dc956c

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,44 @@ There are several development boards based on the ESP32 chip, make sure you assi
243243

244244
For development kits that come with a display already attached, all the correct settings are already known and can be selected in `menuconfig` from the first option "Select predefined display configuration." Once selected all the other options will be defaulted and won't appear in the menu.
245245

246+
## Platformio support
247+
248+
Using the [lv_platformio](https://github.com/lvgl/lv_platformio) project add the following lines to `platformio.ini` file:
249+
250+
```
251+
[env:esp32]
252+
platform = espressif32
253+
framework = espidf
254+
board = esp-wrover-kit
255+
```
256+
257+
Change the default environment to `default_envs = esp32`.
258+
259+
Modify the `main.c` like this:
260+
261+
```c
262+
#include "lvgl.h"
263+
264+
// #include "driver.h"
265+
266+
#include "demo.h"
267+
268+
int app_main(void)
269+
{
270+
lv_init();
271+
272+
/* Initialize your hardware. */
273+
274+
/* hw_init(); */
275+
276+
demo_create();
277+
278+
/* Create the UI or start a task for it.
279+
* In the end, don't forget to call `lv_task_handler` in a loop. */
280+
281+
/* hw_loop(); */
282+
283+
return 0;
284+
```
285+
286+
For more information see: [platformio with espidf framework compability](https://github.com/lvgl/lv_port_esp32/issues/168).

0 commit comments

Comments
 (0)