Skip to content

Commit 1e44481

Browse files
Merge branch 'master' into webserver-template
2 parents 777e8d7 + 96cfdb3 commit 1e44481

File tree

9 files changed

+61
-13
lines changed

9 files changed

+61
-13
lines changed

doc/filesystem.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,18 @@ Uploading files to file system
107107
menu item to *Tools* menu for uploading the contents of sketch data
108108
directory into ESP8266 flash file system.
109109

110-
- Download the tool: https://github.com/esp8266/arduino-esp8266fs-plugin/releases/download/0.3.0/ESP8266FS-0.3.0.zip.
110+
**Warning**: Due to the move from the obsolete esptool-ck.exe to the
111+
supported esptool.py upload tool, upgraders from pre 2.5.1 will need to
112+
update the ESP8266FS tool referenced below to 0.4.0 or later. Prior versions
113+
will fail with a "esptool not found" error because they don't know how to
114+
use esptool.py.
115+
116+
- Download the tool: https://github.com/esp8266/arduino-esp8266fs-plugin/releases/download/0.4.0/ESP8266FS-0.4.0.zip
111117
- In your Arduino sketchbook directory, create ``tools`` directory if
112118
it doesn't exist yet
113119
- Unpack the tool into ``tools`` directory (the path will look like
114120
``<home_dir>/Arduino/tools/ESP8266FS/tool/esp8266fs.jar``)
121+
If upgrading, overwrite the existing JAR file with the newer version.
115122
- Restart Arduino IDE
116123
- Open a sketch (or create a new one and save it)
117124
- Go to sketch directory (choose Sketch > Show Sketch Folder)

tests/host/sys/pgmspace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
#define pgm_read_word(addr) (*reinterpret_cast<const uint16_t*>(addr))
3232
#define pgm_read_dword(addr) (*reinterpret_cast<const uint32_t*>(addr))
3333
#define pgm_read_float(addr) (*reinterpret_cast<const float>(addr))
34-
#define pgm_read_ptr(addr) (*reinterpret_cast<const void const *>(addr))
34+
#define pgm_read_ptr(addr) (*reinterpret_cast<const void* const *>(addr))
3535
#else
3636
#define pgm_read_byte(addr) (*(const uint8_t*)(addr))
3737
#define pgm_read_word(addr) (*(const uint16_t*)(addr))
3838
#define pgm_read_dword(addr) (*(const uint32_t*)(addr))
3939
#define pgm_read_float(addr) (*(const float)(addr))
40-
#define pgm_read_ptr(addr) (*(const void const *)(addr))
40+
#define pgm_read_ptr(addr) (*(const void* const *)(addr))
4141
#endif
4242

4343
#define pgm_read_byte_near(addr) pgm_read_byte(addr)

tools/sdk/lib/liblwip2-1460-feat.a

1.22 KB
Binary file not shown.

tools/sdk/lib/liblwip2-1460.a

1.21 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536-feat.a

1.22 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536.a

1.21 KB
Binary file not shown.

tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,57 @@ static inline uint16_t pgm_read_word_inlined(const void* addr) {
6868
return (uint16_t) res; /* This masks the lower half-word from the returned word */
6969
}
7070

