-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial restructure to support multiple target architectures (#1675)
As per discussion #1333. Rearrange files and fix #includes: * Rename `SmingCore` -> `Core` * Rename `SmingCore/Platform` -> `Platform` * Rename `system` -> `System` * Move `Services/libb64` -> `Components` * Move `Services/WebHelpers` -> `Core/Network` * Remove `apptest` * Move Esp8266-specific code: * Move most `Platform` sources -> `Arch/Esp8266/Platform` * Move some `SmingCore` sources -> `Arch/Esp2866/Core` * Rename `compiler` -> `Arch/Esp8266/Compiler` * Rename `tools` -> `Arch/Esp8266/Tools` * Move `SmingCore/Network/rBootHttpUpdate` -> `Arch/Esp2866/Core/Network` * Move `custom_heap` -> `Arch/Esp8266/Components` * Move some of `system` files -> `Arch/Esp8266/Components/esp8266` (reflects IDF layout) * Rename `appinit/user_main.cpp` -> `Arch/Esp8266/Components/esp8266/startup.cpp` * Rename `gdb` -> `Arch/Esp8266/Components/gdbstub` * Rename `appspecific/gdb` -> `Arch/Esp8266/Components/gdbstub/appcode` * Rename `Services/FATFS` -> `Arch/Esp8266/Components/fatfs` * Move `system/include/rboot-integration.h`, `appspecific/rboot/overrides.c` -> `Arch/Esp8266/Components/rboot/appcode` * Rename `Services/SpifFS` -> `Arch/Esp8266/Components/spiffs` * Move `include/user_config.h` -> `Arch/Esp8266/System/include` Makefile revisions * Remove `Makefile-project.mk` * Rename `Makefile-rboot.mk` -> `Makefile-app.mk` * Retain `Makefile-rboot.mk` (redirects to `Makefile-app.mk`) for backward compatibility * Separate common script used by both Sming and App * `build.mk` contains host environment setup * Add directory definitions `ARCH_BASE`, `ARCH_SYS`, `ARCH_CORE`, `ARCH_COMPONENTS` and `ARCH_TOOLS` * `modules.mk` contains rule creation script * Separate-out ESP8266-specific script: * `Arch/*/build.mk` included by `build.mk` file * `Arch/*/sming.mk` included by `Makefile` * `Arch/*/app.mk` included by `Makefile-app.mk` * Change build output directory to `Arch/*/out` * Pull related variable definitions and rules together * Define macros to replace repetitive script: endeavour to name files or directories once only * Ignore errors in all clean operations * Use `TOOLS`, `TOOLS_CLEAN` and `CLEAN` variables containing pre-requisites for `tools`, `tools-clean` and `clean` targets * Simplify user library building by adding to `LIBS`, each library gets an additional shorthand make target e.g. `make axtls`. * Distribute PHONY declarations * Add `decode-stacktrack` rule to application makefile * Add `help` target to extract formatted makefile comments * Add `list-config` target Submodule handling * third-party libraries: `rBoot`, `new-pwm`, `axtls-8266`, `umm_malloc`, `esp-open-lwip`, `lwip2` -> `Arch/Esp8266/Components` * Move `.patch` file into related submodule parent directory * Internal SDK moved into `Components/Sdk` and updated to use unpatched Version 3.0 release * Move remaining `third-party` submodules into `Components` * Revise Makefiles so that only those submodules required for a build are updated/patched and built * Add `SUBMODULES` variable to specify which submodules are required * Use `.submodule` file as consistent pre-requisite for update/patching of all submodules * Make `ARDUINO_LIBRARIES` a public variable to optionally restrict which libraries get loaded and built * Add `submodules` and `submodules-clean` rules to replace `third-party` and `libraries` rules Other * Add `building.md` * Add help documentation to makefiles, with new `help` and `list-config` targets * Update coding style directories and Travis checks * Update Doxygen directories Fixes: * Add `libpwm_open` to `CUSTOM_TARGETS` so it builds with framework Bugs found: * Testing with `ENABLE_CUSTOM_LWIP=0` fails because of static definitions in `mem_manager.h` - also happens with existing build
- Loading branch information
Showing
424 changed files
with
7,640 additions
and
8,476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,100 @@ | ||
[submodule "Sming/third-party/rboot"] | ||
path = Sming/third-party/rboot | ||
url = https://github.com/raburton/rboot.git | ||
ignore = dirty | ||
[submodule "Sming.wiki"] | ||
path = docs/wiki | ||
url = https://github.com/SmingHub/Sming.wiki.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/pwm"] | ||
path = Sming/third-party/pwm | ||
[submodule "spiffs"] | ||
path = Sming/Components/spiffs | ||
url = https://github.com/pellepl/spiffs.git | ||
ignore = dirty | ||
[submodule "http-parser"] | ||
path = Sming/Components/http-parser | ||
url = https://github.com/nodejs/http-parser.git | ||
ignore = dirty | ||
[submodule "ws_parser"] | ||
path = Sming/Components/ws_parser | ||
url = https://github.com/charliesome/ws_parser.git | ||
ignore = dirty | ||
[submodule "mqtt-codec"] | ||
path = Sming/Components/mqtt-codec | ||
url = https://github.com/slaff/mqtt-codec.git | ||
ignore = dirty | ||
[submodule "libyuarel"] | ||
path = Sming/Components/libyuarel | ||
url = https://github.com/jacketizer/libyuarel.git | ||
ignore = dirty | ||
|
||
[submodule "ESP8266.rboot"] | ||
path = Sming/Arch/Esp8266/Components/rboot/rboot | ||
url = https://github.com/raburton/rboot.git | ||
ignore = dirty | ||
[submodule "ESP8266.new-pwm"] | ||
path = Sming/Arch/Esp8266/Components/pwm/new-pwm | ||
url = https://github.com/StefanBruens/ESP8266_new_pwm.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/axtls-8266"] | ||
path = Sming/third-party/axtls-8266 | ||
ignore = dirty | ||
[submodule "ESP8266.axtls-8266"] | ||
path = Sming/Arch/Esp8266/Components/axtls-8266/axtls-8266 | ||
url = https://github.com/igrr/axtls-8266.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/spiffs"] | ||
path = Sming/third-party/spiffs | ||
url = https://github.com/pellepl/spiffs.git | ||
[submodule "Sming/third-party/umm_malloc"] | ||
path = Sming/third-party/umm_malloc | ||
ignore = dirty | ||
[submodule "ESP8266.umm_malloc"] | ||
path = Sming/Arch/Esp8266/Components/custom_heap/umm_malloc | ||
url = https://github.com/rhempel/umm_malloc.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/esp-open-lwip"] | ||
path = Sming/third-party/esp-open-lwip | ||
[submodule "ESP8266.esp-open-lwip"] | ||
path = Sming/Arch/Esp8266/Components/esp-open-lwip/esp-open-lwip | ||
url = https://github.com/pfalcon/esp-open-lwip.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/http-parser"] | ||
path = Sming/third-party/http-parser | ||
url = https://github.com/nodejs/http-parser.git | ||
[submodule "ESP8266.lwip2"] | ||
path = Sming/Arch/Esp8266/Components/lwip2/lwip2 | ||
url = https://github.com/d-a-v/esp82xx-nonos-linklayer.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/ws_parser"] | ||
path = Sming/third-party/ws_parser | ||
url = https://github.com/charliesome/ws_parser.git | ||
|
||
[submodule "ESP8266.Sdk"] | ||
path = Sming/Arch/Esp8266/Components/Sdk/ESP8266_NONOS_SDK | ||
url = https://github.com/espressif/ESP8266_NONOS_SDK.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/Adafruit_ST7735"] | ||
[submodule "ESP8266.esptool2"] | ||
path = Sming/Arch/Esp8266/Tools/esptool2 | ||
url = https://github.com/raburton/esptool2.git | ||
ignore = dirty | ||
|
||
[submodule "Libraries.Adafruit_ST7735"] | ||
path = Sming/Libraries/Adafruit_ST7735 | ||
url = https://github.com/adafruit/Adafruit-ST7735-Library.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/Adafruit_SSD1306"] | ||
[submodule "Libraries.Adafruit_SSD1306"] | ||
path = Sming/Libraries/Adafruit_SSD1306 | ||
url = https://github.com/adafruit/Adafruit_SSD1306.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/Adafruit_BME280_Library"] | ||
[submodule "Libraries.Adafruit_BME280_Library"] | ||
path = Sming/Libraries/Adafruit_BME280_Library | ||
url = https://github.com/adafruit/Adafruit_BME280_Library.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/Adafruit_Sensor"] | ||
[submodule "Libraries.Adafruit_Sensor"] | ||
path = Sming/Libraries/Adafruit_Sensor | ||
url = https://github.com/adafruit/Adafruit_Sensor | ||
ignore = dirty | ||
[submodule "Sming/third-party/lwip2"] | ||
path = Sming/third-party/lwip2 | ||
url = https://github.com/d-a-v/esp82xx-nonos-linklayer.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/ESP8266_NONOS_SDK"] | ||
path = Sming/third-party/ESP8266_NONOS_SDK | ||
url = https://github.com/espressif/ESP8266_NONOS_SDK.git | ||
ignore = dirty | ||
[submodule "tools/esptool2"] | ||
path = tools/esptool2 | ||
url = https://github.com/raburton/esptool2.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/RingBufCPP"] | ||
[submodule "Libraries.RingBufCPP"] | ||
path = Sming/Libraries/RingBufCPP | ||
url = https://github.com/wizard97/Embedded_RingBuf_CPP.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/IR"] | ||
[submodule "Libraries.IR"] | ||
path = Sming/Libraries/IR | ||
url = https://github.com/markszabo/IRremoteESP8266.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/DHTesp"] | ||
[submodule "Libraries.DHTesp"] | ||
path = Sming/Libraries/DHTesp | ||
url = https://github.com/beegee-tokyo/DHTesp.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/ITEADLIB_Arduino_Nextion"] | ||
[submodule "Libraries.ITEADLIB_Arduino_Nextion"] | ||
path = Sming/Libraries/ITEADLIB_Arduino_Nextion | ||
url = https://github.com/itead/ITEADLIB_Arduino_Nextion.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/DFRobotDFPlayerMini"] | ||
[submodule "Libraries.DFRobotDFPlayerMini"] | ||
path = Sming/Libraries/DFRobotDFPlayerMini | ||
url = https://github.com/DFRobot/DFRobotDFPlayerMini.git | ||
ignore = dirty | ||
[submodule "Sming/Libraries/TM1637"] | ||
[submodule "Libraries.TM1637"] | ||
path = Sming/Libraries/TM1637 | ||
url = https://github.com/avishorp/TM1637.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/mqtt-codec"] | ||
path = Sming/third-party/mqtt-codec | ||
url = https://github.com/slaff/mqtt-codec.git | ||
ignore = dirty | ||
[submodule "Sming/third-party/libyuarel"] | ||
path = Sming/third-party/libyuarel | ||
url = https://github.com/jacketizer/libyuarel.git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Submodule ESP8266_NONOS_SDK
added at
e4434a
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Sming/system/esp_cplusplus.cpp → ...8266/Components/esp8266/esp_cplusplus.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 61 additions & 64 deletions
125
Sming/system/include/esp_wifi_sniffer.h → ...onents/esp8266/include/esp_wifi_sniffer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,61 @@ | ||
/* | ||
* esp_promiscuous.h | ||
* | ||
* Internal structures for decoding WiFi in promiscuous mode | ||
* | ||
* See ESP8266 Technical Reference, Chapter 14: Sniffer Introduction | ||
*/ | ||
|
||
#ifndef _ESP_WIFI_SNIFFER_H_ | ||
#define _ESP_WIFI_SNIFFER_H_ | ||
|
||
#include <user_config.h> | ||
|
||
/* ============================================== | ||
Promiscous callback structures, see ESP manual | ||
============================================== */ | ||
struct RxControl { | ||
signed rssi : 8; | ||
unsigned rate : 4; | ||
unsigned is_group : 1; | ||
unsigned : 1; | ||
unsigned sig_mode : 2; | ||
unsigned legacy_length : 12; | ||
unsigned damatch0 : 1; | ||
unsigned damatch1 : 1; | ||
unsigned bssidmatch0 : 1; | ||
unsigned bssidmatch1 : 1; | ||
unsigned MCS : 7; | ||
unsigned CWB : 1; | ||
unsigned HT_length : 16; | ||
unsigned Smoothing : 1; | ||
unsigned Not_Sounding : 1; | ||
unsigned : 1; | ||
unsigned Aggregation : 1; | ||
unsigned STBC : 2; | ||
unsigned FEC_CODING : 1; | ||
unsigned SGI : 1; | ||
unsigned rxend_state : 8; | ||
unsigned ampdu_cnt : 8; | ||
unsigned channel : 4; | ||
unsigned : 12; | ||
}; | ||
|
||
struct LenSeq { | ||
uint16_t length; | ||
uint16_t seq; | ||
uint8_t address3[6]; | ||
}; | ||
|
||
struct sniffer_buf { | ||
struct RxControl rx_ctrl; | ||
uint8_t buf[36]; | ||
uint16_t cnt; | ||
struct LenSeq lenseq[1]; | ||
}; | ||
|
||
struct sniffer_buf2 { | ||
struct RxControl rx_ctrl; | ||
uint8_t buf[112]; | ||
uint16_t cnt; | ||
uint16_t len; | ||
}; | ||
|
||
#endif /* _ESP_WIFI_SNIFFER_H_ */ | ||
/* | ||
* esp_promiscuous.h | ||
* | ||
* Internal structures for decoding WiFi in promiscuous mode | ||
* | ||
* See ESP8266 Technical Reference, Chapter 14: Sniffer Introduction | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <user_config.h> | ||
|
||
/* ============================================== | ||
Promiscous callback structures, see ESP manual | ||
============================================== */ | ||
struct RxControl { | ||
signed rssi : 8; | ||
unsigned rate : 4; | ||
unsigned is_group : 1; | ||
unsigned : 1; | ||
unsigned sig_mode : 2; | ||
unsigned legacy_length : 12; | ||
unsigned damatch0 : 1; | ||
unsigned damatch1 : 1; | ||
unsigned bssidmatch0 : 1; | ||
unsigned bssidmatch1 : 1; | ||
unsigned MCS : 7; | ||
unsigned CWB : 1; | ||
unsigned HT_length : 16; | ||
unsigned Smoothing : 1; | ||
unsigned Not_Sounding : 1; | ||
unsigned : 1; | ||
unsigned Aggregation : 1; | ||
unsigned STBC : 2; | ||
unsigned FEC_CODING : 1; | ||
unsigned SGI : 1; | ||
unsigned rxend_state : 8; | ||
unsigned ampdu_cnt : 8; | ||
unsigned channel : 4; | ||
unsigned : 12; | ||
}; | ||
|
||
struct LenSeq { | ||
uint16_t length; | ||
uint16_t seq; | ||
uint8_t address3[6]; | ||
}; | ||
|
||
struct sniffer_buf { | ||
struct RxControl rx_ctrl; | ||
uint8_t buf[36]; | ||
uint16_t cnt; | ||
struct LenSeq lenseq[1]; | ||
}; | ||
|
||
struct sniffer_buf2 { | ||
struct RxControl rx_ctrl; | ||
uint8_t buf[112]; | ||
uint16_t cnt; | ||
uint16_t len; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.