Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Mar 31, 2021
2 parents 7bc3603 + eddaa0d commit fbe6fec
Show file tree
Hide file tree
Showing 598 changed files with 18,336 additions and 5,498 deletions.
46 changes: 0 additions & 46 deletions .appveyor/build.cmd

This file was deleted.

28 changes: 0 additions & 28 deletions .appveyor/install.cmd

This file was deleted.

22 changes: 6 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

strategy:
fail-fast: false
Expand All @@ -36,11 +36,6 @@ jobs:
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand All @@ -66,15 +61,10 @@ jobs:
- if: matrix.language == 'cpp' || matrix.language == 'c'
name: Build Sming C/C++
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -y
sudo apt-get install gcc-9-multilib g++-9-multilib
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
env
cd Sming
export SMING_HOME=$(pwd)
cd ../samples/Basic_Blink
make SMING_ARCH=Host
sudo Tools/install.sh host
. Tools/export.sh
cd samples/Basic_Blink
make -j3 SMING_ARCH=Host
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ language.settings.xml
nbproject
.*.swp
.vscode
*.code-workspace
GTAGS
GRTAGS
GPATH
Expand Down
24 changes: 22 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
path = Sming/Components/http-parser
url = https://github.com/nodejs/http-parser.git
ignore = dirty
[submodule "IFS"]
path = Sming/Components/IFS
url = https://github.com/mikee47/IFS.git
ignore = dirty
[submodule "libyuarel"]
path = Sming/Components/libyuarel
url = https://github.com/jacketizer/libyuarel.git
Expand All @@ -59,7 +63,7 @@
ignore = dirty
[submodule "rboot"]
path = Sming/Components/rboot/rboot
url = https://github.com/raburton/rboot.git
url = https://github.com/mikee47/rboot
ignore = dirty
[submodule "spiffs"]
path = Sming/Components/spiffs/spiffs
Expand Down Expand Up @@ -89,7 +93,7 @@
ignore = dirty
[submodule "Esp8266.lwip2"]
path = Sming/Arch/Esp8266/Components/lwip2/lwip2
url = https://github.com/d-a-v/esp82xx-nonos-linklayer.git
url = https://github.com/mikee47/esp82xx-nonos-linklayer.git
ignore = dirty
[submodule "Esp8266.new-pwm"]
path = Sming/Arch/Esp8266/Components/driver/new-pwm
Expand Down Expand Up @@ -187,6 +191,14 @@
path = Sming/Libraries/DHTesp
url = https://github.com/beegee-tokyo/DHTesp.git
ignore = dirty
[submodule "Libraries.flatbuffers"]
path = Sming/Libraries/flatbuffers/src
url = https://github.com/google/flatbuffers.git
ignore = dirty
[submodule "Libraries.GoogleCast"]
path = Sming/Libraries/GoogleCast
url = https://github.com/slaff/Sming-GoogleCast.git
ignore = dirty
[submodule "Libraries.HardwareSPI"]
path = Sming/Libraries/HardwareSPI
url = https://github.com/mikee47/HardwareSPI
Expand All @@ -207,6 +219,10 @@
path = Sming/Libraries/libsodium/libsodium
url = https://github.com/jedisct1/libsodium.git
ignore = dirty
[submodule "Libraries.MDNS"]
path = Sming/Libraries/MDNS
url = https://github.com/mikee47/Sming-MDNS
ignore = dirty
[submodule "Libraries.modbusino"]
path = Sming/Libraries/modbusino/modbusino
url = https://github.com/kmihaylov/modbusino.git
Expand All @@ -223,6 +239,10 @@
path = Sming/Libraries/MultipartParser/multipart-parser
url = https://github.com/iafonov/multipart-parser-c.git
ignore = dirty
[submodule "Libraries.nanopb"]
path = Sming/Libraries/nanopb/nanopb
url = https://github.com/nanopb/nanopb.git
ignore = dirty
[submodule "Libraries.RapidXML"]
path = Sming/Libraries/RapidXML
url = https://github.com/mikee47/Sming-RapidXML
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ addons:
update: true
packages:
- xmlstarlet
install: ".travis/install.sh"
script: ".travis/build.sh"
install: "Tools/travis/install.sh"
script: "Tools/travis/build.sh"
deploy:
provider: script
script: ".travis/deploy.sh $TRAVIS_TAG"
script: "Tools/travis/deploy.sh $TRAVIS_TAG"
skip_cleanup: true
on:
tags: true
Expand Down
Binary file removed .travis/tools/esptool2
Binary file not shown.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ __Sming Contributing flow__:

