-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from suchmememanyskill/dev
v1.5.0
- Loading branch information
Showing
54 changed files
with
2,718 additions
and
791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Building | ||
|
||
## Running a developer build | ||
|
||
On every change made in this repository, [Github Actions](https://github.com/suchmememanyskill/CYD-Klipper/actions) automatically builds the firmware images for various screens. You can run one of these images as follows: | ||
|
||
#### Getting a firmware image | ||
0. Make sure you are logged into github | ||
1. Go to a [Github Actions](https://github.com/suchmememanyskill/CYD-Klipper/actions) build summary, then download the `firmware` Artifact. | ||
2. Open the firmware.zip archive you just downloaded, open the corresponding folder for your screen, then extract `merged_firmware.bin` | ||
|
||
This merged_firmware.bin file is a ready to flash image. Note that flashing this image does wipe your current configuration. | ||
|
||
#### Flashing merged_firmware.bin | ||
1. Download and extract [esptool](https://github.com/espressif/esptool/releases) to a new folder | ||
- For windows, download `esptool-v4.7.0-win64.zip` | ||
2. Open a terminal window and navigate to this new folder containing esptool | ||
- In windows, you can type cmd and press enter in the address bar in explorer to jump to the folder in cmd ![cmd](readme/cmd.jpg) | ||
3. Move `merged-firmware.bin` into this new folder | ||
4. Connect the display to your computer | ||
5. Execute the command `esptool write_flash 0x0 merged-firmware.bin` | ||
- Don't forget to hold down the boot button on the display | ||
|
||
## Building via PlatformIO | ||
|
||
0. Install [Visual Studio Code](https://code.visualstudio.com/) and install the PlatformIO IDE plugin. | ||
1. Download the source code of CYD-Klipper | ||
- This can be done via the `git clone https://github.com/suchmememanyskill/CYD-Klipper` command or via the green `<> Code` button on Github | ||
2. Open the CYD-Klipper folder inside the CYD-Klipper folder in Visual Studio Code | ||
3. Click on the Alien/Bug tab (PlatformIO) on the left | ||
4. Expand the folder/tab for your specific screen | ||
- Entries with the suffix '-SD' are using the smartdisplay driver. Entries without this suffix are using a custom driver | ||
- Usually, a custom driver is preferred over the smartdisplay driver | ||
5. Connect the display to your computer | ||
6. Click 'Upload and Monitor' | ||
- This will start compiling the code, and after upload it to the display | ||
- Don't forget to hold the boot button while flashing. The screen will flash when the firmware is attempted to be flashed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"build": { | ||
"arduino": { | ||
"ldscript": "esp32_out.ld" | ||
}, | ||
"core": "esp32", | ||
"extra_flags": [ | ||
"'-D ARDUINO_ESP32_DEV'", | ||
"'-D ESP32_2432S024C'", | ||
"'-D LCD_WIDTH=240'", | ||
"'-D LCD_HEIGHT=320'", | ||
"'-D LVGL_BUFFER_PIXELS=(LCD_WIDTH*LCD_HEIGHT/4)'", | ||
"'-D LVGL_BUFFER_MALLOC_FLAGS=(MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT)'", | ||
"'-D GPIO_BCKL=27'", | ||
"'-D LCD_ILI9341_SPI'", | ||
"'-D ILI9341_SPI_HOST=SPI2_HOST'", | ||
"'-D ILI9341_SPI_DMA_CHANNEL=SPI_DMA_CH_AUTO'", | ||
"'-D ILI9341_SPI_BUS_MOSI_IO_NUM=13'", | ||
"'-D ILI9341_SPI_BUS_MISO_IO_NUM=12'", | ||
"'-D ILI9341_SPI_BUS_SCLK_IO_NUM=14'", | ||
"'-D ILI9341_SPI_BUS_QUADWP_IO_NUM=GPIO_NUM_NC'", | ||
"'-D ILI9341_SPI_BUS_QUADHD_IO_NUM=GPIO_NUM_NC'", | ||
"'-D ILI9341_SPI_BUS_MAX_TRANSFER_SZ=(LVGL_BUFFER_PIXELS*sizeof(lv_color16_t))'", | ||
"'-D ILI9341_SPI_BUS_FLAGS=0'", | ||
"'-D ILI9341_SPI_BUS_INTR_FLAGS=0'", | ||
"'-D ILI9341_SPI_CONFIG_CS_GPIO_NUM=15'", | ||
"'-D ILI9341_SPI_CONFIG_DC_GPIO_NUM=2'", | ||
"'-D ILI9341_SPI_CONFIG_SPI_MODE=SPI_MODE0'", | ||
"'-D ILI9341_SPI_CONFIG_PCLK_HZ=24000000'", | ||
"'-D ILI9341_SPI_CONFIG_TRANS_QUEUE_DEPTH=10'", | ||
"'-D ILI9341_SPI_CONFIG_LCD_CMD_BITS=8'", | ||
"'-D ILI9341_SPI_CONFIG_LCD_PARAM_BITS=8'", | ||
"'-D ILI9341_SPI_CONFIG_FLAGS_DC_AS_CMD_PHASE=false'", | ||
"'-D ILI9341_SPI_CONFIG_FLAGS_DC_LOW_ON_DATA=false'", | ||
"'-D ILI9341_SPI_CONFIG_FLAGS_OCTAL_MODE=false'", | ||
"'-D ILI9341_SPI_CONFIG_FLAGS_LSB_FIRST=false'", | ||
"'-D ILI9341_DEV_CONFIG_RESET_GPIO_NUM=GPIO_NUM_NC'", | ||
"'-D ILI9341_DEV_CONFIG_COLOR_SPACE=ESP_LCD_COLOR_SPACE_BGR'", | ||
"'-D ILI9341_DEV_CONFIG_BITS_PER_PIXEL=16'", | ||
"'-D ILI9341_DEV_CONFIG_FLAGS_RESET_ACTIVE_HIGH=false'", | ||
"'-D ILI9341_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_CST816S_I2C'", | ||
"'-D CST816S_I2C_HOST=I2C_NUM_0'", | ||
"'-D CST816S_I2C_CONFIG_SDA_IO_NUM=33'", | ||
"'-D CST816S_I2C_CONFIG_SCL_IO_NUM=32'", | ||
"'-D CST816S_I2C_CONFIG_SDA_PULLUP_EN=GPIO_PULLUP_ENABLE'", | ||
"'-D CST816S_I2C_CONFIG_SCL_PULLUP_EN=GPIO_PULLUP_ENABLE'", | ||
"'-D CST816S_I2C_CONFIG_MASTER_CLK_SPEED=400000'", | ||
"'-D CST816S_I2C_CONFIG_CLK_FLAGS=0'", | ||
"'-D CST816S_IO_I2C_CONFIG_DEV_ADDR=ESP_LCD_TOUCH_IO_I2C_CST816S_ADDRESS'", | ||
"'-D CST816S_IO_I2C_CONFIG_CONTROL_PHASE_BYTES=1'", | ||
"'-D CST816S_IO_I2C_CONFIG_DC_BIT_OFFSET=0'", | ||
"'-D CST816S_IO_I2C_CONFIG_LCD_CMD_BITS=8'", | ||
"'-D CST816S_IO_I2C_CONFIG_LCD_PARAM_BITS=0'", | ||
"'-D CST816S_IO_I2C_CONFIG_FLAGS_DC_LOW_ON_DATA=false'", | ||
"'-D CST816S_IO_I2C_CONFIG_FLAGS_DISABLE_CONTROL_PHASE=true'", | ||
"'-D CST816S_TOUCH_CONFIG_X_MAX=LCD_WIDTH'", | ||
"'-D CST816S_TOUCH_CONFIG_Y_MAX=LCD_HEIGHT'", | ||
"'-D CST816S_TOUCH_CONFIG_RST_GPIO_NUM=25'", | ||
"'-D CST816S_TOUCH_CONFIG_INT_GPIO_NUM=21'", | ||
"'-D CST816S_TOUCH_CONFIG_LEVELS_RESET=0'", | ||
"'-D CST816S_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'", | ||
|
||
"-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_SMARTDISPLAY=1", | ||
"-DCYD_SCREEN_DISABLE_TOUCH_CALIBRATION=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-2432S024C-SD", | ||
"upload": { | ||
"flash_size": "4MB", | ||
"maximum_ram_size": 327680, | ||
"maximum_size": 4194304, | ||
"require_upload_port": true, | ||
"speed": 460800 | ||
}, | ||
"url": "https://www.aliexpress.com/item/1005005865107357.html", | ||
"vendor": "Sunton" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
{ | ||
"build": { | ||
"arduino": { | ||
"ldscript": "esp32_out.ld" | ||
}, | ||
"core": "esp32", | ||
"extra_flags": [ | ||
"'-D ARDUINO_ESP32_DEV'", | ||
"'-D ESP32_2432S028R'", | ||
"'-D LCD_WIDTH=240'", | ||
"'-D LCD_HEIGHT=320'", | ||
"'-D LVGL_BUFFER_PIXELS=(LCD_WIDTH*LCD_HEIGHT/4)'", | ||
"'-D LVGL_BUFFER_MALLOC_FLAGS=(MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT)'", | ||
"'-D GPIO_BCKL=21'", | ||
"'-D LCD_ILI9341_SPI'", | ||
"'-D ILI9341_SPI_HOST=SPI2_HOST'", | ||
"'-D ILI9341_SPI_DMA_CHANNEL=SPI_DMA_CH_AUTO'", | ||
"'-D ILI9341_SPI_BUS_MOSI_IO_NUM=13'", | ||
"'-D ILI9341_SPI_BUS_MISO_IO_NUM=12'", | ||
"'-D ILI9341_SPI_BUS_SCLK_IO_NUM=14'", | ||
"'-D ILI9341_SPI_BUS_QUADWP_IO_NUM=GPIO_NUM_NC'", | ||
"'-D ILI9341_SPI_BUS_QUADHD_IO_NUM=GPIO_NUM_NC'", | ||
"'-D ILI9341_SPI_BUS_MAX_TRANSFER_SZ=(LVGL_BUFFER_PIXELS*sizeof(lv_color16_t))'", | ||
"'-D ILI9341_SPI_BUS_FLAGS=0'", | ||
"'-D ILI9341_SPI_BUS_INTR_FLAGS=0'", | ||
"'-D ILI9341_SPI_CONFIG_CS_GPIO_NUM=15'", | ||
"'-D ILI9341_SPI_CONFIG_DC_GPIO_NUM=2'", | ||
"'-D ILI9341_SPI_CONFIG_SPI_MODE=SPI_MODE0'", | ||
"'-D ILI9341_SPI_CONFIG_PCLK_HZ=24000000'", | ||
"'-D ILI9341_SPI_CONFIG_TRANS_QUEUE_DEPTH=10'", | ||
"'-D ILI9341_SPI_CONFIG_LCD_CMD_BITS=8'", | ||
"'-D ILI9341_SPI_CONFIG_LCD_PARAM_BITS=8'", | ||
"'-D ILI9341_SPI_CONFIG_FLAGS_DC_AS_CMD_PHASE=false'", | ||
"'-D ILI9341_SPI_CONFIG_FLAGS_DC_LOW_ON_DATA=false'", | ||
"'-D ILI9341_SPI_CONFIG_FLAGS_OCTAL_MODE=false'", | ||
"'-D ILI9341_SPI_CONFIG_FLAGS_LSB_FIRST=false'", | ||
"'-D ILI9341_DEV_CONFIG_RESET_GPIO_NUM=GPIO_NUM_NC'", | ||
"'-D ILI9341_DEV_CONFIG_COLOR_SPACE=ESP_LCD_COLOR_SPACE_BGR'", | ||
"'-D ILI9341_DEV_CONFIG_BITS_PER_PIXEL=16'", | ||
"'-D ILI9341_DEV_CONFIG_FLAGS_RESET_ACTIVE_HIGH=false'", | ||
"'-D ILI9341_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_XPT2046_SPI'", | ||
"'-D XPT2046_SPI_HOST=SPI3_HOST'", | ||
"'-D XPT2046_SPI_DMA_CHANNEL=SPI_DMA_CH_AUTO'", | ||
"'-D XPT2046_SPI_BUS_MOSI_IO_NUM=32'", | ||
"'-D XPT2046_SPI_BUS_MISO_IO_NUM=39'", | ||
"'-D XPT2046_SPI_BUS_SCLK_IO_NUM=25'", | ||
"'-D XPT2046_SPI_BUS_QUADWP_IO_NUM=GPIO_NUM_NC'", | ||
"'-D XPT2046_SPI_BUS_QUADHD_IO_NUM=GPIO_NUM_NC'", | ||
"'-D XPT2046_SPI_CONFIG_CS_GPIO_NUM=33'", | ||
"'-D XPT2046_SPI_CONFIG_DC_GPIO_NUM=GPIO_NUM_NC'", | ||
"'-D XPT2046_SPI_CONFIG_SPI_MODE=SPI_MODE0'", | ||
"'-D XPT2046_SPI_CONFIG_PCLK_HZ=2000000'", | ||
"'-D XPT2046_SPI_CONFIG_TRANS_QUEUE_DEPTH=3'", | ||
"'-D XPT2046_SPI_CONFIG_LCD_CMD_BITS=8'", | ||
"'-D XPT2046_SPI_CONFIG_LCD_PARAM_BITS=8'", | ||
"'-D XPT2046_SPI_CONFIG_FLAGS_DC_AS_CMD_PHASE=false'", | ||
"'-D XPT2046_SPI_CONFIG_FLAGS_DC_LOW_ON_DATA=false'", | ||
"'-D XPT2046_SPI_CONFIG_FLAGS_OCTAL_MODE=false'", | ||
"'-D XPT2046_SPI_CONFIG_FLAGS_LSB_FIRST=false'", | ||
"'-D XPT2046_TOUCH_CONFIG_X_MAX=LCD_WIDTH'", | ||
"'-D XPT2046_TOUCH_CONFIG_Y_MAX=LCD_HEIGHT'", | ||
"'-D XPT2046_TOUCH_CONFIG_RST_GPIO_NUM=GPIO_NUM_NC'", | ||
"'-D XPT2046_TOUCH_CONFIG_INT_GPIO_NUM=36'", | ||
"'-D XPT2046_TOUCH_CONFIG_LEVELS_RESET=0'", | ||
"'-D XPT2046_TOUCH_CONFIG_LEVELS_INTERRUPT=0'", | ||
"'-D TOUCH_SWAP_XY=true'", | ||
"'-D TOUCH_SWAP_X=true'", | ||
"'-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'", | ||
|
||
"-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_SMARTDISPLAY=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-2432S028Rv1-SD", | ||
"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" | ||
} |
Oops, something went wrong.