|
1 | | -TODO |
2 | | -==== |
| 1 | +# LVGL binding for Micropython |
| 2 | +______________________________ |
| 3 | + |
| 4 | + |
| 5 | +I have tried to make this as simple as possible for paople to use. |
| 6 | +There are some glitches still in it I am sure. If you come across an issue |
| 7 | +please let me know. |
| 8 | + |
| 9 | +I am still in development mode for the unix port. I am writing an SDL driver |
| 10 | +that conforms To the rest of the driver framework. I have started working on |
| 11 | +writing the frameworks for the different indev (input) types that LVGL supports. |
| 12 | +The frameworks are written to make it easier to write display and input drivers |
| 13 | +for the binding. |
| 14 | + |
| 15 | +<br> |
| 16 | + |
| 17 | +## *Build Instructions* |
| 18 | +_______________________ |
| 19 | + |
| 20 | +I have changed the design of the binding so it is no longer a dependancy of |
| 21 | +MicroPython. Instead MicroPython is now a dependency of the binding. By doing |
| 22 | +this I have simplified the process up updating the MicroPython version. Only |
| 23 | +small changes are now needed to support newer versions of MicroPython. |
| 24 | + |
| 25 | +In order to make this all work I have written a Python script that handles |
| 26 | +Building the binding. The only prerequesits are that you have a C compiler |
| 27 | +installed (gcc, clang, msvc) and the necessary support libs. |
| 28 | + |
| 29 | +<br> |
| 30 | + |
| 31 | +### *Requirements* |
| 32 | +_________________ |
| 33 | +Linux |
| 34 | + |
| 35 | + * build-essential |
| 36 | + * libffi-dev |
| 37 | + * pkg-config |
| 38 | + |
| 39 | + |
| 40 | +Compiling for STM32 unider Linux |
| 41 | + |
| 42 | + * gcc-arm-none-eabi |
| 43 | + * libnewlib-arm-none-eabi |
| 44 | + |
| 45 | + |
| 46 | +OSX |
| 47 | + |
| 48 | + * brew install llvm |
| 49 | + |
| 50 | + |
| 51 | +Windows |
| 52 | + |
| 53 | + * not supported yet |
| 54 | + |
| 55 | +<br> |
| 56 | + |
| 57 | +### *Build Target* |
| 58 | +__________________ |
| 59 | + |
| 60 | +You are also going to need Python >= 3.10 installed for all builds |
| 61 | + |
| 62 | +There is a single entry point for all builds. That is the make.py script in the |
| 63 | +root of the repository. |
| 64 | + |
| 65 | +The first argument is positional and it must be one of the following. |
| 66 | + |
| 67 | + * esp32 |
| 68 | + * windows |
| 69 | + * stm32 |
| 70 | + * unix |
| 71 | + * rp2 |
| 72 | + * renesas-ra |
| 73 | + * nrf |
| 74 | + * mimxrt |
| 75 | + * samd |
| 76 | + |
| 77 | + |
| 78 | +<br> |
| 79 | + |
| 80 | +### *Build Options* |
| 81 | +________________________ |
| 82 | + |
| 83 | +The next few arguments are optional to some degree. |
| 84 | + |
| 85 | + * submodules\*\*: collects all needed dependencies to perform the build |
| 86 | + * clean: cleans the build environment |
| 87 | + * mpy_cross\*\*: compiles mpy-cross |
| 88 | + this is not used for all builds. if it is not supported it will do nothing. |
| 89 | + |
| 90 | + |
| 91 | +**must be run only one time when the build is intially started. after that you will not need |
| 92 | +to add these arguments. There is internal checking that is done to see if the argument needs to |
| 93 | +be carried out. So you can also optionally leave it there if you want. |
| 94 | + |
| 95 | +<br> |
| 96 | + |
| 97 | +### *Identifying the MCU board* |
| 98 | +_______________________________ |
| 99 | + |
| 100 | +The next group of options are going to be port specific, some may have them and some may not. |
| 101 | + |
| 102 | + * BOARD: The MCU to build for. This follows the same symantics as what MIcroPython uses. |
| 103 | + * BOARD_VARIANT: if there is a variation of the board that it to be compiled for. |
| 104 | + |
| 105 | + |
| 106 | +I will go into specifics for what what boards and variants are available for a specific port a |
| 107 | +little bit further down. |
| 108 | + |
| 109 | +<br> |
| 110 | + |
| 111 | +### *Additional Arguments* |
| 112 | +____________________ |
| 113 | + |
| 114 | + * LV_CFLAGS: additional compiler flags that get passed to the LVGL build only. |
| 115 | + * FROZEN_MANIFEST: path to a custom frozen manifest file |
| 116 | + * DISPLAY: this can either be the file name (less the .py) of a display |
| 117 | + driver that is in the driver/display folder or it can be the absolute |
| 118 | + path to your own custom driver (with the .py extension) |
| 119 | + * INDEV: this can either be the file name (less the .py) of an indev |
| 120 | + driver that is in the driver/indev folder or it can be the absolute |
| 121 | + path to your own custom driver (with the .py extension) |
| 122 | + |
| 123 | + |
| 124 | +<br> |
| 125 | + |
| 126 | +### *ESP32 specific options* |
| 127 | +____________________________ |
| 128 | + * --skip-partition-resize: do not resize the firmware partition |
| 129 | + * --partition-size: set a custom firmware partition size |
| 130 | + |
| 131 | + |
| 132 | +<br> |
| 133 | + |
| 134 | +## *Boards & Board Variants* |
| 135 | +___________ |
| 136 | + |
| 137 | + * esp32: BOARD= |
| 138 | + * ARDUINO_NANO_ESP32 |
| 139 | + * ESP32_GENERIC |
| 140 | + * BOARD_VARIANT=D2WD |
| 141 | + * BOARD_VARIANT=OTA |
| 142 | + * ESP32_GENERIC_C3 |
| 143 | + * ESP32_GENERIC_S2 |
| 144 | + * ESP32_GENERIC_S3 |
| 145 | + * BOARD_VARIANT=SPIRAM_OCT |
| 146 | + * LILYGO_TTGO_LORA32 |
| 147 | + * LOLIN_C3_MINI |
| 148 | + * LOLIN_S2_MINI |
| 149 | + * LOLIN_S2_PICO |
| 150 | + * M5STACK_ATOM |
| 151 | + * OLIMEX_ESP32_POE |
| 152 | + * SIL_WESP32 |
| 153 | + * UM_FEATHERS2 |
| 154 | + * UM_FEATHERS2NEO |
| 155 | + * UM_FEATHERS3 |
| 156 | + * UM_NANOS3 |
| 157 | + * UM_PROS3 |
| 158 | + * UM_TINYPICO |
| 159 | + * UM_TINYS2 |
| 160 | + * UM_TINYS3 |
| 161 | + * UM_TINYWATCHS3 |
| 162 | + |
| 163 | + * windows: VARIANT= |
| 164 | + * dev |
| 165 | + * stndard |
| 166 | + |
| 167 | + * stm32: BOARD= |
| 168 | + * ADAFRUIT_F405_EXPRESS |
| 169 | + * ARDUINO_GIGA |
| 170 | + * ARDUINO_NICLA_VISION |
| 171 | + * ARDUINO_PORTENTA_H7 |
| 172 | + * B_L072Z_LRWAN1 |
| 173 | + * B_L475E_IOT01A |
| 174 | + * CERB40 |
| 175 | + * ESPRUINO_PICO |
| 176 | + * GARATRONIC_NADHAT_F405 |
| 177 | + * GARATRONIC_PYBSTICK26_F411 |
| 178 | + * HYDRABUS |
| 179 | + * LEGO_HUB_NO6 |
| 180 | + * LEGO_HUB_NO7 |
| 181 | + * LIMIFROG |
| 182 | + * MIKROE_CLICKER2_STM32 |
| 183 | + * MIKROE_QUAIL |
| 184 | + * NETDUINO_PLUS_2 |
| 185 | + * NUCLEO_F091RC |
| 186 | + * NUCLEO_F401RE |
| 187 | + * NUCLEO_F411RE |
| 188 | + * NUCLEO_F412ZG |
| 189 | + * NUCLEO_F413ZH |
| 190 | + * NUCLEO_F429ZI |
| 191 | + * NUCLEO_F439ZI |
| 192 | + * NUCLEO_F446RE |
| 193 | + * NUCLEO_F722ZE |
| 194 | + * NUCLEO_F746ZG |
| 195 | + * NUCLEO_F756ZG |
| 196 | + * NUCLEO_F767ZI |
| 197 | + * NUCLEO_G0B1RE |
| 198 | + * NUCLEO_G474RE |
| 199 | + * NUCLEO_H563ZI |
| 200 | + * NUCLEO_H723ZG |
| 201 | + * NUCLEO_H743ZI |
| 202 | + * NUCLEO_H743ZI2 |
| 203 | + * NUCLEO_L073RZ |
| 204 | + * NUCLEO_L152RE |
| 205 | + * NUCLEO_L432KC |
| 206 | + * NUCLEO_L452RE |
| 207 | + * NUCLEO_L476RG |
| 208 | + * NUCLEO_L4A6ZG |
| 209 | + * NUCLEO_WB55 |
| 210 | + * NUCLEO_WL55 |
| 211 | + * OLIMEX_E407 |
| 212 | + * OLIMEX_H407 |
| 213 | + * PYBD_SF2 |
| 214 | + * PYBD_SF3 |
| 215 | + * PYBD_SF6 |
| 216 | + * PYBLITEV10 |
| 217 | + * PYBV10 |
| 218 | + * PYBV11 |
| 219 | + * PYBV3 |
| 220 | + * PYBV4 |
| 221 | + * SPARKFUN_MICROMOD_STM32 |
| 222 | + * STM32F411DISC |
| 223 | + * STM32F429DISC |
| 224 | + * STM32F439 |
| 225 | + * STM32F4DISC |
| 226 | + * STM32F769DISC |
| 227 | + * STM32F7DISC |
| 228 | + * STM32H573I_DK |
| 229 | + * STM32H7B3I_DK |
| 230 | + * STM32L476DISC |
| 231 | + * STM32L496GDISC |
| 232 | + * USBDONGLE_WB55 |
| 233 | + * VCC_GND_F407VE |
| 234 | + * VCC_GND_F407ZG |
| 235 | + * VCC_GND_H743VI |
| 236 | + |
| 237 | + * unix: VARIANT= |
| 238 | + * coverage |
| 239 | + * minimal |
| 240 | + * nanbox |
| 241 | + * standard |
| 242 | + |
| 243 | + * rp2: BOARD= |
| 244 | + * ADAFRUIT_FEATHER_RP2040 |
| 245 | + * ADAFRUIT_ITSYBITSY_RP2040 |
| 246 | + * ADAFRUIT_QTPY_RP2040 |
| 247 | + * ARDUINO_NANO_RP2040_CONNECT |
| 248 | + * GARATRONIC_PYBSTICK26_RP2040 |
| 249 | + * NULLBITS_BIT_C_PRO |
| 250 | + * PIMORONI_PICOLIPO_16MB |
| 251 | + * PIMORONI_PICOLIPO_4MB |
| 252 | + * PIMORONI_TINY2040 |
| 253 | + * POLOLU_3PI_2040_ROBOT |
| 254 | + * POLOLU_ZUMO_2040_ROBOT |
| 255 | + * RPI_PICO |
| 256 | + * RPI_PICO_W |
| 257 | + * SIL_RP2040_SHIM |
| 258 | + * SPARKFUN_PROMICRO |
| 259 | + * SPARKFUN_THINGPLUS |
| 260 | + * W5100S_EVB_PICO |
| 261 | + * W5500_EVB_PICO |
| 262 | + * WEACTSTUDIO |
| 263 | + * BOARD_VARIANT=FLASH_2M |
| 264 | + * BOARD_VARIANT=FLASH_4M |
| 265 | + * BOARD_VARIANT=FLASH_8M |
| 266 | + |
| 267 | + * renesas-ra: BOARD= |
| 268 | + * ARDUINO_PORTENTA_C33 |
| 269 | + * EK_RA4M1 |
| 270 | + * EK_RA4W1 |
| 271 | + * EK_RA6M1 |
| 272 | + * EK_RA6M2 |
| 273 | + * RA4M1_CLICKER |
| 274 | + * VK_RA6M5 |
| 275 | + |
| 276 | + * nrf: BOARD= |
| 277 | + * ACTINIUS_ICARUS |
| 278 | + * ARDUINO_NANO_33_BLE_SENSE |
| 279 | + * ARDUINO_PRIMO |
| 280 | + * BLUEIO_TAG_EVIM |
| 281 | + * DVK_BL652 |
| 282 | + * EVK_NINA_B1 |
| 283 | + * EVK_NINA_B3 |
| 284 | + * FEATHER52 |
| 285 | + * IBK_BLYST_NANO |
| 286 | + * IDK_BLYST_NANO |
| 287 | + * MICROBIT |
| 288 | + * NRF52840_MDK_USB_DONGLE |
| 289 | + * PARTICLE_XENON |
| 290 | + * PCA10000 |
| 291 | + * PCA10001 |
| 292 | + * PCA10028 |
| 293 | + * PCA10031 |
| 294 | + * PCA10040 |
| 295 | + * PCA10056 |
| 296 | + * PCA10059 |
| 297 | + * PCA10090 |
| 298 | + * SEEED_XIAO_NRF52 |
| 299 | + * WT51822_S4AT |
| 300 | + |
| 301 | + * mimxrt: BOARD= |
| 302 | + * ADAFRUIT_METRO_M7 |
| 303 | + * MIMXRT1010_EVK |
| 304 | + * MIMXRT1015_EVK |
| 305 | + * MIMXRT1020_EVK |
| 306 | + * MIMXRT1050_EVK |
| 307 | + * MIMXRT1060_EVK |
| 308 | + * MIMXRT1064_EVK |
| 309 | + * MIMXRT1170_EVK |
| 310 | + * OLIMEX_RT1010 |
| 311 | + * SEEED_ARCH_MIX |
| 312 | + * TEENSY40 |
| 313 | + * TEENSY41 |
| 314 | + |
| 315 | + * samd: BOARD= |
| 316 | + * ADAFRUIT_FEATHER_M0_EXPRESS |
| 317 | + * ADAFRUIT_FEATHER_M4_EXPRESS |
| 318 | + * ADAFRUIT_ITSYBITSY_M0_EXPRESS |
| 319 | + * ADAFRUIT_ITSYBITSY_M4_EXPRESS |
| 320 | + * ADAFRUIT_METRO_M4_EXPRESS |
| 321 | + * ADAFRUIT_TRINKET_M0 |
| 322 | + * MINISAM_M4 |
| 323 | + * SAMD21_XPLAINED_PRO |
| 324 | + * SEEED_WIO_TERMINAL |
| 325 | + * SEEED_XIAO_SAMD21 |
| 326 | + * SPARKFUN_SAMD51_THING_PLUS |
| 327 | + |
| 328 | + |
| 329 | +<br> |
| 330 | + |
| 331 | +## *Build Command Examples* |
| 332 | +___________________________ |
| 333 | + |
| 334 | +build with submodules and mpy_cross |
| 335 | + |
| 336 | + python3 make.py esp32 submodules clean mpy_cross BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7796 INDEV=gt911 |
| 337 | + |
| 338 | +build without submodules or mpy_cross |
| 339 | + |
| 340 | + python3 make.py esp32 clean BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7796 INDEV=gt911 |
| 341 | + |
| 342 | + |
| 343 | +I always recommend building with the clean command, this will ensure you get a good fresh build. |
| 344 | + |
| 345 | +NOTE: |
| 346 | +There is a bug in the ESP32 build. The first time around it will fail saying that |
| 347 | +one of the sumbodules is not available. Run the build again with the submodules |
| 348 | +argument in there and then it will build fine. For the life of me I cam not able to locate |
| 349 | +where the issue is stemming from. I will find it eventually. |
| 350 | + |
| 351 | +<br> |
| 352 | + |
| 353 | +I will provide directions on how to use the driver framework and also the drivers that are included |
| 354 | +with the binding in the coming weeks. |
| 355 | + |
| 356 | +<br> |
| 357 | + |
| 358 | +Thank again and enjoy!! |
0 commit comments