Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next master drop #3151

Merged
merged 78 commits into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
e7c29fe
Lua 5.1 to 5.3 realignement phase 1
TerryE Jul 18, 2019
50b69d8
Add telnet example
TerryE Jul 19, 2019
ce2e50c
Updates following JM review
TerryE Jul 19, 2019
6d81dd6
Rebased against current dev
TerryE Jul 23, 2019
08426e4
Rebased against current dev, tweaks for clean compile
TerryE Jul 23, 2019
9809a60
Add streaming support for hx711 device (#2793)
pjsg Sep 10, 2019
16b2cc5
Revert "Add streaming support for hx711 device (#2793)" (#2914)
marcelstoer Sep 13, 2019
08ea0c8
Remove superfluous module def
marcelstoer Sep 21, 2019
da53d19
Fix invalid smartconfig include
marcelstoer Sep 29, 2019
282ebd1
Deprecate crypto.to{Hex,Base64} (#2929)
nwf Sep 30, 2019
0a453ca
Fix typos
marcelstoer Oct 30, 2019
1759ebb
fix lfs upload issue
Nov 13, 2019
e9199a5
Improve MQTT documentation (#2967)
stromnet Nov 21, 2019
bfcccbf
Improve httpserver documentation (#2971)
HHHartmann Nov 26, 2019
e7be764
Update sensor driver for BME680 to 3.5.9 (#2969)
vsky279 Dec 9, 2019
d4b5b0c
Fixes for `ws2812` and `ws2812_effects` (#2953)
HHHartmann Dec 9, 2019
1b4b442
Streaming support for hx711 (#2915)
marcelstoer Dec 9, 2019
948325a
New `net.if.info` call to show LwIP information (#2862)
nwf Dec 9, 2019
f567220
fixed missing forward declaration (#2975)
glumanda Dec 13, 2019
863dfb5
SSL rampage (#2938)
nwf Dec 27, 2019
db1e445
Initial version of software UART C module (#2673)
galjonsfigur Dec 27, 2019
36df8d0
Add DCC decoder module (#2905)
vsky279 Dec 28, 2019
6926c66
Polish Lua examples (#2846)
galjonsfigur Dec 30, 2019
27e127e
Minor typo and wording fixes (#2991)
mk-pmb Jan 1, 2020
cd9da64
Add CRC check (#2992)
vsky279 Jan 2, 2020
50d88f7
Fix compile warning and set correct order in module LROT (#2996)
galjonsfigur Jan 3, 2020
2ae9af5
Expose CPU CCOUNT register as tmr function (#2906)
fikin Jan 4, 2020
3aba085
Clarify LFS build info is its size (#3022)
mk-pmb Feb 1, 2020
115d0f8
Document tls.cert.auth (#3010)
HHHartmann Feb 1, 2020
fd3f0dd
Add flag to disable start-up banner (#3026)
532910 Feb 9, 2020
d455f8b
Documentation fixes for pipe (#3041)
HHHartmann Feb 18, 2020
1cacd93
Fix timing of softuart module RX (#3029)
galjonsfigur Feb 18, 2020
3e84e07
Update sqlite3.md (#3042)
HHHartmann Feb 21, 2020
446c058
net: rename net.if.info to net.ifinfo (#3033)
nwf Feb 23, 2020
56a86c2
Bugfix conn metatable method call (#3012)
edzius Feb 23, 2020
1719f90
Add Lua module for Gossip protocol (#3013)
alexandruantochi Mar 6, 2020
30f706f
WIP: MQTT fixes (#2986)
nwf Mar 14, 2020
8835512
Fix connect() params in example
marcelstoer Mar 15, 2020
78a0b24
Fix init.lua link
marcelstoer Mar 15, 2020
2c18246
Update getting-started docs hrefs for LFS examples (#3048)
cerasmus Mar 22, 2020
a7debe1
Add hint about locally built docs
marcelstoer Mar 22, 2020
4a78580
Add page about Lua module directory
marcelstoer Mar 22, 2020
af426d0
Networking rampage and accumulated fixes (#3060)
nwf Apr 7, 2020
6499387
add LiquidCrystal lua module (#2974)
Apr 18, 2020
74f9232
mispec: don't use %f
nwf Dec 26, 2019
6ac2750
mispec: don't use uart.write
nwf Dec 26, 2019
9f8c2ae
mqtt: remove dead store
nwf Apr 7, 2020
e1a81aa
net: annotate deliberate case fallthrough
nwf Apr 7, 2020
31c71c0
lua_examples/lfs/HTTP_OTA: move :connect() after :on()
nwf Apr 5, 2020
a7f8564
file: raise error on .on() with non-function/nil
nwf Feb 14, 2020
bf478e0
mqtt: drop LUA_GCSTOP/GCRESTART dance
nwf Apr 5, 2020
fd68000
net: drop LUA_GCSTOP/GCRESTART dance
nwf Apr 5, 2020
efa786d
net.dns: don't calloc a single int
nwf Apr 6, 2020
d480003
tls: fix new verification API
nwf Apr 7, 2020
c8c90fe
app/modules: prune some unnecessary metamethods
nwf Apr 7, 2020
95fc8b1
Correct integer types in BMP085 driver (#3070)
andrmuel Apr 24, 2020
c50b478
HTML for Apple devices to mitigate POST fragmentation (#3069)
HHHartmann Apr 25, 2020
fd26dea
fix #2565 by inverting the grb2hsv argcheck condition (#3076)
Firenox89 Apr 26, 2020
99aba34
#2954: adapt LuaOTA to the new firmware api for the timer and some ot…
adeltc Apr 26, 2020
bbeb09b
Squashed updates do get Lua51 and Lua53 working (#3075)
TerryE Apr 27, 2020
70cad7d
fix liquidcrystal luacheck warnings (#3081)
Apr 29, 2020
cad576a
fix build
HHHartmann Apr 29, 2020
85de656
poor mans link which also works on docker under windows
HHHartmann Apr 30, 2020
c85d5de
Delete espconn.h
HHHartmann Apr 30, 2020
55d0768
resurecting it as regular file
HHHartmann Apr 30, 2020
f90fdcf
Add missing newline
marcelstoer Apr 30, 2020
6e020a1
Add another LFS size value
marcelstoer May 1, 2020
a0864c4
u8g2: Fix name of updateDisplay export (#3093)
ecrips May 9, 2020
7a77d76
net_info module - ping function (#2854)
vsky279 May 10, 2020
7140894
Update hook after updating GPIO bits (#3091)
galjonsfigur May 10, 2020
93c82f1
Fix binary and chunked HTTP downloads (#2985)
HHHartmann May 10, 2020
75f1c64
fix compilation error when disabling startup banner (#3103)
jpeletier May 12, 2020
98e428f
Update wifi..c to fix #3106
TerryE May 15, 2020
a04b085
ws2812_effects deprecation warning
nwf May 26, 2020
544ee81
Updated lua.c to fix #3118 telnet issue
TerryE May 28, 2020
7c53cc7
Deprecate RC module (#3137)
HHHartmann May 31, 2020
f20591a
Lost fix to nodemcu-partition.py (take 2) (#3139)
nwf Jun 1, 2020
8d091c4
Make the telnet example an Lua module (#3133)
marcelstoer Jun 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 18 additions & 2 deletions .gdbinitlua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set pagination off
set print null-stop

define prTS
set $o = &(((TString *)($arg0))->tsv)
set $o = &(((TString *)(($arg0).value))->tsv)
printf "Common header: next = %p, marked = 0x%01x\n", $o->next, $o->marked
printf "String: hash = 0x%08x, len = %u : %s\n", $o->hash, $o->len, (char *)(&$o[1])
printf "String: hash = 0x%08x, len = %u : %s\n", $o->hash, $o->len, (char *)($o+1)
end

define prTnodes
Expand All @@ -24,6 +24,18 @@ define prTnodes
set $i = $i +1
end
end

define prTarray
set $o = (Table *)($arg0)
set $n = $o->sizearray
set $i = 0
while $i < $n
set $nd = ($o->array) + $i
prTV $nd
set $i = $i +1
end
end

define prTV
if $arg0
set $type = ($arg0).tt
Expand Down Expand Up @@ -78,6 +90,10 @@ define prTV
end
if $type == 9
# UserData
set $o = &($val->gc.u.uv)
printf "Common header: next = %p, marked = 0x%01x\n", $o->next, $o->marked
printf "UD = %p Userdata: metatable = ", ($o+1))
print ($o)->metatable
end
if $type == 10
# Thread
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tools/toolchains/
.project
.settings/
.vscode
.vs

#ignore temp file for build infos
buildinfo.h
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ addons:
packages:
- python-serial
- srecord
- luarocks
cache:
- directories:
- cache
Expand All @@ -33,4 +34,5 @@ script:
- echo "checking:"
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 echo
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 $LUACC -p
# - if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck.sh || true ; fi
- if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-linux.sh; fi
- if [ "$OS" = "windows" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-windows.sh; fi
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ ifneq (,$(findstring indows,$(OS)))
else
# It is gcc, may be cygwin
# Can we use -fdata-sections?
CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections
CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections -fpack-struct=4
AR = xtensa-lx106-elf-ar
CC = xtensa-lx106-elf-gcc
CXX = xtensa-lx106-elf-g++
Expand Down
21 changes: 13 additions & 8 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ TARGET = eagle
#FLAVOR = release
FLAVOR = debug

# Handle Lua Directory selector
ifeq ("$(LUA)","53")
LUA_DIR := lua53
else
LUA_DIR := lua
endif

ifndef PDIR # {
GEN_IMAGES= eagle.app.v6.out
GEN_BINS= eagle.app.v6.bin
Expand All @@ -34,16 +41,15 @@ SUBDIRS= \
mbedtls \
platform \
libc \
lua \
$(LUA_DIR) \
lwip \
task \
smart \
modules \
spiffs \
net \
net \
fatfs \
esp-gdbstub \
pm \
pm \
uzlib \
$(OPT_SEL_MKTARGETS)

Expand All @@ -64,10 +70,9 @@ COMPONENTS_eagle.app.v6 = \
user/libuser.a \
crypto/libcrypto.a \
driver/libdriver.a \
platform/libplatform.a \
task/libtask.a \
platform/libplatform.a \
libc/liblibc.a \
lua/liblua.a \
$(LUA_DIR)/liblua.a \
lwip/liblwip.a \
smart/smart.a \
spiffs/spiffs.a \
Expand Down Expand Up @@ -152,7 +157,7 @@ DDEFINES += \
#
# Required for each makefile to inherit from the parent
#
INCLUDES := -I $(PDIR)libc -I $(PDIR)lua -I $(PDIR)platform \
INCLUDES := -I $(PDIR)libc -I $(PDIR)$(LUA_DIR) -I $(PDIR)platform \
$(INCLUDES) -I $(PDIR) -I $(PDIR)include
PDIR := ../$(PDIR)

Expand Down
23 changes: 16 additions & 7 deletions app/coap/endpoints.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,29 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_NOT_FOUND, COAP_CONTENTTYPE_NONE);
}

extern int lua_put_line(const char *s, size_t l);

static const coap_endpoint_path_t path_command = {2, {"v1", "c"}};
static int handle_post_command(const coap_endpoint_t *ep, coap_rw_buffer_t *scratch, const coap_packet_t *inpkt, coap_packet_t *outpkt, uint8_t id_hi, uint8_t id_lo)
{
if (inpkt->payload.len == 0)
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_BAD_REQUEST, COAP_CONTENTTYPE_TEXT_PLAIN);
if (inpkt->payload.len > 0)
{
char line[LUA_MAXINPUT];
if (!coap_buffer_to_string(line, LUA_MAXINPUT, &inpkt->payload) &&
lua_put_line(line, strlen(line))) {
NODE_DBG("\nResult(if any):\n");
system_os_post (LUA_TASK_PRIO, LUA_PROCESS_LINE_SIG, 0);
char line[LUA_MAXINPUT+1];
if (!coap_buffer_to_string(line, LUA_MAXINPUT, &inpkt->payload)) {
lua_State *L = lua_getstate();
int base = lua_gettop(L), n, status;
int l = strlen(line);
line[l++] = '\n';
/* compile and exec payload; any error or results will be left on the stack and printed */
/* TODO: consider returning output as result instead of printing */
luaL_dostring(L, line);
if ((n = lua_gettop(L) - base) > 0)
{
lua_getglobal(L, "print");
lua_insert(L, base);
lua_pcall(L, n, 0, 0);
lua_settop(L, base);
}
}
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_CONTENT, COAP_CONTENTTYPE_TEXT_PLAIN);
}
Expand Down
7 changes: 0 additions & 7 deletions app/crypto/digests.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
#include <strings.h>
#include <errno.h>

#ifdef MD2_ENABLE
#include "ssl/ssl_crypto.h"
#endif

#ifdef SHA2_ENABLE
#include "sha2.h"
#endif
Expand All @@ -60,9 +56,6 @@ typedef char ensure_int_and_size_t_same[(sizeof(int)==sizeof(size_t)) ? 0 : -1];

static const digest_mech_info_t hash_mechs[] ICACHE_RODATA_ATTR =
{
#ifdef MD2_ENABLE
MECH(MD2, _ , MD2_SIZE, 16),
#endif
MECH(MD5, , MD5_DIGEST_LENGTH, 64)
,MECH(SHA1, , SHA1_DIGEST_LENGTH, 64)
#ifdef SHA2_ENABLE
Expand Down
2 changes: 1 addition & 1 deletion app/driver/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ifndef PDIR
GEN_LIBS = libdriver.a
endif

STD_CFLAGS=-std=gnu11 -Wimplicit
STD_CFLAGS=-std=gnu11 -Wimplicit -Wall

#############################################################
# Configuration i.e. compile options etc.
Expand Down
Loading