platformio.ini 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. ; MIT License - Copyright (c) 2019-2021 Francis Van Roie
  2. ; For full license information read the LICENSE file in the project folder
  3. ;
  4. ; PlatformIO Project Configuration File
  5. ;
  6. ; Please visit documentation for the other options and examples
  7. ; http://docs.platformio.org/page/projectconf.html
  8. ;**************************************************************
  9. ; Common project settings
  10. ;**************************************************************
  11. [platformio]
  12. extra_configs =
  13. user_setups/lcd_config.ini
  14. ; -- Put active [env] files in this dir to be included in the build menu
  15. user_setups/active/*.ini
  16. ; -- Add customizations to this file only:
  17. platformio_override.ini
  18. default_envs =
  19. ; Uncomment the needed environments in platformio_override.ini
  20. ; You can also create new environments in in platformio_override.ini
  21. ${override.extra_default_envs}
  22. [override]
  23. ; -- By default there are no ${override.build_flags} set
  24. ; -- to use it, copy the platformio_override.ini file from the template
  25. build_flags =
  26. extra_default_envs =
  27. ;***************************************************
  28. ; Common environment settings
  29. ;***************************************************
  30. [env]
  31. upload_speed = 921600
  32. monitor_speed = 74880
  33. build_flags =
  34. -D PIOENV=\"${PIOENV}\"
  35. -Os ; Code Size Optimization
  36. ;-Og ; Code Debug Optimization
  37. ;-w ; Suppress warnings
  38. -D CORE_DEBUG_LEVEL=0 ; 0=Silent, 1=Errors, 2=Warnings
  39. -I include ; include lv_conf.h from this folder
  40. ; -- littlevgl build options ------------------------------
  41. -D LV_CONF_INCLUDE_SIMPLE ; for lvgl
  42. -D LV_LVGL_H_INCLUDE_SIMPLE ; for lv_drivers
  43. -D LV_COMP_CONF_INCLUDE_SIMPLE ; for components
  44. -D LV_DEMO_CONF_INCLUDE_SIMPLE ; for demo examples
  45. ; -- ESP build options ------------------------------------
  46. -D SPIFFS_TEMPORAL_FD_CACHE ; speedup opening recent files
  47. ; -- App build options ----------------------------
  48. -D APP_VER_MAJ=0
  49. -D APP_VER_MIN=0
  50. -D APP_VER_REV=1
  51. ; -- Override build options -------------------------------
  52. ${override.build_flags}
  53. ; -- Shared library dependencies in all environments
  54. ; Warning : don't put comments after github links => causes infinite download loop
  55. lib_deps =
  56. ; lvgl/lvgl@^8.0.1 ; from PIO library
  57. ;git+https://github.com/lvgl/lvgl.git
  58. ; bodmer/TFT_eSPI@^2.3.70
  59. ;git+https://github.com/Bodmer/TFT_eSPI.git
  60. src_filter = +<*> -<.git/> +<examples/> -<test/> -<tests/>
  61. ; -- Platform specific build flags
  62. [esp32]
  63. framework = arduino
  64. platform = espressif32@^3.3.1
  65. board_upload.flash_size=4MB
  66. board_upload.maximum_size = 4194304
  67. board_build.partitions = user_setups/esp32/partitions_4MB.csv
  68. board_build.filesystem = littlefs
  69. ;board_build.embed_files =
  70. ; data/edit.htm.gz
  71. ; ----- crash reporter
  72. monitor_filters = esp32_exception_decoder
  73. ; ----- debugger
  74. check_tool = cppcheck
  75. check_flags = --enable=all
  76. debug_tool = esp-prog
  77. debug_init_break = tbreak setup
  78. build_flags =
  79. ${env.build_flags}
  80. ; -- lvgl build options -----------------------------
  81. -D LV_MEM_SIZE=49152U ; 48 kB lvgl memory
  82. -D LV_ATTRIBUTE_FAST_MEM=IRAM_ATTR
  83. -D LV_ATTRIBUTE_TASK_HANDLER=IRAM_ATTR
  84. ;-D LV_FS_PC_PATH="//littlefs" ; this needs to match the vfs mount pount
  85. -D LODEPNG_NO_COMPILE_ALLOCATORS ; use PSram functions
  86. -D LV_LOG_TRACE_TIMER=1
  87. ; -- tft_espi build options ------------------------
  88. ;-D USE_DMA_TO_TFT
  89. ; -- LittleFS build options ------------------------
  90. ;-D CONFIG_LITTLEFS_FOR_IDF_3_2 ; obsolete in IDF 3.3
  91. -I.pio/libdeps/lvgl/examples
  92. lib_ignore =
  93. GxTFT
  94. XPT2046_Touchscreen
  95. Adafruit TouchScreen
  96. Adafruit BusIO
  97. Adafruit GFX Library
  98. sstaub/Ticker
  99. lv_drv_fsmc_ili9341
  100. lv_drivers
  101. AXP192
  102. lib_deps =
  103. LittleFS_esp32
  104. git+https://github.com/lvgl/lv_lib_png.git
  105. lvgl/lv_examples@^8.0.0 ; from PIO library
  106. ; Enable PSram support
  107. ps_ram =
  108. -DBOARD_HAS_PSRAM
  109. -mfix-esp32-psram-cache-issue
  110. extra_scripts =
  111. tools/littlefsbuilder.py
  112. tools/esp_merge_bin.py
  113. tools/analyze_elf.py
  114. ; ${env.extra_scripts}
  115. ; tools/copy_partitions.py
  116. ; -- The ESP32 has 2 SPI Hardware Busses available to use:
  117. vspi =
  118. -D TFT_MISO=19
  119. -D TFT_MOSI=23
  120. -D TFT_SCLK=18
  121. hspi =
  122. -D TFT_MISO=12
  123. -D TFT_MOSI=13
  124. -D TFT_SCLK=14
  125. [esp8266]
  126. framework = arduino
  127. platform = espressif8266
  128. board_build.f_flash = 40000000L
  129. board_build.flash_mode = dout
  130. ; board_build.ldscript = eagle.flash.4m2m.ld ; 2Mb Spiffs
  131. board_build.ldscript = ${PROJECT_DIR}\linker\local.eagle.flash.ld
  132. board_build.filesystem = littlefs
  133. board_build.f_cpu = 160000000L ; set frequency to 160MHz
  134. ; ----- crash reporter
  135. monitor_filters = esp8266_exception_decoder
  136. build_flags=
  137. -D ATOMIC_FS_UPDATE ; enabled compressed ota updates
  138. ; -- lwIP Variant -----------------------------------
  139. ;-D PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
  140. -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
  141. ; -- lvgl build options -----------------------------
  142. -D LV_MEM_SIZE=12288U ; 12kB lvgl memory
  143. -D LV_ATTRIBUTE_FAST_MEM=
  144. -D LV_ATTRIBUTE_TASK_HANDLER=
  145. extra_scripts = tools/copy_fw.py ; tools/pre:extra_script.py
  146. lib_ignore =
  147. ESP32 BLE Arduino
  148. GxTFT
  149. sstaub/Ticker
  150. lv_drv_fsmc_ili9341
  151. AXP192
  152. lib_deps =
  153. [stm32f4]
  154. framework = arduino
  155. platform = ststm32
  156. build_flags=
  157. -I include/stm32f4
  158. -D IRAM_ATTR= ; No IRAM_ATTR available on STM32
  159. -D ICACHE_RAM_ATTR=
  160. -D STM32
  161. ; -- lvgl build options -----------------------------
  162. -D LV_MEM_SIZE=20480U ; 20kB lvgl memory
  163. lib_deps =
  164. ; sstaub/Ticker @ ^3.2.0
  165. ; stm32duino/STM32duino LwIP @ ^2.1.2
  166. ;https://github.com/stm32duino/LwIP.git