Skip to content

Commit

Permalink
Cross compilation fixes (esp) & binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
anklimov committed Oct 3, 2022
1 parent 891701c commit 39cfb42
Show file tree
Hide file tree
Showing 19 changed files with 44,434 additions and 43,638 deletions.
5 changes: 4 additions & 1 deletion build-flags/build_flags_esp8266-wifi
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@

-DRESTART_LAN_ON_MQTT_ERRORS
#-D CORS=\"http://lazyhome.ru\"
-DOTA_PORT=80
-DOTA_PORT=80

#oct22 - violation in Publish/OnMQTTConnect while publish homie info
-DNO_HOMIE
Binary file modified compiled/Mega2560-optiboot/firmware.bin
Binary file not shown.
13,289 changes: 6,692 additions & 6,597 deletions compiled/Mega2560-optiboot/firmware.hex

Large diffs are not rendered by default.

17,944 changes: 9,079 additions & 8,865 deletions compiled/controllino/firmware.hex

Large diffs are not rendered by default.

Binary file modified compiled/due/firmware.bin
Binary file not shown.
Binary file modified compiled/esp32-wifi/firmware.bin
Binary file not shown.
Binary file modified compiled/esp8266-wifi/firmware.bin
Binary file not shown.
Binary file modified compiled/lighthub21/firmware.bin
Binary file not shown.
Binary file modified compiled/m5stack/firmware.bin
Binary file not shown.
17,078 changes: 8,647 additions & 8,431 deletions compiled/mega2560-5100/firmware.hex

Large diffs are not rendered by default.

16,631 changes: 8,423 additions & 8,208 deletions compiled/mega2560-5500/firmware.hex

Large diffs are not rendered by default.

Binary file modified compiled/mega2560slim-5100/firmware.bin
Binary file not shown.
10,941 changes: 5,479 additions & 5,462 deletions compiled/mega2560slim-5100/firmware.hex

Large diffs are not rendered by default.

12,151 changes: 6,091 additions & 6,060 deletions compiled/nrf52840/firmware.hex

Large diffs are not rendered by default.

Binary file modified compiled/stm32-enc2860/firmware.bin
Binary file not shown.
6 changes: 3 additions & 3 deletions lighthub/modules/out_modbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ aJsonObject *templateParamObj = NULL;
int res = -1;

// trying to find parameter in template with name == subItem (NB!! standard suffixes dint working here)
if (subItem && strlen (subItem))
if (subItem && strlen (subItem) && store && store->parameters)

{
templateParamObj = aJson.getObjectItem(store->parameters, subItem);
Expand All @@ -651,12 +651,12 @@ else

// No subitem, trying to find suffix with root item - (Trying to find template parameter where id == suffixCode)
{
templateParamObj = store->parameters->child;
if (store && store->parameters) templateParamObj = store->parameters->child;
bool suffixFinded = false;
while (templateParamObj)
{
aJsonObject *idObj = aJson.getObjectItem(templateParamObj, "id");
if (idObj->type==aJson_Int && idObj->valueint == suffixCode)
if (idObj && idObj->type==aJson_Int && idObj->valueint == suffixCode)
{
res= sendItemCmd(templateParamObj,cmd);
suffixFinded = true;
Expand Down
2 changes: 1 addition & 1 deletion lighthub/modules/out_relay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int out_relay::Ctrl(itemCmd cmd, char* subItem, bool toExecute)
{
debugSerial<<F("relayCtr: ");
cmd.debugOut();
if (! strcmp_P(subItem,action_P)) return 0;
if ((subItem && !strcmp_P(subItem,action_P)) || !item) return 0;
int suffixCode;
if (cmd.isCommand()) suffixCode = S_CMD;
else suffixCode = cmd.getSuffix();
Expand Down
11 changes: 9 additions & 2 deletions lighthub/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,18 @@ itemCmd getNumber(char **chan) {
return val;
}

#if defined(ARDUINO_ARCH_ESP32) || defined(ESP8266)
#if defined(ARDUINO_ARCH_ESP32)
unsigned long freeRam ()
{
return esp_get_free_heap_size();//heap_caps_get_free_size();
//return system_get_free_heap_size();

}
#endif

#if defined(ESP8266)
unsigned long freeRam ()
{
return system_get_free_heap_size();
}
#endif

Expand Down
14 changes: 6 additions & 8 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ default_envs =
[env:nrf52840]
platform = nordicnrf52
board = nrf52840_dk
monitor_baud = 115200
monitor_speed = 115200
;board_build.variant = breakout
;upload_protocol = mbed
;upload_port = /dev/cu.SLAB_USBtoUART
Expand Down Expand Up @@ -118,7 +118,7 @@ lib_deps =
TimerInterrupt_Generic
d00616/arduino-NVM @ ^0.9.1

monitor_speed = 115200


[env:m5stack]
platform = espressif32
Expand All @@ -141,7 +141,7 @@ lib_ignore =
DMXSerial
DmxDue
DueFlashStorage
SD
;SD
SdFat
Ethernet
Ethernet2
Expand Down Expand Up @@ -196,6 +196,7 @@ monitor_filters = esp32_exception_decoder
build_type = debug
board = esp32-evb
extra_scripts = extra_script.py
monitor_speed = 115200

;Comment next 2 lines to disable OTA and allow USB uploading, uncomment for OTA
;upload_protocol = custom
Expand Down Expand Up @@ -258,9 +259,6 @@ lib_deps =
;ESPmDNS
https://github.com/khoih-prog/TimerInterrupt_Generic.git

monitor_speed = 115200



[env:due]
;Experimental target with universal Ethernet Library
Expand Down Expand Up @@ -468,7 +466,7 @@ monitor_speed = 115200
[env:mega2560-5500]
platform = atmelavr
board = megaatmega2560
monitor_baud = 115200
monitor_speed = 115200
framework = arduino
build_flags = !python get_build_flags.py mega2560-5500
lib_ignore =
Expand Down Expand Up @@ -513,7 +511,7 @@ lib_deps =
ArduinoMDNS
https://github.com/khoih-prog/TimerInterrupt_Generic.git

monitor_speed = 115200


[env:esp8266-wifi]
platform = espressif8266
Expand Down

0 comments on commit 39cfb42

Please sign in to comment.