Skip to content

Commit

Permalink
0.8.13
Browse files Browse the repository at this point in the history
* added ethernet build for fusion board, not tested so far
  • Loading branch information
lumapu committed Nov 28, 2023
1 parent ec30cc2 commit ca0698f
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compile_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
pip install --upgrade platformio
- name: Run PlatformIO
run: pio run -d src --environment esp8266 --environment esp8266-prometheus --environment esp8285 --environment esp32-wroom32 --environment esp32-wroom32-prometheus --environment esp32-wroom32-ethernet --environment esp32-s2-mini --environment opendtufusion
run: pio run -d src --environment esp8266 --environment esp8266-prometheus --environment esp8285 --environment esp32-wroom32 --environment esp32-wroom32-prometheus --environment esp32-wroom32-ethernet --environment esp32-s2-mini --environment opendtufusion --environment opendtufusion-ethernet

- name: Copy boot_app0.bin
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin src/.pio/build/opendtufusion/ota.bin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
pip install --upgrade platformio
- name: Run PlatformIO
run: pio run -d src --environment esp8266 --environment esp8266-prometheus --environment esp8285 --environment esp32-wroom32 --environment esp32-wroom32-prometheus --environment esp32-wroom32-ethernet --environment esp32-s2-mini --environment opendtufusion
run: pio run -d src --environment esp8266 --environment esp8266-prometheus --environment esp8285 --environment esp32-wroom32 --environment esp32-wroom32-prometheus --environment esp32-wroom32-ethernet --environment esp32-s2-mini --environment opendtufusion --environment opendtufusion-ethernet

- name: Copy boot_app0.bin
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin src/.pio/build/opendtufusion/ota.bin
Expand Down
18 changes: 15 additions & 3 deletions scripts/getVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,14 @@ def readVersion(path, infile):
dst = path + "firmware/ESP32-S2/" + versionout
os.rename(src, dst)

versionout = version[:-1] + "_" + sha + "_esp32s3.bin"
src = path + ".pio/build/opendtufusion/firmware.bin"
dst = path + "firmware/ESP32-S3/" + versionout
versionout = version[:-1] + "_" + sha + "_esp32s3_ethernet.bin"
src = path + ".pio/build/opendtufusion-ethernet/firmware.bin"
dst = path + "firmware/ESP32-S3-ETH/" + versionout
os.rename(src, dst)

versionout = version[:-1] + "_" + sha + "_esp32_ethernet.bin"
src = path + ".pio/build/esp32-wroom32-ethernet/firmware.bin"
dst = path + "firmware/ESP32/" + versionout
os.rename(src, dst)

# other ESP32 bin files
Expand All @@ -119,6 +124,13 @@ def readVersion(path, infile):
os.rename(src + "partitions.bin", dst + "partitions.bin")
genOtaBin(dst)

# other ESP32-S3-Eth bin files
src = path + ".pio/build/opendtufusion-ethernet/"
dst = path + "firmware/ESP32-S3-ETH/"
os.rename(src + "bootloader.bin", dst + "bootloader.bin")
os.rename(src + "partitions.bin", dst + "partitions.bin")
genOtaBin(dst)

os.rename("../scripts/gh-action-dev-build-flash.html", path + "install.html")

print("name=" + versionnumber[:-1] )
Expand Down
1 change: 1 addition & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.8.13 - 2023-11-28
* merge PR #1239 symbolic layout for OLED 128x64 + motion senser functionality
* fix MqTT IP addr for ETH connections PR #1240
* added ethernet build for fusion board, not tested so far

