Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
Signed-off-by: Luc <8822552+luc-github@users.noreply.github.com>
  • Loading branch information
luc-github authored Apr 16, 2024
2 parents 1bff24d + 31bbd76 commit 4062523
Show file tree
Hide file tree
Showing 35 changed files with 515 additions and 76 deletions.
1 change: 1 addition & 0 deletions .github/ci/ESP32S3_8048S070C.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/ESP32S3_8048S070C "TFT TARGET is ESP32S3_8048S070C - 7.0in. 800x480 (Capacitive)" OFF/ESP32S3_8048S070C "TFT TARGET is ESP32S3_8048S070C - 7.0in. 800x480 (Capacitive)" ON/g' ./CMakeLists.txt
idf.py fullclean
Expand Down
3 changes: 3 additions & 0 deletions .github/ci/ESP32S3_FREENOVE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ set -e
cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/OPTION(ESP32S3_FREENOVE_1_1 "HARDWARE TARGET is ESP32S3 Freenove v1.1" OFF/OPTION(ESP32S3_FREENOVE_1_1 "HARDWARE TARGET is ESP32S3 Freenove v1.1" ON/g' ./CMakeLists.txt
sed -i 's/OPTION(CAMERA_SERVICE "Camera service" OFF/OPTION(CAMERA_SERVICE "Camera service" ON/g' ./CMakeLists.txt
sed -i 's/OPTION(TFT_UI_SERVICE "TFT UI service" ON/OPTION(TFT_UI_SERVICE "TFT UI service" OFF/g' ./CMakeLists.txt
idf.py fullclean
head ./CMakeLists.txt -n 9
idf.py -DIDF_TARGET=esp32s3 reconfigure
Expand Down
1 change: 1 addition & 0 deletions .github/ci/ESP32S3_HMI43V3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/OPTION(ESP32S3_HMI43V3 "TFT TARGET is ESP32S3 HMI 4.3inches" OFF/OPTION(ESP32S3_HMI43V3 "TFT TARGET is ESP32S3 HMI 4.3inches" ON/g' ./CMakeLists.txt
idf.py fullclean
Expand Down
13 changes: 13 additions & 0 deletions .github/ci/ESP32_2432S028R.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
set -e
cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/OPTION(ESP32_2432S028R "TFT TARGET is ESP32_2432S028R - 2.8in. 320x240 (Resistive)" OFF/OPTION(ESP32_2432S028R "TFT TARGET is ESP32_2432S028R - 2.8in. 320x240 (Resistive)" ON/g' ./CMakeLists.txt
idf.py fullclean
head ./CMakeLists.txt -n 9
idf.py -DIDF_TARGET=esp32 reconfigure
idf.py build
1 change: 1 addition & 0 deletions .github/ci/ESP32_ROTRICS_DEXARM35.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/OPTION(ESP32_ROTRICS_DEXARM35 "TFT TARGET is ESP32 Rotrics DexArm 3.5inches" OFF/OPTION(ESP32_ROTRICS_DEXARM35 "TFT TARGET is ESP32 Rotrics DexArm 3.5inches" ON/g' ./CMakeLists.txt
idf.py fullclean
Expand Down
1 change: 1 addition & 0 deletions .github/ci/ZX3D50CE02S-SRC-4832.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/ESP32S3_ZX3D50CE02S_USRC_4832 "TFT TARGET is ESP32S3 Panlee ZX3D50CE02S-SRC-4832 3.5inches" OFF/ESP32S3_ZX3D50CE02S_USRC_4832 "TFT TARGET is ESP32S3 Panlee ZX3D50CE02S-SRC-4832 3.5inches" ON/g' ./CMakeLists.txt
idf.py fullclean
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: build-ci

on: [pull_request, push]

env:
BUILD_ERROR: 0

jobs:
esp-idf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.0.0
- name: Get IDF Setup Hash
id: idf-setup-hash
run: echo "hash=$(md5sum ./.github/ci/idf-setup.sh | awk '{ print $1 }')" >> $GITHUB_OUTPUT
- name: Cache ESP-IDF
id: cache-esp-idf
uses: actions/cache@v4.0.0
with:
path: esp-idf
key: ${{ runner.os }}-esp-idf-${{ steps.idf-setup-hash.outputs.hash }}
- name: Run IDF Setup
if: steps.cache-esp-idf.outputs.cache-hit != 'true'
run: bash ./.github/ci/idf-setup.sh
- name: Create ESP-IDF Archive
run: zip -r esp-idf.zip esp-idf
- uses: actions/upload-artifact@v4.0.0
with:
name: esp-idf
path: esp-idf.zip

build:
runs-on: ubuntu-latest
needs: esp-idf
strategy:
matrix:
platform: [ESP32S3_FREENOVE, ESP32S3_HMI43V3, ZX3D50CE02S-SRC-4832, ESP32S3_8048S070C, ESP32_ROTRICS_DEXARM35, ESP32_2432S028R]
steps:
- uses: actions/checkout@v4.0.0
with:
submodules: 'recursive'
- uses: actions/download-artifact@v4.0.0
with:
name: esp-idf
- name: Unzip ESP-IDF
run: unzip esp-idf.zip
- name: Install ESP-IDF Tools
run: |
cd esp-idf
./install.sh
- name: Build ${{ matrix.platform }}
run: |
source esp-idf/export.sh
idf.py fullclean
bash ./.github/ci/${{ matrix.platform }}.sh
continue-on-error: true
- name: Mark ${{ matrix.platform }} error
if: failure()
run: echo "BUILD_ERROR=1" >> $GITHUB_ENV

finalize:
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- uses: actions/checkout@v4.0.0
- name: Final check
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
if [ "${{ env.BUILD_ERROR }}" -ne "0" ]; then
bash ./.github/ci/final-check.sh "$GITHUB_RUN_ID" "failure"
else
bash ./.github/ci/final-check.sh "$GITHUB_RUN_ID" "success"
fi
47 changes: 0 additions & 47 deletions .github/workflows/build-ci.yml.hold

This file was deleted.

6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

# With TFT:
OPTION(ESP32S3_HMI43V3 "TFT TARGET is ESP32S3 HMI 4.3inches" OFF)
OPTION(ESP32_ROTRICS_DEXARM35 "TFT TARGET is ESP32 Rotrics DexArm 3.5inches" OFF)
OPTION(ESP32S3_ZX3D50CE02S_USRC_4832 "TFT TARGET is ESP32S3 Panlee ZX3D50CE02S-SRC-4832 3.5inches" OFF)
OPTION(ESP32S3_BZM_TFT35_GT911 "TFT TARGET is ESP32S3 Panlee BZM 3.5inches" ON)
OPTION(ESP32S3_8048S070C "TFT TARGET is ESP32S3_8048S070C - 7.0in. 800x480 (Capacitive)" OFF)
OPTION(ESP32S3_8048S050C "TFT TARGET is ESP32S3_8048S050C - 5.0in. 800x480 (Capacitive)" OFF)
OPTION(ESP32S3_8048S043C "TFT TARGET is ESP32S3_8048S043C - 4.3in. 800x480 (Capacitive)" OFF)
OPTION(ESP32S3_4827S043C "TFT TARGET is ESP32S3_4827S043C - 4.3in. 480x272 (Capacitive)" OFF)
OPTION(ESP32_ROTRICS_DEXARM35 "TFT TARGET is ESP32 Rotrics DexArm 3.5inches" ON)
OPTION(ESP32_3248S035C "TFT TARGET is ESP32_3248S035C - 3.5in. 480x320 (Capacitive)" OFF)
OPTION(ESP32_3248S035R "TFT TARGET is ESP32_3248S035R - 3.5in. 480x320 (Resistive)" OFF)
OPTION(ESP32_3248S035R "TFT TARGET is ESP32_3248S035R - 3.5in. 480x320 (Resistive)" OFF)
OPTION(ESP32_2432S028R "TFT TARGET is ESP32_2432S028R - 2.8in. 320x240 (Resistive)" OFF)

# Without TFT:
Expand Down Expand Up @@ -56,7 +56,7 @@ OPTION(MDNS_SERVICE "MDNS service" ON)
OPTION(WIFI_SERVICE "WiFi service" ON)
OPTION(BT_SERVICE "Bluetooth service" ON)
OPTION(WEB_SERVICES "Web Services http/websocket/webdav/camera" ON)
OPTION(CAMERA_SERVICE "Camera service" ON)
OPTION(CAMERA_SERVICE "Camera service" OFF)
OPTION(WEBDAV_SERVICES "WebDav Services" ON)
OPTION(TELNET_SERVICE "Telnet service" ON)
OPTION(WS_SERVICE "WebSocket data service" ON)
Expand Down
2 changes: 1 addition & 1 deletion cmake/dev_tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Debug = 2
# Error only = 1
# Disabled = 0
add_compile_options(-DESP3D_TFT_LOG=2)
add_compile_options(-DESP3D_TFT_LOG=0)
# Disable ANSI color to fit some serial terminals
add_compile_options(-DDISABLE_COLOR_LOG=0)

Expand Down
3 changes: 1 addition & 2 deletions cmake/targets/ESP32_ROTRICS_DEXARM35.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if(ESP32_ROTRICS_DEXARM35)
set(TFT_TARGET "ESP32_ROTRICS_DEXARM35")
set(SDKCONFIG ${CMAKE_SOURCE_DIR}/hardware/ESP32_ROTRICS_DEXARM35/sdkconfig)
set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/hardware/ESP32S3_ZX3D50CE02S_USRC_4832/components)
#list(APPEND EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/hardware/ESP32_ROTRICS_DEXARM35/components)
set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/hardware/ESP32_ROTRICS_DEXARM35/components)
add_compile_options("-I${CMAKE_SOURCE_DIR}/hardware/ESP32_ROTRICS_DEXARM35/components/bsp")
endif()
51 changes: 50 additions & 1 deletion docs/project-arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -965,4 +965,53 @@ The main application code is typically organized into the following files:
* cnc directory that contains the UI code for the CNC TFT display
Same as above but for the CNC firmware


* embedded directory, which contains the embedded resources for the ESP32.
the embedded directory contains the following files:
* favicon.ico.gz file that contains the favicon for the web interface
* index.html.gz file that contains the index page for the web interface

* modules directory, which contains the modules code for the TFT display. each subdirectory contains the code for a specific module / feature.
the modules directory contains the following files:
* authentication directory that contains the code for the authentication feature
* camera directory that contains the code for the camera feature
* config_files directory that contains the code for the config files feature, which allow to apply settings using ini file
* filesystem directory that contains the code for the filesystem feature: SD and flash
* gcode_host directory that contains the code for the gcode streaming feature
* http directory that contains the code for the http server feature, the different handlers for the web interface are splited in different subdirectories / files according usage \
* authentication directory that contains the authentication handlers
* camera directory that contains the camera handler
* flash directory that contains the flash files management handler
* sd directory that contains the sd files managment handler
* ssdp directory that contains the ssdp service handler
* update directory that contains the firmware update handler
* webdav directory that contains the webdav protocol handler
* ws directory that contains the websocket handler (data only not webui)
* esp3d_commands.cpp file that handle the web commands handler
* esp3d_config.cpp file that handle the config handler (shortcut to [ESP420])
* esp3d_favicon.cpp file that handle the favicon handler
* esp3d_file_not_found.cpp file that handle the file not found handler (which also handle the download of the files)
* esp3d_root.cpp file that handle the root handler (including the maintenance mode)
* esp3d_websocket_webui.cpp file that handle the websocket handler for the webui
* mdns directory that contains the code for the mdns feature
* network directory that contains the code for the network feature
* notifications directory that contains the code for the notifications feature
* rendering directory that contains the code for the renderer feature (Display)
* serial directory that contains the code for the serial communications feature
* socket_server directory that contains the code for the socket server feature (Telnet)
* ssdp directory that contains the code for the ssdp protocol feature
* time directory that contains the code for the time feature (NTP)
* translation directory that contains the code for the translation feature
* update directory that contains the code for the update feature
* usb_serial directory that contains the code for the usb serial feature (OTG)
* webdav directory that contains the code for the webdav protocol feature
* websocket directory that contains the code for the websocket feature (webui and data)


* target directory, which contains the target code specific actions. each subdirectory contains the code for a specific target.
the target directory contains the following files:
* 3dprinter directory that contains the code for the 3D printer target:
* marlin directory that contains the code for the Marlin target
* repetier directory that contains the code for the Repetier target
* smoothieware directory that contains the code for the Smoothieware target
* cnc directory that contains the code for the CNC target:
* grbl directory that contains the code for the Grbl target
18 changes: 18 additions & 0 deletions hardware/ESP32_3248S035C/components/bsp/bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ esp_err_t bsp_init(void) {
return ESP_FAIL;
}

/* SPI master initialization */
esp3d_log("Initializing SPI master (display,touch)...");
if (display_spi_st7262_cfg.spi_bus_config.is_master) {
esp_spi_bus_st7262_config_t *spi_cfg =
&(display_spi_st7262_cfg.spi_bus_config);
esp3d_log("Initializing SPI master (display)...");
err = spi_bus_init(spi_cfg->spi_host_index, spi_cfg->pin_miso,
spi_cfg->pin_mosi, spi_cfg->pin_clk,
spi_cfg->max_transfer_sz, spi_cfg->dma_channel,
spi_cfg->quadwp_io_num, spi_cfg->quadhd_io_num);
if (err != ESP_OK) {
{
esp3d_log_e("Failed to initialize SPI master (display)");
return err;
}
}
}

esp3d_log("Attaching display panel to SPI bus...");
esp_lcd_panel_io_handle_t disp_io_handle;
display_spi_st7262_cfg.disp_spi_cfg.on_color_trans_done = disp_flush_ready;
Expand Down
2 changes: 1 addition & 1 deletion hardware/ESP32_3248S035C/components/bsp/touch_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const gt911_config_t gt911_cfg = {
#endif
.swap_xy = true,
.invert_x = false,
.invert_y = false,
.invert_y = true,
.x_max = 0, // auto detect
.y_max = 0, // auto detect
};
Expand Down
Loading

0 comments on commit 4062523

Please sign in to comment.