platformio.ini 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ; PlatformIO Project Configuration File
  2. ;
  3. ; Build options: build flags, source filter
  4. ; Upload options: custom upload port, speed and extra flags
  5. ; Library options: dependencies, extra library storages
  6. ; Advanced options: extra scripting
  7. ;
  8. ; Please visit documentation for the other options and examples
  9. ; https://docs.platformio.org/page/projectconf.html
  10. [platformio]
  11. default_envs = view
  12. src_dir = firmware/src
  13. lib_dir = firmware/lib
  14. include_dir = firmware/include
  15. test_dir = firmware/test
  16. data_dir = firmware/data
  17. [base_config]
  18. platform = espressif32@3.4
  19. framework = arduino
  20. monitor_speed = 921600
  21. monitor_flags =
  22. --eol=CRLF
  23. --echo
  24. --filter=esp32_exception_decoder
  25. lib_deps =
  26. askuric/Simple FOC @ 2.2.0
  27. infineon/TLV493D-Magnetic-Sensor @ 1.0.3
  28. bxparks/AceButton @ 1.9.1
  29. build_flags =
  30. -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
  31. -DMONITOR_SPEED=921600
  32. [env:view]
  33. extends = base_config
  34. board = esp32doit-devkit-v1
  35. lib_deps =
  36. ${base_config.lib_deps}
  37. bodmer/TFT_eSPI@2.4.25
  38. fastled/FastLED @ 3.5.0
  39. bogde/HX711 @ 0.7.5
  40. adafruit/Adafruit VEML7700 Library @ 1.1.1
  41. bakercp/PacketSerial @ 1.4.0
  42. nanopb/Nanopb @ 0.4.6 ; Ideally this would reference the nanopb submodule, but that would require
  43. ; everyone to check out submodules to just compile, so we use the library
  44. ; registry for the runtime. The submodule is available for manually updating
  45. ; the pre-compiled (checked in) .pb.h/c files when proto files change, but is
  46. ; otherwise not used during application firmware compilation.
  47. build_flags =
  48. ${base_config.build_flags}
  49. -DSK_DISPLAY=1
  50. -DSK_LEDS=1
  51. -DNUM_LEDS=8
  52. -DSENSOR_MT6701=1
  53. -DSK_STRAIN=1
  54. -DSK_INVERT_ROTATION=1
  55. -DSK_ALS=1
  56. -DPIN_UH=26
  57. -DPIN_UL=25
  58. -DPIN_VH=27
  59. -DPIN_VL=32
  60. -DPIN_WH=12
  61. -DPIN_WL=33
  62. -DPIN_BUTTON_NEXT=-1
  63. -DPIN_BUTTON_PREV=-1
  64. -DPIN_SDA=15
  65. -DPIN_SCL=8
  66. -DPIN_MT_DATA=37
  67. -DPIN_MT_CLOCK=13
  68. -DPIN_MT_CSN=14
  69. -DPIN_LED_DATA=7
  70. -DPIN_LCD_BACKLIGHT=19
  71. -DDESCRIPTION_FONT=Roboto_Thin_24
  72. -DDESCRIPTION_Y_OFFSET=20
  73. -DVALUE_OFFSET=30
  74. -DDRAW_ARC=0
  75. -DUSER_SETUP_LOADED=1
  76. -DGC9A01_DRIVER=1
  77. -DCGRAM_OFFSET=1
  78. -DTFT_WIDTH=240
  79. -DTFT_HEIGHT=240
  80. -DTFT_MISO=-1
  81. -DTFT_MOSI=5
  82. -DTFT_SCLK=20
  83. -DTFT_CS=21
  84. -DTFT_DC=22
  85. -DTFT_RST=4
  86. -DTFT_BL=-1
  87. -DLOAD_GLCD=1
  88. -DLOAD_GFXFF=1
  89. -DSPI_FREQUENCY=40000000
  90. ; Reduce loop task stack size (only works on newer IDF Arduino core)
  91. ; -DARDUINO_LOOP_STACK_SIZE=2048
  92. ; Modify the default unusable pin mask to allow GPIO 7 (allowed to use on ESP32-PICO-V3-02)
  93. ; Unusable bits: 6, 8, 9, 10, 20
  94. ; (0ULL | _FL_BIT(6) | _FL_BIT(8) | _FL_BIT(9) | _FL_BIT(10) | _FL_BIT(20))
  95. -DFASTLED_UNUSABLE_PIN_MASK=0x100740LL
  96. ; 0~39 except from 24, 28~31 are valid
  97. ; (0xFFFFFFFFFFULL & ~(0ULL | _FL_BIT(24) | _FL_BIT(28) | _FL_BIT(29) | _FL_BIT(30) | _FL_BIT(31)))
  98. -DSOC_GPIO_VALID_GPIO_MASK=0xFF0EFFFFFF
  99. ; GPIO >= 34 are input only
  100. ; (SOC_GPIO_VALID_GPIO_MASK & ~(0ULL | _FL_BIT(34) | _FL_BIT(35) | _FL_BIT(36) | _FL_BIT(37) | _FL_BIT(38) | _FL_BIT(39)))
  101. -DSOC_GPIO_VALID_OUTPUT_GPIO_MASK=0x30EFFFFFF