71-
#define pgm_read_byte(addr) pgm_read_byte_inlined(addr)
72-
#define pgm_read_word(addr) pgm_read_word_inlined(addr)
71+
72+
73+
#define pgm_read_byte(addr) pgm_read_byte_inlined(addr)
74+
#define pgm_read_word_aligned(addr) pgm_read_word_inlined(addr)
7375
#ifdef __cplusplus
74-
#define pgm_read_dword(addr) (*reinterpret_cast<const uint32_t*>(addr))
75-
#define pgm_read_float(addr) (*reinterpret_cast<const float*>(addr))
76-
#define pgm_read_ptr(addr) (*reinterpret_cast<const void* const *>(addr))
76+
#define pgm_read_dword_aligned(addr) (*reinterpret_cast<const uint32_t*>(addr))
77+
#define pgm_read_float_aligned(addr) (*reinterpret_cast<const float*>(addr))
78+
#define pgm_read_ptr_aligned(addr) (*reinterpret_cast<const void* const*>(addr))
79+
#else
80+
#define pgm_read_dword_aligned(addr) (*(const uint32_t*)(addr))
81+
#define pgm_read_float_aligned(addr) (*(const float*)(addr))
82+
#define pgm_read_ptr_aligned(addr) (*(const void* const*)(addr))
83+
#endif
84+
85+
__attribute__((optimize("-O3"), always_inline)) static inline uint32_t pgm_read_dword_unaligned(const void *addr) {
86+
if (!(((int)addr)&3)) return *(const uint32_t *)addr;
87+
int off = (((int)addr) & 3) << 3;
88+
const uint32_t *p = (const uint32_t *)((int)addr & (~3));
89+
uint32_t a = *p++;
90+
uint32_t b = *p;
91+
return (a>>off) | (b <<(32-off));
92+
}
93+
94+
__attribute__((optimize("-O3"), always_inline)) static inline float pgm_read_float_unaligned(const void *addr) {
95+
return (float)pgm_read_dword_unaligned(addr);
96+
}
97+
98+
__attribute__((optimize("-O3"), always_inline)) static inline void *pgm_read_ptr_unaligned(const void *addr) {
99+
return (void *)pgm_read_dword_unaligned(addr);
100+
}
101+
102+
__attribute__((optimize("-O3"), always_inline)) static inline uint16_t pgm_read_word_unaligned(const void *addr) {
103+
return pgm_read_dword_unaligned(addr) & 0xffff;
104+
}
105+
106+
// Allow selection of _aligned or _unaligned, but default to _unaligned for Arduino compatibility
107+
// Add -DPGM_READ_UNALIGNED=0 or "#define PGM_READ_UNALIGNED 0" to code to use aligned-only (faster) macros by default
108+
#ifndef PGM_READ_UNALIGNED
109+
#define PGM_READ_UNALIGNED 1
110+
#endif
111+
112+
#if PGM_READ_UNALIGNED
113+
#define pgm_read_word(a) pgm_read_word_unaligned(a)
114+
#define pgm_read_dword(a) pgm_read_dword_unaligned(a)
115+
#define pgm_read_float(a) pgm_read_float_unaligned(a)
116+
#define pgm_read_ptr(a) pgm_read_ptr_unaligned(a)
77117
#else
78-
#define pgm_read_dword(addr) (*(const uint32_t*)(addr))
79-
#define pgm_read_float(addr) (*(const float*)(addr))
80-
#define pgm_read_ptr(addr) (*(const void* const*)(addr))
118+
#define pgm_read_word(a) pgm_read_word_aligned(a)
119+
#define pgm_read_dword(a) pgm_read_dword_aligned(a)
120+
#define pgm_read_float(a) pgm_read_float_aligned(a)
121+
#define pgm_read_ptr(a) pgm_read_ptr_aligned(a)
81122
#endif
82123

83124
#define pgm_read_byte_near(addr) pgm_read_byte(addr)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// generated by makefiles/make-lwip2-hash
22
#ifndef LWIP_HASH_H
33
#define LWIP_HASH_H
4-
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.1-5-g25d5e81"
4+
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.1-7-g82abda3"
55
#endif // LWIP_HASH_H

tools/sdk/lwip2/include/lwipopts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@
660660
* packet in a row to an IP address that is not in the ARP cache.
661661
*/
662662
#if !defined ARP_QUEUEING || defined __DOXYGEN__
663-
#define ARP_QUEUEING 0
663+
#define ARP_QUEUEING 1
664664
#endif
665665

666666
/** The maximum number of packets which may be queued for each

0 commit comments

Comments
 (0)