Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit afeca4e

Browse files
authored
v1.4.1 to not destroy original CString
### Releases v1.4.1 1. Don't need `memmove()`, CString no longer destroyed. Check [All memmove() removed - string no longer destroyed #11](#11)
1 parent 6645cf6 commit afeca4e

File tree

48 files changed

+188
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+188
-155
lines changed

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,13 @@
130130

131131
### Important Note from v1.4.0
132132

133-
The new `v1.4.0` has added a new and powerful feature to permit using `CString` in optional `SDRAM` to save heap to send `very large data`.
133+
The new `v1.4.0+` has added a new and powerful feature to permit using `CString` in optional `SDRAM` to save heap to send `very large data`.
134134

135-
Check the `marvelleous` PR of **@salasidis** [request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/8) and these new examples
135+
Check the `marvelleous` PRs of **@salasidis**
136+
-[request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/8)
137+
-[All memmove() removed - string no longer destroyed #11](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/11)
138+
139+
and these new examples
136140

137141
1. [Async_AdvancedWebServer_MemoryIssues_Send_CString for Ethernet](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/tree/main/examples/Ethernet/Async_AdvancedWebServer_MemoryIssues_Send_CString)
138142
2. [Async_AdvancedWebServer_MemoryIssues_SendArduinoString for Ethernet](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/tree/main/examples/Ethernet/Async_AdvancedWebServer_MemoryIssues_SendArduinoString)
@@ -1574,7 +1578,7 @@ Following is debug terminal output when running example [MQTT_ThingStream](examp
15741578
```
15751579
Start MQTT_ThingStream on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
15761580
Portenta_H7_AsyncTCP v1.4.0
1577-
Portenta_H7_AsyncWebServer v1.4.0
1581+
Portenta_H7_AsyncWebServer v1.4.1
15781582
Using mac index = 17
15791583
Connected! IP address: 192.168.2.87
15801584
***************************************
@@ -1599,7 +1603,7 @@ Following is debug terminal output when running example [WebClient](examples/Eth
15991603
```
16001604
Start WebClientRepeating on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
16011605
Portenta_H7_AsyncTCP v1.4.0
1602-
Portenta_H7_AsyncWebServer v1.4.0
1606+
Portenta_H7_AsyncWebServer v1.4.1
16031607
Using mac index = 16
16041608
Connected! IP address: 192.168.2.87
16051609
@@ -1667,7 +1671,7 @@ Following is debug terminal output when running example [MQTTClient_Auth](exampl
16671671
```
16681672
Start MQTTClient_Auth on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
16691673
Portenta_H7_AsyncTCP v1.4.0
1670-
Portenta_H7_AsyncWebServer v1.4.0
1674+
Portenta_H7_AsyncWebServer v1.4.1
16711675
Using mac index = 9
16721676
Connected! IP address: 192.168.2.87
16731677
Attempting MQTT connection to broker.emqx.io...connected
@@ -1688,7 +1692,7 @@ Following is debug terminal output when running example [MQTTClient_Basic](examp
16881692
```
16891693
Start MQTTClient_Basic on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
16901694
Portenta_H7_AsyncTCP v1.4.0
1691-
Portenta_H7_AsyncWebServer v1.4.0
1695+
Portenta_H7_AsyncWebServer v1.4.1
16921696
Using mac index = 8
16931697
Connected! IP address: 192.168.2.87
16941698
Attempting MQTT connection to broker.emqx.io...connected
@@ -1707,7 +1711,7 @@ Following is debug terminal output when running example [Async_HTTPBasicAuth](ex
17071711
```
17081712
Start Async_HTTPBasicAuth on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
17091713
Portenta_H7_AsyncTCP v1.4.0
1710-
Portenta_H7_AsyncWebServer v1.4.0
1714+
Portenta_H7_AsyncWebServer v1.4.1
17111715
Using mac index = 16
17121716
Connected! IP address: 192.168.2.87
17131717
Async_HttpBasicAuth started @ IP : 192.168.2.87
@@ -1737,7 +1741,7 @@ Following are debug terminal output and screen shots when running example [Async
17371741
```
17381742
Start Async_AdvancedWebServer on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
17391743
Portenta_H7_AsyncTCP v1.4.0
1740-
Portenta_H7_AsyncWebServer v1.4.0
1744+
Portenta_H7_AsyncWebServer v1.4.1
17411745
Using mac index = 4
17421746
Connected! IP address: 192.168.2.87
17431747
HTTP EthernetWebServer is @ IP : 192.168.2.87
@@ -1764,7 +1768,7 @@ Following is the debug terminal and screen shot when running example [Async_Adva
17641768
```
17651769
Start Async_AdvancedWebServer on PORTENTA_H7_M7 with Portenta_H7 WiFi
17661770
Portenta_H7_AsyncTCP v1.4.0
1767-
Portenta_H7_AsyncWebServer v1.4.0
1771+
Portenta_H7_AsyncWebServer v1.4.1
17681772
Connecting to SSID: HueNet1
17691773
SSID: HueNet1
17701774
Local IP Address: 192.168.2.94
@@ -1791,7 +1795,7 @@ Following is the debug terminal and screen shot when running example [Async_Adva
17911795
```
17921796
Start Async_AdvancedWebServer_MemoryIssues_Send_CString using SDRAM on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
17931797
Portenta_H7_AsyncTCP v1.4.0
1794-
Portenta_H7_AsyncWebServer v1.4.0
1798+
Portenta_H7_AsyncWebServer v1.4.1
17951799
Using mac index = 2
17961800
Connected! IP address: 192.168.2.123
17971801
HTTP EthernetWebServer is @ IP : 192.168.2.123
@@ -1817,22 +1821,22 @@ Out String Length=31224
18171821
Out String Length=31235
18181822
```
18191823

1820-
##### Not using SDRAM ===> small heap (51,823 bytes)
1824+
##### Not using SDRAM ===> small heap (51,833 bytes)
18211825

18221826
```
18231827
Start Async_AdvancedWebServer_MemoryIssues_Send_CString on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
18241828
Portenta_H7_AsyncTCP v1.4.0
1825-
Portenta_H7_AsyncWebServer v1.4.0
1826-
Using mac index = 8
1827-
Connected! IP address: 192.168.2.123
1828-
HTTP EthernetWebServer is @ IP : 192.168.2.123
1829+
Portenta_H7_AsyncWebServer v1.4.1
1830+
Using mac index = 7
1831+
Connected! IP address: 192.168.2.38
1832+
HTTP EthernetWebServer is @ IP : 192.168.2.38
18291833
18301834
HEAP DATA - Pre Create Arduino String Cur heap: 47434 Res Size: 451760 Max heap: 47448
18311835
.
1832-
HEAP DATA - Pre Send Cur heap: 48610 Res Size: 451760 Max heap: 49172
1836+
HEAP DATA - Pre Send Cur heap: 48607 Res Size: 451760 Max heap: 49811
18331837
1834-
HEAP DATA - Post Send Cur heap: 48710 Res Size: 451760 Max heap: 51823
1835-
......... .......... .......... .......... .......... .......... .......... ..........
1838+
HEAP DATA - Post Send Cur heap: 48720 Res Size: 451760 Max heap: 51833
1839+
......... .......... .......... .......... .......... ....
18361840
Out String Length=31200
18371841
.......... .......... .......... .......... .......... .......... .......... ..........
18381842
Out String Length=31291
@@ -1846,7 +1850,7 @@ While using Arduino String, the HEAP usage is very large
18461850
```
18471851
Start Async_AdvancedWebServer_MemoryIssues_SendArduinoString on PORTENTA_H7_M7 with Ethernet using Portenta_Ethernet Library
18481852
Portenta_H7_AsyncTCP v1.4.0
1849-
Portenta_H7_AsyncWebServer v1.4.0
1853+
Portenta_H7_AsyncWebServer v1.4.1
18501854
Using mac index = 0
18511855
Connected! IP address: 192.168.2.123
18521856
HTTP EthernetWebServer is @ IP : 192.168.2.123
@@ -1937,7 +1941,9 @@ Submit issues to: [Portenta_H7_AsyncWebServer issues](https://github.com/khoih-p
19371941
1. Based on and modified from [Hristo Gochkov's ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer). Many thanks to [Hristo Gochkov](https://github.com/me-no-dev) for great [ESPAsyncWebServer Library](https://github.com/me-no-dev/ESPAsyncWebServer)
19381942
2. Thanks to [rusty-bit](https://github.com/rusty-bit) to initiate the Discussion in [**AsyncWebserver for Portenta H7** #6](https://github.com/khoih-prog/AsyncWebServer_STM32/discussions/6) leading to these [Portenta_H7_AsyncTCP](https://github.com/khoih-prog/Portenta_H7_AsyncTCP) and [Portenta_H7_AsyncWebServer](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer) libraries
19391943
3. Thanks to [Jeremy Ellis](https://github.com/hpssjellis) to test and report the compile error and crash issue with mbed_portenta core v2.6.1, leading to v1.2.0
1940-
4. Thanks to [salasidis](https://github.com/salasidis) aka [rs77can](https://forum.arduino.cc/u/rs77can) to discuss and make the mavellous PR [request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/8), leading to `v1.4.0` to support using `CString` in optional `SDRAM` to save heap to send `very large data`
1944+
4. Thanks to [salasidis](https://github.com/salasidis) aka [rs77can](https://forum.arduino.cc/u/rs77can) to discuss and make the following marvellous PRs
1945+
- [request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/8), leading to `v1.4.0` to support using `CString` in optional `SDRAM` to save heap to send `very large data`
1946+
- [All memmove() removed - string no longer destroyed #11](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/11), leading to `v1.4.1` to remove `memmove()` and not to destroy String anymore
19411947

19421948
<table>
19431949
<tr>

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
## Table of Contents
1212

1313
* [Changelog](#changelog)
14+
* [Releases v1.4.1](#Releases-v141)
1415
* [Releases v1.4.0](#Releases-v140)
1516
* [Releases v1.3.0](#Releases-v130)
1617
* [Releases v1.2.1](#Releases-v121)
@@ -24,6 +25,10 @@
2425

2526
## Changelog
2627

28+
### Releases v1.4.1
29+
30+
1. Don't need `memmove()`, CString no longer destroyed. Check [All memmove() removed - string no longer destroyed #11](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/11)
31+
2732
### Releases v1.4.0
2833

2934
1. Support using `CString` in optional `SDRAM` to save heap to send `very large data`. Check [request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/8)

examples/Ethernet/Async_AdvancedWebServer/Async_AdvancedWebServer.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
Async_AdvancedWebServer.ino - Dead simple AsyncWebServer for STM32 LAN8720 or built-in LAN8742A Ethernet
33
4-
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet
5-
6-
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with with Vision-Shield Ethernet
4+
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet or Murata WiFi
5+
6+
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with Vision-Shield Ethernet or Murata WiFi
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/Portenta_H7_AsyncWebServer

examples/Ethernet/Async_AdvancedWebServer_MemoryIssues_SendArduinoString/Async_AdvancedWebServer_MemoryIssues_SendArduinoString.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
Async_AdvancedWebServer_MemoryIssues_SendArduinoString.ino - - Dead simple AsyncWebServer for Portenta_H7
33
4-
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet
5-
6-
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with with Vision-Shield Ethernet
4+
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet or Murata WiFi
5+
6+
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with Vision-Shield Ethernet or Murata WiFi
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/Portenta_H7_AsyncWebServer
@@ -233,6 +233,8 @@ void setup()
233233
Serial.println(PORTENTA_H7_ASYNC_TCP_VERSION);
234234
Serial.println(PORTENTA_H7_ASYNC_WEBSERVER_VERSION);
235235

236+
AWS_LOGDEBUG3("TCP_MSS =", TCP_MSS, ", TCP_SND_BUF =", TCP_SND_BUF);
237+
236238
///////////////////////////////////
237239

238240
// start the ethernet connection and the server
@@ -290,7 +292,6 @@ void setup()
290292
Serial.println(Ethernet.localIP());
291293

292294
PrintHeapData("Pre Create Arduino String");
293-
294295
}
295296

296297
void heartBeatPrint()

examples/Ethernet/Async_AdvancedWebServer_MemoryIssues_Send_CString/Async_AdvancedWebServer_MemoryIssues_Send_CString.ino

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
Async_AdvancedWebServer_MemoryIssues_Send_CString.ino - Dead simple AsyncWebServer for Portenta_H7
33
4-
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet
5-
6-
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with with Vision-Shield Ethernet
4+
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet or Murata WiFi
5+
6+
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with Vision-Shield Ethernet or Murata WiFi
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/Portenta_H7_AsyncWebServer
@@ -43,7 +43,7 @@
4343
#endif
4444

4545
#define _PORTENTA_H7_ATCP_LOGLEVEL_ 1
46-
#define _PORTENTA_H7_AWS_LOGLEVEL_ 0
46+
#define _PORTENTA_H7_AWS_LOGLEVEL_ 1
4747

4848
#define USE_ETHERNET_PORTENTA_H7 true
4949

@@ -59,7 +59,7 @@ char *cStr;
5959
#define CSTRING_SIZE 40000
6060

6161
// Select either cString is stored in SDRAM or not
62-
#define USING_CSTRING_IN_SDRAM true
62+
#define USING_CSTRING_IN_SDRAM false //true
6363

6464
#if USING_CSTRING_IN_SDRAM
6565
#include "SDRAM.h"
@@ -242,9 +242,8 @@ void setup()
242242
Serial.println(PORTENTA_H7_ASYNC_TCP_VERSION);
243243
Serial.println(PORTENTA_H7_ASYNC_WEBSERVER_VERSION);
244244

245-
Serial.print("TCP_MSS = "); Serial.print(TCP_MSS); Serial.print(", TCP_SND_BUF = "); Serial.println(TCP_SND_BUF);
245+
AWS_LOGDEBUG3("TCP_MSS =", TCP_MSS, ", TCP_SND_BUF =", TCP_SND_BUF);
246246

247-
248247
#if USING_CSTRING_IN_SDRAM
249248
SDRAM.begin();
250249

examples/Ethernet/Async_HelloServer/Async_HelloServer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
Async_HelloServer.h
33
4-
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet
4+
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet or Murata WiFi
55
6-
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with with Vision-Shield Ethernet
6+
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with Vision-Shield Ethernet or Murata WiFi
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/Portenta_H7_AsyncWebServer

examples/Ethernet/Async_HelloServer2/Async_HelloServer2.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
Async_HelloServer.ino
33
4-
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet
4+
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet or Murata WiFi
55
6-
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with with Vision-Shield Ethernet
6+
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with Vision-Shield Ethernet or Murata WiFi
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/Portenta_H7_AsyncWebServer

examples/Ethernet/Async_HttpBasicAuth/Async_HttpBasicAuth.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
Async_HttpBasicAuth.ino - Dead simple AsyncWebServer for STM32 LAN8720 or built-in LAN8742A Ethernet
33
4-
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet
4+
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet or Murata WiFi
55
6-
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with with Vision-Shield Ethernet
6+
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with Vision-Shield Ethernet or Murata WiFi
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/Portenta_H7_AsyncWebServer

examples/Ethernet/Async_PostServer/Async_PostServer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
Async_PostServer.ino
33
4-
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet
4+
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet or Murata WiFi
55
6-
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with with Vision-Shield Ethernet
6+
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with Vision-Shield Ethernet or Murata WiFi
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/Portenta_H7_AsyncWebServer

examples/Ethernet/MQTTClient_Auth/MQTTClient_Auth.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
22
MQTTClient_Auth.ino
33
4-
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet
4+
For Portenta_H7 (STM32H7) with Vision-Shield Ethernet or Murata WiFi
55
6-
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with with Vision-Shield Ethernet
6+
Portenta_H7_AsyncWebServer is a library for the Portenta_H7 with Vision-Shield Ethernet or Murata WiFi
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/Portenta_H7_AsyncWebServer

0 commit comments

Comments
 (0)