Skip to content

Commit 63e5548

Browse files
committed
Revert "Adds more features to the ESP32 build."
This reverts commit d3f44b1.
1 parent d3f44b1 commit 63e5548

File tree

7 files changed

+220
-750
lines changed

7 files changed

+220
-750
lines changed

README.md

Lines changed: 23 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
1-
2-
31
# LVGL binding for Micropython
42
______________________________
5-
<br>
6-
7-
### ***ATTENTION***
8-
_____________
9-
10-
**THIS IS NOT THE OFFICIAL LVGL BINDING FOR MICROPYTHON. WHILE IT IS LOOSLEY BASED
11-
ON THAT BINDING AND THERE IS CODE FROM THAT BINDING PRESENT THIS LIBRARY IS DIFFERENT!!**
12-
13-
**THIS LIBRARY IS IN ALPHA TESTING, IT IS NOT GOING TO BE STABLE AND
14-
IT WILL HAVE BUGS IN IT. I APPRECIATE HELP WITH BUG TESTING AND FIXING ISSUES.
15-
PR's ARE ALWAYS WELCOME.**
16-
17-
**IF YOU ARE WANTING TO HELP WITH BUG TESTING IT IS MORE EFFICIENT IF THE CODE I
18-
SUPPLY TO RUN WHEN TETSING IS USED UNALTERED. THE REASON FOR THIS IS A LOT OF
19-
THE TIME I AM TESTING FOR SPECIFIC OUTPUT AND IF THE CODE GETS CHANGED THAT
20-
OUTPUT ENDS UP GETTING CHANGED. I DO TEND TO BREAK THINGS A LOT AND YOU HAVE TO
21-
BE WILLING TO WORK WITH ME ON THIS. WHILE I AM NOT A GREENHORN TO PROGRAMMING
22-
C/CPP IS NOT A LANGUAGE I AM PROFICIENT IN.**
23-
24-
<br>
25-
26-
***NOTE***: **UPDATED ESP BUILD, PLEASE READ TO GET NEW INFORMATION**
273

284

295
I have tried to make this as simple as possible for paople to use.
@@ -54,9 +30,7 @@ installed (gcc, clang, msvc) and the necessary support libs.
5430

5531
### *Requirements*
5632
_________________
57-
5833
compiling for ESP32
59-
6034
* Ubuntu (Linux): you can install all of these using `apt-get install`
6135
* build-essential
6236
* cmake
@@ -72,7 +46,6 @@ compiling for ESP32
7246

7347

7448
Compiling for RP2
75-
7649
* Ubuntu (Linux): you can install all of these using `apt-get install`
7750
* build-essential
7851
* cmake
@@ -94,7 +67,6 @@ Compiling for RP2
9467

9568

