Skip to content

Commit 206456f

Browse files
committed
Merge remote-tracking branch 'origin/master' into updater-fix-len-calc
2 parents 943fabb + 8dee800 commit 206456f

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

cores/esp8266/esp8266_peri.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ extern volatile uint32_t* const esp8266_gpioToFn[16];
255255
//UART STATUS Registers Bits
256256
#define USTX 31 //TX PIN Level (Doesn't seem to work, always reads as 0 for both uarts. HW bug? Possible workaround: Enable loopback UxC0 |= 1<<UCLBE and read USRXD, see https://github.com/esp8266/Arduino/issues/7256 for discussion.)
257257
#define USRTS 30 //RTS PIN Level
258-
#define USDTR 39 //DTR PIN Level
258+
#define USDTR 29 //DTR PIN Level
259259
#define USTXC 16 //TX FIFO COUNT (8bit)
260260
#define USRXD 15 //RX PIN Level
261261
#define USCTS 14 //CTS PIN Level

tests/host/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,10 @@ ssl: # download source and build BearSSL
374374
cd ../../tools/sdk/ssl && $(MAKE) native$(N32)
375375

376376
ULIBPATHS = $(shell echo $(ULIBDIRS) | sed 's,:, ,g')
377-
USERLIBDIRS = $(shell test -z "$(ULIBPATHS)" || for d in $(ULIBPATHS); do for dd in $$d $$d/src $$d/src/libmad; do test -d $$dd && { echo -I$$dd; echo "userlib: using directory '$$dd'" 1>&2; } done; done)
378-
USERLIBSRCS = $(shell test -z "$(ULIBPATHS)" || for d in $(ULIBPATHS); do for ss in $$d/*.cpp $$d/src/*.cpp $$d/src/libmad/*.c; do test -r $$ss && echo $$ss; done; done)
379-
INC_PATHS += $(USERLIBDIRS)
377+
USERLIBDIRS = $(shell test -z "$(ULIBPATHS)" || for d in $(ULIBPATHS); do for dd in $$d $$d/utility $$d/src $$d/src/utility; do test -d $$dd && echo $$dd; done; done)
378+
USERLIBSRCS := $(shell test -z "$(USERLIBDIRS)" || for d in $(USERLIBDIRS); do for ss in $$d/*.c $$d/*.cpp; do test -r $$ss && echo $$ss; done; done)
379+
USERLIBINCS = $(shell for d in $(USERLIBDIRS); do echo -I$$d; done)
380+
INC_PATHS += $(USERLIBINCS)
380381
INC_PATHS += -I$(INODIR)/..
381382
CPP_OBJECTS_CORE_EMU = $(CPP_SOURCES_CORE_EMU:.cpp=.cpp.o) $(USERLIBSRCS:.cpp=.cpp.o) $(USERCXXSOURCES:.cpp=.cpp.o)
382383
C_OBJECTS_CORE_EMU = $(USERCSOURCES:.c=.c.o)

tests/host/common/ArduinoMain.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,14 @@ static int mock_stop_uart(void)
115115

116116
static uint8_t mock_read_uart(void)
117117
{
118-
uint8_t ch = 0;
119-
return (read(STDIN, &ch, 1) == 1) ? ch : 0;
118+
uint8_t ch = 0;
119+
int ret = read(STDIN, &ch, 1);
120+
if (ret == -1)
121+
{
122+
perror("read(STDIN,1)");
123+
return 0;
124+
}
125+
return (ret == 1) ? ch : 0;
120126
}
121127

122128
void help(const char* argv0, int exitcode)

tests/host/common/MockWiFiServerSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ bool WiFiServer::hasClient()
129129

130130
void WiFiServer::close()
131131
{
132-
if (pcb2int(_listen_pcb) >= 0)
132+
if (pcb2int(_listen_pcb) >= 3) // 0=stdin 1=stdout 2=stderr
133133
::close(pcb2int(_listen_pcb));
134134
_listen_pcb = int2pcb(-1);
135135
}

tests/host/sys/pgmspace.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ inline int vsnprintf_P(char* str, size_t size, const char* format, va_list ap)
7575
#define memmove_P memmove
7676
#define strncpy_P strncpy
7777
#define strcmp_P strcmp
78+
#define strcasecmp_P strcasecmp
7879
#define memccpy_P memccpy
7980
#define snprintf_P snprintf
8081
#define sprintf_P sprintf
8182
#define strncmp_P strncmp
83+
#define strncasecmp_P strncasecmp
8284
#define strcat_P strcat
8385

8486
#endif

tools/platformio-build.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ def scons_patched_match_splitext(path, suffixes=None):
5959
gzip_switch = ["--gzip", "PIO"]
6060

6161
env.Append(
62-
ASFLAGS=["-x", "assembler-with-cpp"],
62+
ASFLAGS=[
63+
"-mlongcalls",
64+
"-mtext-section-literals",
65+
],
66+
ASPPFLAGS=[
67+
"-x", "assembler-with-cpp",
68+
],
6369

6470
# General options that are passed to the C compiler (C only; not C++)
6571
CFLAGS=[
@@ -78,7 +84,6 @@ def scons_patched_match_splitext(path, suffixes=None):
7884
"-mtext-section-literals",
7985
"-falign-functions=4",
8086
"-U__STRICT_ANSI__",
81-
"-D_GNU_SOURCE",
8287
"-ffunction-sections",
8388
"-fdata-sections",
8489
"-Wall",
@@ -119,6 +124,7 @@ def scons_patched_match_splitext(path, suffixes=None):
119124
("F_CPU", "$BOARD_F_CPU"),
120125
"__ets__",
121126
"ICACHE_FLASH",
127+
"_GNU_SOURCE",
122128
("ARDUINO", 10805),
123129
("ARDUINO_BOARD", '\\"PLATFORMIO_%s\\"' % env.BoardConfig().id.upper()),
124130
"FLASHMODE_${BOARD_FLASH_MODE.upper()}",
@@ -166,9 +172,6 @@ def scons_patched_match_splitext(path, suffixes=None):
166172
)
167173
)
168174

169-
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
170-
env.Append(ASFLAGS=env.get("CCFLAGS", [])[:])
171-
172175
flatten_cppdefines = env.Flatten(env['CPPDEFINES'])
173176

174177
#

0 commit comments

Comments
 (0)