4. Document your code

As a bare minimum, please include a `README.rst` or `README.md` file. See :doc:`/contribute/documentation` for further information.
As a bare minimum, please include a `README.rst` or `README.md` file. See :doc:`/information/develop/documentation` for further information.

5. Commit changes

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ Please note Version 4 documentation is at [sming.readthedocs.io](https://sming.r
* Async TCP and UDP stack based on [LWIP](http://savannah.nongnu.org/projects/lwip/).
* With clients supporting: HTTP, MQTT, WebSockets and SMTP.
* And servers for: DNS, FTP, HTTP(+ WebSockets), Telnet.
* With [SSL support](https://sming.readthedocs.io/en/latest/framework/core/network/ssl.html) for all network clients and servers. Based on [axTLS](http://axtls.sourceforge.net/) and [BearSSL](https://www.bearssl.org/).
* Out of the box support for OTA over HTTPS.
* With [SSL support](https://sming.readthedocs.io/en/latest/_inc/Sming/Components/ssl/index.html) for all network clients and servers. Based on [axTLS](http://axtls.sourceforge.net/) and [BearSSL](https://www.bearssl.org/).
* Over-The-Air(OTA) firmware upgrades via HTTP(S) and MQTT(S).
* ESP8266 specific features.
* Integrated boot loader [rboot](https://sming.readthedocs.io/en/latest/_inc/Sming/Components/rboot/index.html) with support for 1MB ROMs, OTA firmware updating and ROM switching.
* [Crash handlers](https://sming.readthedocs.io/en/latest/information/debugging/index.html) for analyzing/handling system restarts due to fatal errors or WDT resets.
* [Crash handlers](https://sming.readthedocs.io/en/latest/information/debugging.html) for analyzing/handling system restarts due to fatal errors or WDT resets.
* [PWM support](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/driver/index.html) based on [Stefan Bruens PWM](https://github.com/StefanBruens/ESP8266_new_pwm.git).
* Optional [custom heap allocation](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/heap/index.html) based on [Umm Malloc](https://github.com/rhempel/umm_malloc.git).
* Based on Espressif NONOS SDK. Officially suppored NON SDK version is >= 3.0.1.
* Support for a [thin No-Wifi-SDK](https://sming.readthedocs.io/en/latest/_inc/Sming/Arch/Esp8266/Components/esp_no_wifi/index.html). Helpful when a project does not require WiFi (or networking) and reduces code size and memory usage signficantly.
* Linux/Windows features
* Sming has a [host emulator](https://sming.readthedocs.io/en/latest/arch/host/host-emulator.html) that allows libraries and sample applications to be compiled on a Linux/Windows host system and be tested before uploading them to an actual microcontroller.
* Sming has a [host emulator](https://sming.readthedocs.io/en/latest/arch/host/index.html) that allows libraries and sample applications to be compiled on a Linux/Windows host system and be tested before uploading them to an actual microcontroller.

## Compatibility

Expand Down Expand Up @@ -117,7 +117,7 @@ Supported SDK: ESP-IDF v4.1

### Stable

- [Sming V4.2.0](https://github.com/SmingHub/Sming/releases/tag/4.2.0) - great new features, performance and stability improvements.
- [Sming V4.3.0](https://github.com/SmingHub/Sming/releases/tag/4.3.0) - great new features, performance and stability improvements.


### Long Term Support (LTS)
Expand All @@ -136,7 +136,7 @@ git clone https://github.com/SmingHub/Sming.git

## Getting Started

Sming supports multiple architectures. Choose the architecture of your choice to [install the needed development software](https://sming.readthedocs.io/en/latest/getting-started.html) and toolchain(s).
Sming supports multiple architectures. Choose the architecture of your choice to [install the needed development software](https://sming.readthedocs.io/en/latest/getting-started) and toolchain(s).

You can also try Sming without installing anything locally. We have an [interactive tutorial](https://www.katacoda.com/slaff/scenarios/sming-host-emulator) that can be run directly from your browser.

Expand Down Expand Up @@ -196,7 +196,7 @@ Serial.println("Hello Sming! Let's do smart things.");
### Connect to WiFi
```c++
WifiStation.enable(true);
WifiStation.config("LOCAL-NETWORK", "123456789087"); // Put you SSID and Password here
WifiStation.config("LOCAL-NETWORK", "123456789087"); // Put your SSID and password here
```

### Read DHT22 sensor
Expand Down
2 changes: 2 additions & 0 deletions Sming/Arch/Esp32/Components/esp32/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ SDK_PROJECT_PATH := $(COMPONENT_PATH)/project
SDK_CONFIG_DEFAULTS := $(SDK_PROJECT_PATH)/sdkconfig.defaults

SDKCONFIG_MAKEFILE ?= $(SDK_PROJECT_PATH)/sdkconfig
ifeq ($(MAKE_DOCS),)
-include $(SDKCONFIG_MAKEFILE)
endif
export SDKCONFIG_MAKEFILE # sub-makes (like bootloader) will reuse this path

$(SDK_BUILD_BASE) $(SDK_COMPONENT_LIBDIR):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=8192

# Mandatory Sming framework changes
CONFIG_ESP_TIMER_TASK_STACK_SIZE=8192
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=8192

# The bootloader logs all type of messages
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=8192

# Mandatory Sming framework changes
CONFIG_ESP_TIMER_TASK_STACK_SIZE=8192
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=8192

# The bootloader logs only errors
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=
Expand Down
5 changes: 0 additions & 5 deletions Sming/Arch/Esp32/Components/esp32/sdk/partitions/base.csv

This file was deleted.

2 changes: 2 additions & 0 deletions Sming/Arch/Esp32/Components/esp32/src/startup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <Platform/System.h>
#include <driver/hw_timer.h>
#include <driver/uart.h>
#include <Storage.h>

#ifndef ESP32_STACK_SIZE
#define ESP32_STACK_SIZE 16384U
Expand Down Expand Up @@ -63,6 +64,7 @@ void main(void*)
esp_init_flash();
esp_init_wifi();
ets_init_tasks();
Storage::initialize();
System.initialize();
init();

Expand Down
4 changes: 0 additions & 4 deletions Sming/Arch/Esp32/Components/esp_spiffs/README.rst

This file was deleted.

1 change: 0 additions & 1 deletion Sming/Arch/Esp32/Components/esp_spiffs/component.mk

This file was deleted.

37 changes: 0 additions & 37 deletions Sming/Arch/Esp32/Components/esp_spiffs/spiffs_config.c

This file was deleted.

1 change: 0 additions & 1 deletion Sming/Arch/Esp32/Components/sming-arch/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ COMPONENT_DEPENDS := \
driver \
heap \
fatfs \
esp_spiffs \
esp32 \
gdbstub \
esptool
Expand Down
10 changes: 10 additions & 0 deletions Sming/Arch/Esp32/Components/spi_flash/flashmem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <soc/dport_reg.h>
#include <esp_app_format.h>
#include <esp_flash_partitions.h>
#include <esp_flash.h>

/*
* Physical <-> Virtual address mapping is handled in `$IDF_COMPONENTS/spi_flash/flash_mmap.c`.
Expand Down Expand Up @@ -115,3 +116,12 @@ uint32_t flashmem_get_sector_of_address(uint32_t addr)
{
return flashmem_find_sector(addr, NULL, NULL);
}

uint32_t spi_flash_get_id(void)
{
uint32_t id{0};
if(esp_flash_read_id(esp_flash_default_chip, &id) != ESP_OK) {
id = 0;
}
return id;
}
2 changes: 2 additions & 0 deletions Sming/Arch/Esp32/Components/spi_flash/include/esp_spi_flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ uint32_t flashmem_get_sector_of_address(uint32_t addr);

/** @} */

uint32_t spi_flash_get_id(void);

#ifdef __cplusplus
}
#endif
Loading

0 comments on commit fbe6fec

Please sign in to comment.