From 2c7aab76079890cedbce0177a34c69cf0a4172da Mon Sep 17 00:00:00 2001 From: suchmememanyskill <38142618+suchmememanyskill@users.noreply.github.com> Date: Fri, 9 Feb 2024 19:05:16 +0100 Subject: [PATCH] Shuffle around board defines --- CYD-Klipper/boards/esp32-2432S028R.json | 66 +++++++++++ .../boards/esp32-3248S035C-smartdisplay.json | 108 ++++++++++++++++++ CYD-Klipper/boards/esp32-3248S035C.json | 99 +++++----------- CYD-Klipper/platformio.ini | 65 +---------- 4 files changed, 206 insertions(+), 132 deletions(-) create mode 100644 CYD-Klipper/boards/esp32-2432S028R.json create mode 100644 CYD-Klipper/boards/esp32-3248S035C-smartdisplay.json diff --git a/CYD-Klipper/boards/esp32-2432S028R.json b/CYD-Klipper/boards/esp32-2432S028R.json new file mode 100644 index 0000000..1317137 --- /dev/null +++ b/CYD-Klipper/boards/esp32-2432S028R.json @@ -0,0 +1,66 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32_out.ld" + }, + "core": "esp32", + "extra_flags": [ + "-DUSER_SETUP_LOADED=1", + "-DILI9341_2_DRIVER=1", + "-DTFT_BACKLIGHT_ON=HIGH", + "-DTFT_BL=21", + "-DTFT_MISO=12", + "-DTFT_MOSI=13", + "-DTFT_SCLK=14", + "-DTFT_CS=15", + "-DTFT_DC=2", + "-DTFT_RST=-1", + "-DLOAD_GCLD=1", + "-DLOAD_FONT2=1", + "-DLOAD_GFXFF=1", + "-DSMOOTH_FONT=1", + "-DSPI_FREQUENCY=55000000", + "-DSPI_READ_FREQUENCY=20000000", + "-DSPI_TOUCH_FREQUENCY=2500000", + "-DTOUCH_CS=-1", + + "-DCYD_SCREEN_HEIGHT_PX=240", + "-DCYD_SCREEN_WIDTH_PX=320", + "-DCYD_SCREEN_GAP_PX=8", + "-DCYD_SCREEN_MIN_BUTTON_HEIGHT_PX=35", + "-DCYD_SCREEN_MIN_BUTTON_WIDTH_PX=35", + "-DCYD_SCREEN_FONT=&lv_font_montserrat_14", + "-DCYD_SCREEN_FONT_SMALL=&lv_font_montserrat_10", + "-DCYD_SCREEN_SIDEBAR_SIZE_PX=40", + "-DCYD_SCREEN_DRIVER_ESP32_2432S028R=1" + ], + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "mcu": "esp32", + "variant": "esp32" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "esp32-2432S028R", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "require_upload_port": true, + "speed": 460800 + }, + "url": "https://www.aliexpress.com/item/1005004502250619.html", + "vendor": "Sunton" + } \ No newline at end of file diff --git a/CYD-Klipper/boards/esp32-3248S035C-smartdisplay.json b/CYD-Klipper/boards/esp32-3248S035C-smartdisplay.json new file mode 100644 index 0000000..07da97e --- /dev/null +++ b/CYD-Klipper/boards/esp32-3248S035C-smartdisplay.json @@ -0,0 +1,108 @@ +{ + "build": { + "arduino": { + "ldscript": "esp32_out.ld" + }, + "core": "esp32", + "extra_flags": [ + "'-D ARDUINO_ESP32_DEV'", + "'-D ESP32_3248S035C'", + "'-D LCD_WIDTH=320'", + "'-D LCD_HEIGHT=480'", + "'-D BCKL=27'", + "'-D LCD_ST7796_SPI'", + "'-D ST7796_SPI_HOST=SPI2_HOST'", + "'-D ST7796_SPI_DMA_CHANNEL=SPI_DMA_CH_AUTO'", + "'-D ST7796_SPI_BUS_MOSI_IO_NUM=13'", + "'-D ST7796_SPI_BUS_MISO_IO_NUM=12'", + "'-D ST7796_SPI_BUS_SCLK_IO_NUM=14'", + "'-D ST7796_SPI_BUS_QUADWP_IO_NUM=GPIO_NUM_NC'", + "'-D ST7796_SPI_BUS_QUADHD_IO_NUM=GPIO_NUM_NC'", + "'-D ST7796_SPI_CONFIG_CS_GPIO_NUM=15'", + "'-D ST7796_SPI_CONFIG_DC_GPIO_NUM=2'", + "'-D ST7796_SPI_CONFIG_SPI_MODE=SPI_MODE0'", + "'-D ST7796_SPI_CONFIG_PCLK_HZ=24000000'", + "'-D ST7796_SPI_CONFIG_TRANS_QUEUE_DEPTH=10'", + "'-D ST7796_SPI_CONFIG_LCD_CMD_BITS=8'", + "'-D ST7796_SPI_CONFIG_LCD_PARAM_BITS=8'", + "'-D ST7796_SPI_CONFIG_FLAGS_DC_AS_CMD_PHASE=false'", + "'-D ST7796_SPI_CONFIG_FLAGS_DC_LOW_ON_DATA=false'", + "'-D ST7796_SPI_CONFIG_FLAGS_OCTAL_MODE=false'", + "'-D ST7796_SPI_CONFIG_FLAGS_LSB_FIRST=false'", + "'-D ST7796_DEV_CONFIG_RESET_GPIO_NUM=GPIO_NUM_NC'", + "'-D ST7796_DEV_CONFIG_COLOR_SPACE=ESP_LCD_COLOR_SPACE_BGR'", + "'-D ST7796_DEV_CONFIG_BITS_PER_PIXEL=16'", + "'-D ST7796_DEV_CONFIG_FLAGS_RESET_ACTIVE_HIGH=false'", + "'-D ST7796_DEV_CONFIG_VENDOR_CONFIG=NULL'", + "'-D LCD_SWAP_XY=false'", + "'-D LCD_MIRROR_X=true'", + "'-D LCD_MIRROR_Y=false'", + "'-D BOARD_HAS_TOUCH'", + "'-D TOUCH_GT911_I2C'", + "'-D GT911_I2C_HOST=0'", + "'-D GT911_I2C_CONFIG_SDA_IO_NUM=33'", + "'-D GT911_I2C_CONFIG_SCL_IO_NUM=32'", + "'-D GT911_I2C_CONFIG_SDA_PULLUP_EN=GPIO_PULLUP_ENABLE'", + "'-D GT911_I2C_CONFIG_SCL_PULLUP_EN=GPIO_PULLUP_ENABLE'", + "'-D GT911_I2C_CONFIG_MASTER_CLK_SPEED=400000'", + "'-D GT911_I2C_CONFIG_CLK_FLAGS=0'", + "'-D GT911_IO_I2C_CONFIG_DEV_ADDR=ESP_LCD_TOUCH_IO_I2C_GT911_ADDRESS'", + "'-D GT911_IO_I2C_CONFIG_CONTROL_PHASE_BYTES=1'", + "'-D GT911_IO_I2C_CONFIG_DC_BIT_OFFSET=0'", + "'-D GT911_IO_I2C_CONFIG_LCD_CMD_BITS=16'", + "'-D GT911_IO_I2C_CONFIG_LCD_PARAM_BITS=0'", + "'-D GT911_IO_I2C_CONFIG_FLAGS_DC_LOW_ON_DATA=false'", + "'-D GT911_IO_I2C_CONFIG_FLAGS_DISABLE_CONTROL_PHASE=true'", + "'-D GT911_TOUCH_CONFIG_X_MAX=LCD_WIDTH'", + "'-D GT911_TOUCH_CONFIG_Y_MAX=LCD_HEIGHT'", + "'-D GT911_TOUCH_CONFIG_RST_GPIO_NUM=25'", + "'-D GT911_TOUCH_CONFIG_INT_GPIO_NUM=21'", + "'-D GT911_TOUCH_CONFIG_LEVELS_RESET=0'", + "'-D GT911_TOUCH_CONFIG_LEVELS_INTERRUPT=0'", + "'-D TOUCH_SWAP_XY=true'", + "'-D TOUCH_SWAP_X=false'", + "'-D TOUCH_SWAP_Y=false'", + "'-D BOARD_HAS_TF'", + "'-D TF_CS=5'", + "'-D TF_SPI_MOSI=23'", + "'-D TF_SPI_SCLK=18'", + "'-D TF_SPI_MISO=19'", + "'-D BOARD_HAS_RGB_LED'", + "'-D RGB_LED_R=4'", + "'-D RGB_LED_G=16'", + "'-D RGB_LED_B=17'", + "'-D BOARD_HAS_CDS'", + "'-D CDS=34'", + "'-D BOARD_HAS_SPEAK'", + "'-D SPEAK=26'" + ], + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "mcu": "esp32", + "variant": "esp32" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "esp32-3248S035C", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "require_upload_port": true, + "speed": 460800 + }, + "url": "https://www.aliexpress.com/item/1005004632953455.html", + "vendor": "Sunton" + } \ No newline at end of file diff --git a/CYD-Klipper/boards/esp32-3248S035C.json b/CYD-Klipper/boards/esp32-3248S035C.json index 07da97e..1d0ebcf 100644 --- a/CYD-Klipper/boards/esp32-3248S035C.json +++ b/CYD-Klipper/boards/esp32-3248S035C.json @@ -5,76 +5,35 @@ }, "core": "esp32", "extra_flags": [ - "'-D ARDUINO_ESP32_DEV'", - "'-D ESP32_3248S035C'", - "'-D LCD_WIDTH=320'", - "'-D LCD_HEIGHT=480'", - "'-D BCKL=27'", - "'-D LCD_ST7796_SPI'", - "'-D ST7796_SPI_HOST=SPI2_HOST'", - "'-D ST7796_SPI_DMA_CHANNEL=SPI_DMA_CH_AUTO'", - "'-D ST7796_SPI_BUS_MOSI_IO_NUM=13'", - "'-D ST7796_SPI_BUS_MISO_IO_NUM=12'", - "'-D ST7796_SPI_BUS_SCLK_IO_NUM=14'", - "'-D ST7796_SPI_BUS_QUADWP_IO_NUM=GPIO_NUM_NC'", - "'-D ST7796_SPI_BUS_QUADHD_IO_NUM=GPIO_NUM_NC'", - "'-D ST7796_SPI_CONFIG_CS_GPIO_NUM=15'", - "'-D ST7796_SPI_CONFIG_DC_GPIO_NUM=2'", - "'-D ST7796_SPI_CONFIG_SPI_MODE=SPI_MODE0'", - "'-D ST7796_SPI_CONFIG_PCLK_HZ=24000000'", - "'-D ST7796_SPI_CONFIG_TRANS_QUEUE_DEPTH=10'", - "'-D ST7796_SPI_CONFIG_LCD_CMD_BITS=8'", - "'-D ST7796_SPI_CONFIG_LCD_PARAM_BITS=8'", - "'-D ST7796_SPI_CONFIG_FLAGS_DC_AS_CMD_PHASE=false'", - "'-D ST7796_SPI_CONFIG_FLAGS_DC_LOW_ON_DATA=false'", - "'-D ST7796_SPI_CONFIG_FLAGS_OCTAL_MODE=false'", - "'-D ST7796_SPI_CONFIG_FLAGS_LSB_FIRST=false'", - "'-D ST7796_DEV_CONFIG_RESET_GPIO_NUM=GPIO_NUM_NC'", - "'-D ST7796_DEV_CONFIG_COLOR_SPACE=ESP_LCD_COLOR_SPACE_BGR'", - "'-D ST7796_DEV_CONFIG_BITS_PER_PIXEL=16'", - "'-D ST7796_DEV_CONFIG_FLAGS_RESET_ACTIVE_HIGH=false'", - "'-D ST7796_DEV_CONFIG_VENDOR_CONFIG=NULL'", - "'-D LCD_SWAP_XY=false'", - "'-D LCD_MIRROR_X=true'", - "'-D LCD_MIRROR_Y=false'", - "'-D BOARD_HAS_TOUCH'", - "'-D TOUCH_GT911_I2C'", - "'-D GT911_I2C_HOST=0'", - "'-D GT911_I2C_CONFIG_SDA_IO_NUM=33'", - "'-D GT911_I2C_CONFIG_SCL_IO_NUM=32'", - "'-D GT911_I2C_CONFIG_SDA_PULLUP_EN=GPIO_PULLUP_ENABLE'", - "'-D GT911_I2C_CONFIG_SCL_PULLUP_EN=GPIO_PULLUP_ENABLE'", - "'-D GT911_I2C_CONFIG_MASTER_CLK_SPEED=400000'", - "'-D GT911_I2C_CONFIG_CLK_FLAGS=0'", - "'-D GT911_IO_I2C_CONFIG_DEV_ADDR=ESP_LCD_TOUCH_IO_I2C_GT911_ADDRESS'", - "'-D GT911_IO_I2C_CONFIG_CONTROL_PHASE_BYTES=1'", - "'-D GT911_IO_I2C_CONFIG_DC_BIT_OFFSET=0'", - "'-D GT911_IO_I2C_CONFIG_LCD_CMD_BITS=16'", - "'-D GT911_IO_I2C_CONFIG_LCD_PARAM_BITS=0'", - "'-D GT911_IO_I2C_CONFIG_FLAGS_DC_LOW_ON_DATA=false'", - "'-D GT911_IO_I2C_CONFIG_FLAGS_DISABLE_CONTROL_PHASE=true'", - "'-D GT911_TOUCH_CONFIG_X_MAX=LCD_WIDTH'", - "'-D GT911_TOUCH_CONFIG_Y_MAX=LCD_HEIGHT'", - "'-D GT911_TOUCH_CONFIG_RST_GPIO_NUM=25'", - "'-D GT911_TOUCH_CONFIG_INT_GPIO_NUM=21'", - "'-D GT911_TOUCH_CONFIG_LEVELS_RESET=0'", - "'-D GT911_TOUCH_CONFIG_LEVELS_INTERRUPT=0'", - "'-D TOUCH_SWAP_XY=true'", - "'-D TOUCH_SWAP_X=false'", - "'-D TOUCH_SWAP_Y=false'", - "'-D BOARD_HAS_TF'", - "'-D TF_CS=5'", - "'-D TF_SPI_MOSI=23'", - "'-D TF_SPI_SCLK=18'", - "'-D TF_SPI_MISO=19'", - "'-D BOARD_HAS_RGB_LED'", - "'-D RGB_LED_R=4'", - "'-D RGB_LED_G=16'", - "'-D RGB_LED_B=17'", - "'-D BOARD_HAS_CDS'", - "'-D CDS=34'", - "'-D BOARD_HAS_SPEAK'", - "'-D SPEAK=26'" + "-DUSER_SETUP_LOADED=1", + "-DST7796_DRIVER=1", + "-DTFT_BL=27", + "-DTFT_BACKLIGHT_ON=HIGH", + "-DTFT_MISO=12", + "-DTFT_MOSI=13", + "-DTFT_SCLK=14", + "-DTFT_CS=15", + "-DTFT_DC=2", + "-DTFT_RST=-1", + "-DLOAD_GCLD=1", + "-DLOAD_FONT2=1", + "-DLOAD_GFXFF=1", + "-DSMOOTH_FONT=1", + "-DSPI_FREQUENCY=55000000", + "-DSPI_READ_FREQUENCY=20000000", + "-DSPI_TOUCH_FREQUENCY=2500000", + "-DTOUCH_CS=-1", + + "-DCYD_SCREEN_HEIGHT_PX=320", + "-DCYD_SCREEN_WIDTH_PX=480", + "-DCYD_SCREEN_GAP_PX=10", + "-DCYD_SCREEN_MIN_BUTTON_HEIGHT_PX=40", + "-DCYD_SCREEN_MIN_BUTTON_WIDTH_PX=40", + "-DCYD_SCREEN_FONT=&lv_font_montserrat_16", + "-DCYD_SCREEN_FONT_SMALL=&lv_font_montserrat_12", + "-DCYD_SCREEN_SIDEBAR_SIZE_PX=50", + "-DCYD_SCREEN_DRIVER_ESP32_3248S035C=1", + "-DCYD_SCREEN_DISABLE_TOUCH_CALIBRATION=1" ], "f_cpu": "240000000L", "f_flash": "40000000L", diff --git a/CYD-Klipper/platformio.ini b/CYD-Klipper/platformio.ini index bd9c024..6aeaa23 100644 --- a/CYD-Klipper/platformio.ini +++ b/CYD-Klipper/platformio.ini @@ -22,6 +22,7 @@ build_flags = -DLV_CONF_PATH="../../../../src/conf/lv_conf.h" [env:esp32-2432S028R] +board = esp32-2432S028R lib_deps = SPI https://github.com/suchmememanyskill/lvgl @@ -29,37 +30,9 @@ lib_deps = https://github.com/PaulStoffregen/XPT2046_Touchscreen.git bblanchon/ArduinoJson@^7.0.0 plageoj/UrlEncode@^1.0.1 -build_flags = - -DLV_CONF_PATH="../../../../src/conf/lv_conf.h" - -DUSER_SETUP_LOADED=1 - -DILI9341_2_DRIVER=1 - -DTFT_BACKLIGHT_ON=HIGH - -DTFT_BL=21 - -DTFT_MISO=12 - -DTFT_MOSI=13 - -DTFT_SCLK=14 - -DTFT_CS=15 - -DTFT_DC=2 - -DTFT_RST=-1 - -DLOAD_GCLD=1 - -DLOAD_FONT2=1 - -DLOAD_GFXFF=1 - -DSMOOTH_FONT=1 - -DSPI_FREQUENCY=55000000 - -DSPI_READ_FREQUENCY=20000000 - -DSPI_TOUCH_FREQUENCY=2500000 - - -DCYD_SCREEN_HEIGHT_PX=240 - -DCYD_SCREEN_WIDTH_PX=320 - -DCYD_SCREEN_GAP_PX=8 - -DCYD_SCREEN_MIN_BUTTON_HEIGHT_PX=35 - -DCYD_SCREEN_MIN_BUTTON_WIDTH_PX=35 - -DCYD_SCREEN_FONT=&lv_font_montserrat_14 - -DCYD_SCREEN_FONT_SMALL=&lv_font_montserrat_10 - -DCYD_SCREEN_SIDEBAR_SIZE_PX=40 - -DCYD_SCREEN_DRIVER_ESP32_2432S028R=1 [env:esp32-3248S035C] +board = esp32-3248S035C lib_deps = SPI https://github.com/suchmememanyskill/lvgl @@ -68,41 +41,9 @@ lib_deps = bblanchon/ArduinoJson@^7.0.0 plageoj/UrlEncode@^1.0.1 -build_flags = - -DLV_CONF_PATH="../../../../src/conf/lv_conf.h" - -DUSER_SETUP_LOADED=1 - -DST7796_DRIVER=1 - -DTFT_BL=27 - -DTFT_BACKLIGHT_ON=HIGH - -DTFT_MISO=12 - -DTFT_MOSI=13 - -DTFT_SCLK=14 - -DTFT_CS=15 - -DTFT_DC=2 - -DTFT_RST=-1 - -DLOAD_GCLD=1 - -DLOAD_FONT2=1 - -DLOAD_GFXFF=1 - -DSMOOTH_FONT=1 - -DSPI_FREQUENCY=55000000 - -DSPI_READ_FREQUENCY=20000000 - -DSPI_TOUCH_FREQUENCY=2500000 - -DTOUCH_CS=-1 - - -DCYD_SCREEN_HEIGHT_PX=320 - -DCYD_SCREEN_WIDTH_PX=480 - -DCYD_SCREEN_GAP_PX=10 - -DCYD_SCREEN_MIN_BUTTON_HEIGHT_PX=40 - -DCYD_SCREEN_MIN_BUTTON_WIDTH_PX=40 - -DCYD_SCREEN_FONT=&lv_font_montserrat_16 - -DCYD_SCREEN_FONT_SMALL=&lv_font_montserrat_12 - -DCYD_SCREEN_SIDEBAR_SIZE_PX=50 - -DCYD_SCREEN_DRIVER_ESP32_3248S035C=1 - -DCYD_SCREEN_DISABLE_TOUCH_CALIBRATION=1 - # Terribly slow. Only use for development # [env:esp32-3248S035C-smartdisplay] -# board = esp32-3248S035C +# board = esp32-3248S035C-smartdisplay # build_flags = # -DLV_CONF_PATH="../../../../src/conf/lv_conf.h" # -DCYD_SCREEN_HEIGHT_PX=320