9669
Compiling for STM32:
97-
9870
* Ubuntu (Linux): you can install all of these using `apt-get install`
9971
* gcc-arm-none-eabi
10072
* libnewlib-arm-none-eabi
@@ -149,15 +121,13 @@ Compiling for Ubuntu (Linux): you can install all of these using `apt-get instal
149121

150122

151123
Compiling for macOS
152-
153124
* `command xcode-select–install`
154125
* `brew install libffi`
155126
* `brew install ninja`
156127
* `brew install make`
157128

158129

159130
Compiling for Windows
160-
161131
* not supported yet
162132

163133
<br>
@@ -234,55 +204,22 @@ ____________________
234204

235205
### *ESP32 specific options*
236206
____________________________
207+
* --skip-partition-resize: do not resize the firmware partition
208+
* --partition-size: set a custom firmware partition size
209+
* --octal-flash ¹: This is only available for the 16mb flash and the 32mb flash
210+
* --flash-size ² ³: This is how much flash storage is available.
211+
212+
Allowed Values are:
237213

238-
I have recently reworked the build system to allow for easier modifications to
239-
to the partitions on the ESP32. Previously I had only given the ability to adjust
240-
only the application partition size. With the most recent round of changes
241-
The user is now able to alter ANY of the partition sizes. The command line switches
242-
will vary vased on what board is being used. For the most part a lot of the
243-
boards will use the same switches.
244-
245-
246-
All boards have the following switches.
247-
248-
* --nvs-size={size}: This is used with the ESP32's persistant memory.
249-
This is where config values get stored.
250-
* --ota: just add this switch if you want your board to have the ability to do OTA updates.
251-
This will consume more of the flash because there needs to be 2 application partitions
252-
that are large enough to hold the firmware
253-
* --skip-partition-resize: Supply this switch if you do not want the program to
254-
automatically resize the application partition. This is useful in a production
255-
environment and you want to use OTA updates for the firmware. You would set the
256-
application size to be more than what is needed so if a new firmware is released and it happens
257-
to be larger in size you will be able to fit it. If the partition is too small for the new firmware
258-
it becomes a real large headache because you will have to connect the ESP via USB to update the
259-
firmware.
260-
* --partition-size={size}: This is where you set the application partition size should you so choose to.
261-
The esp32 is going to automatically adjust the size to match the firmware so in most cases you will not
262-
need to use this unless you are using OTA and decide to set the partition size to be larger.
263-
264-
board specific:
265-
266-
* ESP32_GENERIC*:
267-
* --octal-flash: Only available with 16mb and 32mb flash on the S3, you still
268-
need to supply `SPIRAM_OCT` as the board variant
269-
* --flash-size: This is how much flash storage is available.
270-
Allowed Values are 2, 4, 8, 16 and 32. The default value varries based on the
271-
board being used
272-
* ARDUINO_NANO_ESP32:
273-
* always has ota enabled
274-
* --ffat-size={size}: adjusts the size of the ffat partition
275-
* --factory-size={size}: adjusts the sie of the factory partition
276-
* SIL_WESP32:
277-
* always has ota enabled.
278-
279-
280-
All boards except when OTA is enabled:
281-
* --phyinit-size={size}: adjusts the size of the phy_init partition
282-
283-
All partition sizes should be an even multiple of 4096, if it is not the size
284-
will be rounded up to the closest 4096.
214+
* ESP32-S3: 4, 8, 16 and 32 (default is 8)
215+
* ESP32-S2: 2 and 4 (default is 4)
216+
* ESP32: 4, 8 and 16 (default is 4)
217+
, The default is 8.
218+
285219

220+
¹ Available for the ESP32-S3 when `BOARD_VARIANT` is set to `SPIRAM_OCT`<br>
221+
² Available for the ESP32, ESP32-S2 and ESP32-S3<br>
222+
³ Available only when `BOARD_VARIANT` is set to `SPIRAM` or `SPIRAM_OCT`<br>
286223

287224
<br>
288225

@@ -497,6 +434,12 @@ build without submodules or mpy_cross
497434

498435
I always recommend building with the clean command, this will ensure you get a good fresh build.
499436

437+
NOTE:
438+
There is a bug in the ESP32 build. The first time around it will fail saying that
439+
one of the sumbodules is not available. Run the build again with the submodules
440+
argument in there and then it will build fine. For the life of me I cam not able to locate
441+
where the issue is stemming from. I will find it eventually.
442+
500443
<br>
501444

502445
I will provide directions on how to use the driver framework and also the drivers that are included
@@ -517,9 +460,9 @@ Couple of notes:
517460

518461
* I recommend making 2 frame buffers as seen in the code example below. This will give you
519462
better performance.
520-
* ***DO NOT*** enable LV_USE_DRAW_SDL, I have not written code to allow for it's use (yet).
463+
* **DO NOT** enable LV_USE_DRAW_SDL, I have not written code to allow for it's use (yet).
521464
* I recommend running `lv.task_handler` once every 5 milliseconds, shorter than that and you
522-
will have a lot of CPU time comsumed. Longer than that and your mouse response is not
465+
will have a lot of CPU time comsumed. Linger than that and your mouse response is not
523466
going to be great.
524467

525468

@@ -657,7 +600,6 @@ and also the calibration storage.
657600
import ft6x36 # NOQA
658601
import time # NOQA
659602

660-
display.set_power(True)
661603
display.init()
662604

663605
i2c_bus = i2c.I2CBus(scl=_SCL, sda=_SDA, freq=_TP_FREQ, use_locks=False)
@@ -694,28 +636,4 @@ regardless of what `indev.is_calibrate` returns. This makes it possible to redo
694636
the calibration by either using a pin that you can check the state of or through
695637
a button in your UI that you provide to the user.
696638

697-
698-
For the ESP32 I have written an NVS connection. One existed in the `esp32` module
699-
but it was limited in it's scope. It was only able to set `int32_t`'s byte arrays
700-
and strings. The module I wrote (`nvs`) include the following data types.
701-
702-
* `int8_t`
703-
* `uint8_t`
704-
* `int16_t`
705-
* `uint16_t`
706-
* `int32_t`
707-
* `uint32_t`
708-
* `int64_t`
709-
* `uint64_t`
710-
* `string`
711-
* `arrays`
712-
* `float`
713-
714-
It also allows for enumerating all of the keys and datatypes that are currently stored.
715-
There are 2 functions for dealing with the data that is stored. One is `get` and the
716-
other is `set`. YOu need to specify what kind of data you are dealing with. This is done
717-
using one of the `nvs.TYPE_*` constants. There is a stub file available in the
718-
`esp32_stubs` folder.
719-
720-
721-
Have fun!!
639+
Thank again and enjoy!!

0 commit comments

Comments
 (0)