Skip to content

Commit 5709c5e

Browse files
committed
try build with latest idf
migrate libs to shelly-homekit-os new idf builds new_idf for plus/gen3 devices new_idf for plus/gen3 devices core yml
1 parent dd4549f commit 5709c5e

4 files changed

Lines changed: 25 additions & 33 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ ifneq "$(ALLOW_DIRTY_FS)" "1"
174174
@[ -z "$(wildcard fs/conf*.json fs/kvs.json)" ] || { echo; echo "XXX No configs in fs allowed, or set ALLOW_DIRTY_FS=1"; echo; exit 1; }
175175
endif
176176
$(MOS) build --platform=$(PLATFORM) --build-var=MODEL=$* \
177-
--build-dir=$(BUILD_DIR) --binary-libs-dir=./binlibs $(MOS_BUILD_FLAGS_FINAL) --repo https://github.com/markirb/mongoose-os
177+
--build-dir=$(BUILD_DIR) --binary-libs-dir=./binlibs $(MOS_BUILD_FLAGS_FINAL) --repo https://github.com/shelly-homekit-mos/mongoose-os
178178
ifeq "$(RELEASE)" "1"
179179
[ $(PLATFORM) = ubuntu ] || \
180180
(dir=releases/`jq -r .build_version $(BUILD_DIR)/gen/build_info.json`$(RELEASE_SUFFIX) && \

mos.yml

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -163,44 +163,52 @@ cdefs:
163163

164164
libs:
165165
- location: ./libreset
166-
- location: https://github.com/markirb/core
166+
167+
#for remapping deps to correct ones
168+
#esp8266 needs old mbedtls
169+
- location: https://github.com/shelly-homekit-mos/core
170+
- location: https://github.com/shelly-homekit-mos/rpc-common
171+
- location: https://github.com/shelly-homekit-mos/ota-common
172+
- location: https://github.com/shelly-homekit-mos/vfs-common
173+
- location: https://github.com/shelly-homekit-mos/mongoose
174+
175+
- location: https://github.com/shelly-homekit-mos/homekit-adk
176+
167177
- location: https://github.com/mongoose-os-libs/file-logger
168-
- location: https://github.com/mongoose-os-libs/homekit-adk
169178
- location: https://github.com/mongoose-os-libs/http-server
170179
- location: https://github.com/mongoose-os-libs/ota-http-server
171180
- location: https://github.com/mongoose-os-libs/rpc-service-config
172181
- location: https://github.com/mongoose-os-libs/rpc-service-fs
173182
- location: https://github.com/mongoose-os-libs/rpc-uart
174183
- location: https://github.com/mongoose-os-libs/rpc-ws
175184
- location: https://github.com/mongoose-os-libs/sntp
185+
176186
# Not enough space on 2.5
177187
# - location: https://github.com/mongoose-os-libs/rpc-mqtt
178188
# - location: https://github.com/mongoose-os-libs/rpc-service-ota
179189
# For testing GPIOs:
180190
# - location: https://github.com/mongoose-os-libs/rpc-service-gpio
181191

182192
conds:
183-
- when: mos.platform == "esp32c3"
184-
apply:
185-
libs:
186-
- location: https://github.com/markirb/adc
193+
187194
- when: mos.platform == "esp32"
188195
apply:
189196
libs:
190-
- location: https://github.com/mongoose-os-libs/adc
191197
- location: https://github.com/shelly-homekit-mos/pwm
192198

193199
- when: mos.platform == "esp8266"
194200
apply:
195201
libs:
196-
- location: https://github.com/mongoose-os-libs/adc
197202
- location: https://github.com/shelly-homekit-mos/pwm
198203

199204
- when: mos.platform != "ubuntu"
200205
apply:
201206
sources:
202207
- src/noisy_input_pin
203208
- src/wifi_config
209+
libs:
210+
- location: https://github.com/shelly-homekit-mos/adc
211+
- location: https://github.com/shelly-homekit-mos/wifi
204212
config_schema:
205213
- ["wifi.ap.pass", ""]
206214
- ["wifi.ap.ip", "192.168.33.1"]
@@ -215,8 +223,6 @@ conds:
215223
# This is believed to be fixed, default has been flipped back to 0 in 2.11.0.
216224
# Consider removing in later releases.
217225
- ["shelly.wifi_connect_reboot_timeout", "i", 0, {title: "If not connected for this long when supposed to be, reboot"}]
218-
libs:
219-
- location: https://github.com/mongoose-os-libs/wifi
220226
cdefs:
221227
# Size fine-tuning, saves substantial amount of RAM vs defaults.
222228
HAP_SESSION_SIZE: 392
@@ -662,8 +668,6 @@ conds:
662668
- when: build_vars.MODEL == "ShellyPlusRGBWPM"
663669
apply:
664670
name: PlusRGBWPM
665-
libs:
666-
- location: https://github.com/mongoose-os-libs/mongoose
667671
sources:
668672
- src/ShellyRGBW2
669673
build_vars:
@@ -727,8 +731,6 @@ conds:
727731
sources:
728732
- src/ShellyMini1PMGen3
729733
- src/BL0942
730-
libs:
731-
- location: https://github.com/mongoose-os-libs/mongoose
732734
build_vars:
733735
MGOS_ROOT_FS_SIZE: 0x60000
734736
APP_SLOT_SIZE: 0x190000
@@ -1063,8 +1065,7 @@ conds:
10631065
libs:
10641066
- location: https://github.com/mongoose-os-libs/onewire
10651067
- location: https://github.com/mongoose-os-libs/dht
1066-
- location: https://github.com/markirb/ade7953
1067-
- location: https://github.com/mongoose-os-libs/mongoose
1068+
- location: https://github.com/shelly-homekit-mos/ade7953
10681069
build_vars:
10691070
PARTITION_TABLE_OFFSET: 0x10000
10701071
OTA_DATA_ADDR: 0x11000
@@ -1150,8 +1151,6 @@ conds:
11501151
- when: build_vars.MODEL == "ShellyMini1PMGen3"
11511152
apply:
11521153
name: Mini1PMG3
1153-
libs:
1154-
- location: https://github.com/mongoose-os-libs/mongoose
11551154
sources:
11561155
- src/BL0942
11571156
build_vars:
@@ -1206,8 +1205,6 @@ conds:
12061205
- when: build_vars.MODEL == "ShellyMini1Gen3"
12071206
apply:
12081207
name: Mini1G3
1209-
libs:
1210-
- location: https://github.com/mongoose-os-libs/mongoose
12111208
build_vars:
12121209
OTA_DATA_ADDR: 0x10000
12131210
OTA_DATA_SIZE: 0x4000
@@ -1250,8 +1247,6 @@ conds:
12501247
name: Plus1Mini
12511248
sources:
12521249
- src/ShellyMini1Gen3
1253-
libs:
1254-
- location: https://github.com/mongoose-os-libs/mongoose
12551250
build_vars:
12561251
MGOS_ROOT_FS_TYPE: LFS
12571252
MGOS_ROOT_FS_SIZE: 0x60000
@@ -1297,7 +1292,6 @@ conds:
12971292
libs:
12981293
- location: https://github.com/mongoose-os-libs/onewire
12991294
- location: https://github.com/mongoose-os-libs/dht
1300-
- location: https://github.com/mongoose-os-libs/mongoose
13011295
build_vars:
13021296
ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K"
13031297
ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K,encrypted"
@@ -1358,7 +1352,6 @@ conds:
13581352
libs:
13591353
- location: https://github.com/mongoose-os-libs/onewire
13601354
- location: https://github.com/mongoose-os-libs/dht
1361-
- location: https://github.com/mongoose-os-libs/mongoose
13621355
build_vars:
13631356
ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K"
13641357
ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K,encrypted"
@@ -1427,7 +1420,7 @@ conds:
14271420
libs:
14281421
- location: https://github.com/mongoose-os-libs/onewire
14291422
- location: https://github.com/mongoose-os-libs/dht
1430-
- location: https://github.com/mongoose-os-libs/ade7953
1423+
- location: https://github.com/shelly-homekit-mos/ade7953
14311424
build_vars:
14321425
ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K"
14331426
ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K,encrypted"
@@ -1671,7 +1664,6 @@ conds:
16711664
libs:
16721665
- location: https://github.com/mongoose-os-libs/onewire
16731666
- location: https://github.com/mongoose-os-libs/dht
1674-
- location: https://github.com/mongoose-os-libs/mongoose
16751667
build_vars:
16761668
ESP_IDF_EXTRA_PARTITION: "aux,0x55,0x00,0x3f0000,48K"
16771669
ESP_IDF_EXTRA_PARTITION_2: "shelly,data,0x88,0x3fc000,16K,encrypted"

src/shelly_input_pin.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "mgos.hpp"
2121

22-
#if CS_PLATFORM != CS_P_ESP8266
22+
#if CS_PLATFORM == CS_P_ESP32
2323
#include "driver/gpio.h"
2424
#endif
2525

@@ -43,7 +43,7 @@ void InputPin::Init() {
4343
mgos_gpio_setup_input(cfg_.pin, cfg_.pull);
4444
mgos_gpio_set_button_handler(cfg_.pin, cfg_.pull, MGOS_GPIO_INT_EDGE_ANY, 20,
4545
GPIOIntHandler, this);
46-
#if CS_PLATFORM != CS_P_ESP8266
46+
#if CS_PLATFORM == CS_P_ESP32
4747
gpio_hold_dis((gpio_num_t) cfg_.pin);
4848
#endif
4949
bool state = GetState();
@@ -58,7 +58,7 @@ void InputPin::SetInvert(bool invert) {
5858

5959
InputPin::~InputPin() {
6060
mgos_gpio_remove_int_handler(cfg_.pin, nullptr, nullptr);
61-
#if CS_PLATFORM != CS_P_ESP8266
61+
#if CS_PLATFORM == CS_P_ESP32
6262
gpio_hold_en((gpio_num_t) cfg_.pin);
6363
#endif
6464
}

src/shelly_output.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "mgos.hpp"
2121
#include "mgos_gpio.h"
2222

23-
#if CS_PLATFORM != CS_P_ESP8266
23+
#if CS_PLATFORM == CS_P_ESP32
2424
#include "driver/gpio.h"
2525
#endif
2626

@@ -46,15 +46,15 @@ OutputPin::OutputPin(int id, int pin, int on_value)
4646
on_value_(on_value),
4747
pulse_timer_(std::bind(&OutputPin::PulseTimerCB, this)) {
4848
mgos_gpio_set_mode(pin_, MGOS_GPIO_MODE_OUTPUT);
49-
#if CS_PLATFORM != CS_P_ESP8266
49+
#if CS_PLATFORM == CS_P_ESP32
5050
gpio_hold_dis((gpio_num_t) pin);
5151
#endif
5252
LOG(LL_INFO, ("OutputPin %d: pin %d, on_value %d, state %s", id, pin,
5353
on_value, OnOff(GetState())));
5454
}
5555

5656
OutputPin::~OutputPin() {
57-
#if CS_PLATFORM != CS_P_ESP8266
57+
#if CS_PLATFORM == CS_P_ESP32
5858
gpio_hold_en((gpio_num_t) pin_);
5959
#endif
6060
}

0 commit comments

Comments
 (0)