diff --git a/Sming/Arch/Esp8266/Components/libc/README.rst b/Sming/Arch/Esp8266/Components/libc/README.rst index c19afff410..da7461217b 100644 --- a/Sming/Arch/Esp8266/Components/libc/README.rst +++ b/Sming/Arch/Esp8266/Components/libc/README.rst @@ -4,4 +4,4 @@ Esp8266 LIBC Component .. highlight:: bash This Component supports integration of the standard C library provided by the compiler toolchain. -See also :doc:`/arch/esp8266/getting-started/eqt`. +See also :ref:`esp_quick_toolchain`. diff --git a/Sming/Arch/Esp8266/README.rst b/Sming/Arch/Esp8266/README.rst index d2611da48a..42b07b2425 100644 --- a/Sming/Arch/Esp8266/README.rst +++ b/Sming/Arch/Esp8266/README.rst @@ -5,7 +5,7 @@ Support building Sming for the Esp8266 architecture. This is the SOC for which Sming was originally developed, so many of the low-level API calls reflect those in the -`SDK `. +:doc:`SDK `. These include functions such as :c:func:`system_get_free_heap_size`, :c:func:`system_update_cpu_freq`, @@ -17,6 +17,20 @@ The Esp8266 is the device which popularised 32-bit microcontrollers with integrated WiFi capability, the so-called `System on a chip `__ (SoC). + +Features +-------- + +- Integrated boot loader :component:`rboot` with support for 1MB ROMs, OTA firmware updating and ROM switching. +- :doc:`Crash handlers ` for analyzing/handling system restarts due to fatal errors or WDT resets. +- :component-esp8266:`PWM support ` based on `Stefan Bruens PWM `__. +- Optional :component-esp8266:`custom heap allocation ` based on `Umm Malloc `__. +- Based on :component-esp8266:`Espressif NONOS SDK Version 3 `. + + +Characteristics +--------------- + Compared with more recent offerings such as the :doc:`ESP32 ` and :doc:`RP2040 `, @@ -43,6 +57,31 @@ Weak hardware peripheral support hardware support for interfaces such as I2C and PWM is lacking and these must be implemented in software. +.. _esp_quick_toolchain: + +ESP Quick Toolchain +------------------- + +In Sming 4.0.1 support was added for the `ESP Quick Toolchain `__. +This is the required toolchain for compiling Sming for the Esp8266. + +At time of writing the current release is +`3.0.0-newlib4.0.0-gnu20 `__ +for `GCC 10.2 `__. + +The toolchain is consistent across development platforms which also use the +standard C/C++ `NewLib `__ +runtime libraries. + + +Installation +------------ + +The easiest way to get started is with the Sming installer - see :doc:`/getting-started/index`. + +- Linux and MacOS: ``Tools/install.sh esp8266``. +- Windows: ``Tools\install esp8266``. + Configuration Variables ----------------------- @@ -50,7 +89,12 @@ Configuration Variables .. envvar:: ESP_HOME This contains the base directory for the toolchain used to build the framework. - See also :doc:`/arch/esp8266/getting-started/eqt`. + See :ref:`esp_quick_toolchain`. + + The Sming installer extracts the toolchain to: + + - ``/opt/esp-quick-toolchain`` for linux and MadOS + - ``C:\tools\esp-quick-toolchain`` for Windows Components diff --git a/Sming/Arch/Esp8266/build.mk b/Sming/Arch/Esp8266/build.mk index fc536c810e..583dbf63cd 100644 --- a/Sming/Arch/Esp8266/build.mk +++ b/Sming/Arch/Esp8266/build.mk @@ -33,8 +33,6 @@ OBJDUMP := $(TOOLSPEC)objdump NM := $(TOOLSPEC)nm GDB := $(TOOLSPEC)gdb -GCC_UPGRADE_URL := https://sming.readthedocs.io/en/latest/arch/esp8266/getting-started/eqt.html - CPPFLAGS += \ -nostdlib \ -mlongcalls \ diff --git a/Sming/Arch/Host/README.rst b/Sming/Arch/Host/README.rst index 8380b64c43..dd47bcb677 100644 --- a/Sming/Arch/Host/README.rst +++ b/Sming/Arch/Host/README.rst @@ -3,12 +3,18 @@ Sming Host Emulator .. highlight:: bash +Sming allows most libraries and sample applications to be compiled on a Linux/MacOs/Windows +development system and be tested before uploading them to the microcontroller. + +If you want to try it we have an +`interactive tutorial `__ +that can be run directly from your browser. + +For installation details see :doc:`/getting-started/index`. + Summary ------- -Allows Sming applications to be built as an executable to run on the -development host (Windows, Linux or MacOS). - This is a source-level emulator for developing and testing new framework code prior to flashing a real device. diff --git a/Sming/Arch/Host/build.mk b/Sming/Arch/Host/build.mk index 9b8d9daf13..6d3fbdca78 100644 --- a/Sming/Arch/Host/build.mk +++ b/Sming/Arch/Host/build.mk @@ -40,8 +40,6 @@ endif GDB := $(TOOLSPEC)gdb -GCC_UPGRADE_URL := https://sming.readthedocs.io/en/latest/arch/host/host-emulator.html\#c-c-32-bit-compiler-and-libraries - BUILD_VARS += BUILD64 ifeq ($(UNAME),Darwin) BUILD64 := 1 diff --git a/Sming/build.mk b/Sming/build.mk index afd13dfce3..9b8d4c7c37 100644 --- a/Sming/build.mk +++ b/Sming/build.mk @@ -290,7 +290,7 @@ DEBUG_VARS += SMING_C_STD SMING_C_STD ?= c11 CFLAGS += -std=$(SMING_C_STD) -# Select C++17 if supported, defaulting to C++11 otherwise +# C++17 is minimum required standard DEBUG_VARS += SMING_CXX_STD SMING_CXX_STD ?= c++17 CXXFLAGS += -std=$(SMING_CXX_STD) @@ -299,10 +299,9 @@ COMPILER_VERSION_MAJOR := $(firstword $(subst ., ,$(COMPILER_VERSION))) COMPILER_VERSION_COMPATIBLE := $(shell expr $(COMPILER_VERSION_MAJOR) \>= $(COMPILER_VERSION_MIN)) ifeq ($(COMPILER_VERSION_COMPATIBLE),0) -ifneq ($(GCC_UPGRADE_URL),) -$(info Instructions for upgrading your compiler can be found here: $(GCC_UPGRADE_URL)) -endif -$(error Please upgrade your compiler to $(COMPILER_NAME) $(COMPILER_VERSION_MIN) or newer) +$(info Please upgrade your compiler to $(COMPILER_NAME) $(COMPILER_VERSION_MIN) or newer) +$(info See https://sming.readthedocs.io/en/latest/getting-started/index.html) +$(error .) endif endif diff --git a/Sming/building.rst b/Sming/building.rst index 993ecc15ce..8406d7edfe 100644 --- a/Sming/building.rst +++ b/Sming/building.rst @@ -75,8 +75,8 @@ These are the main variables you need to be aware of: The build standard applied for the framework. - This defaults to C++17 if the toolchain supports it (GCC 5+), C++11 otherwise. - You can override to use other standards, such as ``c++2a`` for experimental C++20 support. + C++17 is the minimum required standard. + You can override to use other standards, such as ``c++20``. These variables are available for application use: diff --git a/docs/source/about.rst b/docs/source/about.rst index 16181171fd..40a75470af 100644 --- a/docs/source/about.rst +++ b/docs/source/about.rst @@ -8,7 +8,7 @@ Sming is an open-source asynchronous C++ embedded framework with networking supp and is designed to be reliable, responsive and modular. The project was started in 2015 for the Esp8266 and has since been adapted to other devices, -including a :doc:`host emulator ` for advanced development and debugging. +including a :doc:`host emulator ` for advanced development and debugging. The framework is actively developed and has an extensive suite of integration tests. diff --git a/docs/source/arch/esp8266/getting-started/eqt.rst b/docs/source/arch/esp8266/getting-started/eqt.rst deleted file mode 100644 index 67060ef6fa..0000000000 --- a/docs/source/arch/esp8266/getting-started/eqt.rst +++ /dev/null @@ -1,31 +0,0 @@ -ESP Quick Toolchain -=================== - -Introduction ------------- - -In Sming 4.0.1 support was added for the `ESP Quick Toolchain `__. - -At time of writing the current release is -`3.0.0-newlib4.0.0-gnu20 `__ -for `GCC 10.2 `__. - -This also updates the runtime libraries (`NewLib `__) -to version 2.2 with integrated PROGMEM handling code. - -The new toolchain is consistent across development platforms and adds support for the latest compiler features, -as discussed in `What are the new features in C++17? `__. - -Installation ------------- - -The toolchains are currently at pre-release, available `here `__. - -Tested versions are available at `SmingTools `. - -Extract the toolchain to a suitable location, such as: - -* ``/opt/esp-quick-toolchain`` -* ``C:\tools\esp-quick-toolchain`` - -and set :envvar:`ESP_HOME` accordingly. diff --git a/docs/source/arch/host/index.rst b/docs/source/arch/host/index.rst deleted file mode 100644 index 85a372a44e..0000000000 --- a/docs/source/arch/host/index.rst +++ /dev/null @@ -1,15 +0,0 @@ -Host Emulator -============= - -.. highlight:: bash - -Sming allows most libraries and sample applications to be compiled on a Linux/MacOs/Windows -development system and be tested before uploading them to the microcontroller. - -If you want to try it we have an -`interactive tutorial `__ -that can be run directly from your browser. - -For installation details see :doc:`/getting-started/index`. - -For full details see :doc:`/_inc/Sming/Arch/Host/README`. diff --git a/docs/source/index.rst b/docs/source/index.rst index a1a9b0888a..20ca4cb497 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -22,7 +22,7 @@ Summary ------- - Superb performance and memory usage: Sming compiles to native firmware! - Fast and user-friendly C++ development -- Integrated :doc:`host emulator ` to assist with developing, testing and debugging +- Integrated :doc:`host emulator ` to assist with developing, testing and debugging libraries and applications on a PC. It even includes networking support! Try it out online `here `__. - Built-in powerful wireless modules @@ -65,18 +65,6 @@ Summary - :library:`GoogleCast` library allows control of ChromeCast devices or smart TVs supporting the GoogleCast protocol. - :library:`HueEmulator` provides simple way to implement devices compatible with Amazon Alexa. -- ESP8266 features - - - Integrated boot loader :component:`rboot` with support for 1MB ROMs, OTA firmware updating and ROM switching. - - :doc:`Crash handlers ` for analyzing/handling system restarts due to fatal errors or WDT resets. - - :component-esp8266:`PWM support ` based on `Stefan Bruens PWM `__. - - Optional :component-esp8266:`custom heap allocation ` based on `Umm Malloc `__. - - Based on :component-esp8266:`Espressif NONOS SDK Version 3 `. - -- ESP32 features - - - Based on :component-esp32:`ESP IDF SDK ` - .. toctree:: :caption: Contents: diff --git a/docs/source/information/develop/components.rst b/docs/source/information/develop/components.rst index 8f9d0c0e20..8682c096ec 100644 --- a/docs/source/information/develop/components.rst +++ b/docs/source/information/develop/components.rst @@ -84,7 +84,7 @@ Supported architectures Unless there are specific reasons not to do so, Components should work on all supported architectures. In particular, it should build and run under the -:doc:`Host Emulator `. +:doc:`Host Emulator `. In order to do this, you should remove any low-level code from the library by: diff --git a/docs/source/upgrading/4.4-4.5.rst b/docs/source/upgrading/4.4-4.5.rst index 800cb30d2a..8e18033a3b 100644 --- a/docs/source/upgrading/4.4-4.5.rst +++ b/docs/source/upgrading/4.4-4.5.rst @@ -27,7 +27,7 @@ For more information read the updated :doc:`/tools/eclipse`. Esp8266 toolchain ----------------- -Sming now requires the :doc:`/arch/esp8266/getting-started/eqt` for building. +Sming now requires the :ref:`esp_quick_toolchain` for building. Support for the old legacy toolchains (ESP open SDK, UDK) have been dropped. They may still work but are no longer tested.