|
| 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 | + |
| 11 | +[env:esp32-c5] |
| 12 | +board = esp32-c5-devkitc-1 |
| 13 | +board_build.partitions = custom_8Mb.csv |
| 14 | +extra_scripts = |
| 15 | + pre:patch-c5.py |
| 16 | + pre:pre_build_current_year.py |
| 17 | + post:build.py |
| 18 | +build_src_filter =${env.build_src_filter} +<../boards/ESP32-C5> |
| 19 | +build_flags = |
| 20 | + ${env.build_flags} |
| 21 | + -Iboards/ESP32-C5 |
| 22 | + -DDEVICE_NAME='"ESP32-C5"' |
| 23 | + -DARDUINO_USB_CDC_ON_BOOT=1 |
| 24 | + -DARDUINO_USB_MODE=1 |
| 25 | + -DCORE_DEBUG_LEVEL=1 |
| 26 | + -DBAD_RX=4 |
| 27 | + -DBAD_TX=5 |
| 28 | + ; grove pins |
| 29 | + ; defaults from https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h |
| 30 | + -DGROVE_SDA=0 ; default RF TX pin |
| 31 | + -DGROVE_SCL=1 ; default IR/RF RX pin |
| 32 | + ;-DALLOW_ALL_GPIO_FOR_IR_RF=1 ; Set this option to make use of all GPIOs, from 1 to 44 to be chosen, except TFT and SD pins |
| 33 | + |
| 34 | + ; ir led pin |
| 35 | + -DIR_TX_PINS='{{"Grove W", GROVE_SCL}, {"Grove Y", GROVE_SDA}}' |
| 36 | + -DIR_RX_PINS='{{"Grove W", GROVE_SCL}, {"Grove Y", GROVE_SDA}}' |
| 37 | + -DLED=27 |
| 38 | + -DLED_ON=HIGH |
| 39 | + -DLED_OFF=LOW |
| 40 | + |
| 41 | + ;Radio Frequency (one pin modules) pin setting |
| 42 | + -DRF_TX_PINS='{{"Grove W", GROVE_SCL}, {"Grove Y", GROVE_SDA}}' |
| 43 | + -DRF_RX_PINS='{{"Grove W", GROVE_SCL}, {"Grove Y", GROVE_SDA}}' |
| 44 | + |
| 45 | + ; sd card pins |
| 46 | + ; suggested https://github.com/espressif/esp-idf/tree/master/examples/storage/sd_card/sdmmc |
| 47 | + -DSDCARD_CS=-1 |
| 48 | + -DSDCARD_SCK=-1 |
| 49 | + -DSDCARD_MISO=-1 |
| 50 | + -DSDCARD_MOSI=-1 |
| 51 | + |
| 52 | + ; tft vars |
| 53 | + -DROTATION=1 |
| 54 | + -DBACKLIGHT=-1 ; tft backlight pin |
| 55 | + -DMINBRIGHT=160 ; unused? |
| 56 | + -DUSER_SETUP_LOADED=1 ; dont redefine pins |
| 57 | + -DILI9341_DRIVER=1 ; example only |
| 58 | + -DSMOOTH_FONT=1 |
| 59 | + -DTFT_DISPON=0x29 |
| 60 | + -DTFT_DISPOFF=0x28 |
| 61 | + -DTFT_CS=-1 |
| 62 | + -DTFT_DC=-1 |
| 63 | + -DTFT_RST=-1 |
| 64 | + -DTOUCH_CS=-1 |
| 65 | + -DTFT_MOSI=-1 |
| 66 | + -DTFT_SCLK=-1 |
| 67 | + -DTFT_BL=-1 |
| 68 | + ; text sizes |
| 69 | + -DFP=1 |
| 70 | + -DFM=2 |
| 71 | + -DFG=3 |
| 72 | + ; ui control buttons |
| 73 | + ;-DSEL_BTN=1 |
| 74 | + ;-DUP_BTN=2 ; also work as ESC |
| 75 | + ;-DDW_BTN=3 ; also work as NEXT |
| 76 | + -DBTN_ALIAS='"OK"' |
| 77 | + |
| 78 | + ;FM Radio |
| 79 | + ;-DFM_SI4713=1 ;Uncomment to activate FM Radio using Adafruit Si4713 |
| 80 | + ;Microphone |
| 81 | + ;-DMIC_SPM1423=1 ; uncomment to enable Applicable for SPM1423 device |
| 82 | + ;-DPIN_CLK=-1 |
| 83 | + ;-DI2S_SCLK_PIN=-1 |
| 84 | + ;-DI2S_DATA_PIN=-1 |
| 85 | + ;-DPIN_DATA=-1 |
| 86 | + |
| 87 | + ;CC1101 SPI connection pins |
| 88 | + ; best connection pins for higher speed https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/spi_master.html#gpio-matrix-and-io-mux |
| 89 | + -DUSE_CC1101_VIA_SPI |
| 90 | + -DCC1101_GDO0_PIN=-1 |
| 91 | + -DCC1101_SS_PIN=SPI_SS_PIN |
| 92 | + -DCC1101_MOSI_PIN=SPI_MOSI_PIN |
| 93 | + -DCC1101_SCK_PIN=SPI_SCK_PIN |
| 94 | + -DCC1101_MISO_PIN=SPI_MISO_PIN |
| 95 | + ;-DCC1101_GDO2_PIN=14 ; optional |
| 96 | + |
| 97 | + ; connections are the same as CC1101 |
| 98 | + ;-DUSE_NRF24_VIA_SPI |
| 99 | + ;-DNRF24_CE_PIN=5 |
| 100 | + ;-DNRF24_SS_PIN=SPI_SS_PIN ; chip select |
| 101 | + ;-DNRF24_MOSI_PIN=SPI_MOSI_PIN |
| 102 | + ;-DNRF24_SCK_PIN=SPI_SCK_PIN |
| 103 | + ;-DNRF24_MISO_PIN=SPI_MISO_PIN |
| 104 | + |
| 105 | + -DSPI_SCK_PIN=-1 |
| 106 | + -DSPI_MOSI_PIN=-1 |
| 107 | + -DSPI_MISO_PIN=-1 |
| 108 | + -DSPI_SS_PIN=-1 |
| 109 | + |
| 110 | + ; connections are the same as W5500 |
| 111 | + ; -DUSE_W5500_VIA_SPI |
| 112 | + ; -DW5500_SS_PIN=SPI_SS_PIN |
| 113 | + ; -DW5500_MOSI_PIN=SPI_MOSI_PIN |
| 114 | + ; -DW5500_SCK_PIN=SPI_SCK_PIN |
| 115 | + ; -DW5500_MISO_PIN=SPI_MISO_PIN |
| 116 | + ; -DW5500_INT_PIN=5 |
0 commit comments