## 0.8.12 - 2023-11-20
* added button `copy to clipboard` to `/serial`
Expand Down
20 changes: 15 additions & 5 deletions src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,21 @@
#if defined(ETHERNET)
#define ETH_SPI_HOST SPI2_HOST
#define ETH_SPI_CLOCK_MHZ 25
#define ETH_INT_GPIO 4
#define ETH_MISO_GPIO 12
#define ETH_MOSI_GPIO 13
#define ETH_SCK_GPIO 14
#define ETH_CS_PIN 15
#ifndef DEF_ETH_IRQ_PIN
#define DEF_ETH_IRQ_PIN 4
#endif
#ifndef DEF_ETH_MISO_PIN
#define DEF_ETH_MISO_PIN 12
#endif
#ifndef DEF_ETH_MOSI_PIN
#define DEF_ETH_MOSI_PIN 13
#endif
#ifndef DEF_ETH_SCK_PIN
#define DEF_ETH_SCK_PIN 14
#endif
#ifndef DEF_ETH_CS_PIN
#define DEF_ETH_CS_PIN 15
#endif
#else /* defined(ETHERNET) */
// time in seconds how long the station info (ssid + pwd) will be tried
#define WIFI_TRY_CONNECT_TIME 30
Expand Down
2 changes: 1 addition & 1 deletion src/eth/ahoyeth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void ahoyeth::setup(settings_t *config, uint32_t *utcTimestamp, OnNetworkCB onNe
if(!ETH.config(ip, gateway, mask, dns1, dns2))
DPRINTLN(DBG_ERROR, F("failed to set static IP!"));
}
ETH.begin(ETH_MISO_GPIO, ETH_MOSI_GPIO, ETH_SCK_GPIO, ETH_CS_PIN, ETH_INT_GPIO, ETH_SPI_CLOCK_MHZ, ETH_SPI_HOST);
ETH.begin(DEF_ETH_MISO_PIN, DEF_ETH_MOSI_PIN, DEF_ETH_SCK_PIN, DEF_ETH_CS_PIN, DEF_ETH_IRQ_PIN, ETH_SPI_CLOCK_MHZ, ETH_SPI_HOST);

}

Expand Down
40 changes: 40 additions & 0 deletions src/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,46 @@ build_flags = ${env.build_flags}
monitor_filters =
esp32_exception_decoder, colorize

[env:opendtufusion-ethernet]
platform = [email protected]
board = esp32-s3-devkitc-1
lib_deps =
khoih-prog/AsyncWebServer_ESP32_W5500
khoih-prog/AsyncUDP_ESP32_W5500
nrf24/RF24 @ ^1.4.8
paulstoffregen/Time @ ^1.6.1
https://github.com/bertmelis/espMqttClient#v1.5.0
bblanchon/ArduinoJson @ ^6.21.3
https://github.com/JChristensen/Timezone @ ^1.2.4
olikraus/U8g2 @ ^2.35.7
zinggjm/GxEPD2 @ ^1.5.2
upload_protocol = esp-builtin
build_flags = ${env.build_flags}
-DETHERNET
-DUSE_HSPI_FOR_EPD
-DDEF_ETH_CS_PIN=42
-DDEF_ETH_SCK_PIN=39
-DDEF_ETH_MISO_PIN=41
-DDEF_ETH_MOSI_PIN=40
-DDEF_ETH_IRQ_PIN=43
-DDEF_NRF_CS_PIN=37
-DDEF_NRF_CE_PIN=38
-DDEF_NRF_IRQ_PIN=47
-DDEF_NRF_MISO_PIN=48
-DDEF_NRF_MOSI_PIN=35
-DDEF_NRF_SCLK_PIN=36
-DDEF_CMT_CSB=4
-DDEF_CMT_FCSB=21
-DDEF_CMT_IRQ=8
-DDEF_CMT_SDIO=5
-DDEF_CMT_SCLK=6
-DDEF_LED0=18
-DDEF_LED1=17
-DLED_ACTIVE_HIGH
-DARDUINO_USB_MODE=1
monitor_filters =
esp32_exception_decoder, colorize

[env:opendtufusion-dev]
platform = [email protected]
board = esp32-s3-devkitc-1
Expand Down

0 comments on commit ca0698f

Please sign in to comment.