<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1251697395;
mso-list-type:hybrid;
mso-list-template-ids:-1111818754 271463980 336134147 336134149 336134145 336134147 336134149 336134145 336134147 336134149;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-NZ link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Hi<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>At run time with the various stacks and heap in use:<o:p></o:p></span></p><ul style='margin-top:0cm' type=disc><li class=MsoListParagraph style='margin-left:0cm;mso-list:l0 level1 lfo1'><span style='mso-fareast-language:EN-US'>Explanation of different memory allocations: <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/mem_alloc.html">https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/mem_alloc.html</a><o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l0 level1 lfo1'><span style='mso-fareast-language:EN-US'>Two functions for checking how much heap is free during operation: <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system.html#heap-memory">https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system.html#heap-memory</a><o:p></o:p></span></li></ul><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>The spare space for code depends on the size of the memory partition and the size of your code.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html">https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html</a><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/app_image_format.html">https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/app_image_format.html</a><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'>Wes<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Chchrobotics <chchrobotics-bounces@lists.ourshack.com> <b>On Behalf Of </b>David Burkitt<br><b>Sent:</b> Monday, 21 September 2020 4:25 PM<br><b>To:</b> Christchurch Robotics <chchrobotics@lists.ourshack.com><br><b>Subject:</b> Re: [chbot] Does anyone know how much free memory an ESP32 has?<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I'm using the esp-idf rather than arduino and I've gone over the 1MB boundry. I don't have any real indication of free memory though.<o:p></o:p></p><div><p class=MsoNormal>Dave<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Mon, 21 Sep 2020, 14:39 Charles Manning, <<a href="mailto:cdhmanning@gmail.com">cdhmanning@gmail.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal>Thanks all<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It sounds like there will be enough for my purposes (~150kB RAM + ~40kB code).<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Mon, Sep 21, 2020 at 9:22 AM Andrew Dachs <<a href="mailto:dachsa492@gmail.com" target="_blank">dachsa492@gmail.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal>Sounds about right though I’m not sure you can go over the 1MB boundary with code. Ive not hit that yet so haven’t dug too deep. You can use it for filesystem but think code requires cached pages that is not in the arduino framework. <o:p></o:p></p><div><p class=MsoNormal>Andy<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Sent from my iPhone<o:p></o:p></p></div><div><p class=MsoNormal><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'>On 21/09/2020, at 8:36 AM, Daniel Powell <<a href="mailto:danielvieway@hotmail.com" target="_blank">danielvieway@hotmail.com</a>> wrote:<o:p></o:p></p></blockquote></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>While very rudimentary this may give you some impression. <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Using the Arduino IDE and WiFi library, specifically the WiFiClientTest (so full stack), no OTA on a 2mb esp32 pico (M5StickC). <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br>Sketch uses 633974 bytes (30%) of program storage space. Maximum is 2097152 bytes.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Global variables use 38760 bytes (11%) of dynamic memory, leaving 288920 bytes for local variables. Maximum is 327680 bytes.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Regards, <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Daniel. <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:currentcolor currentcolor'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US>From:</span></b><span lang=EN-US> Chchrobotics <<a href="mailto:chchrobotics-bounces@lists.ourshack.com" target="_blank">chchrobotics-bounces@lists.ourshack.com</a>> <b>On Behalf Of </b>Charles Manning<br><b>Sent:</b> Monday, 21 September 2020 7:50 AM<br><b>To:</b> Christchurch Robotics <<a href="mailto:chchrobotics@lists.ourshack.com" target="_blank">chchrobotics@lists.ourshack.com</a>><br><b>Subject:</b> [chbot] Does anyone know how much free memory an ESP32 has?</span><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi All<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I expect there are some C-using ESP32 programmers out there...<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I am thinking of doing some experiments with the ESP32 that will indeed quite a lot of RAM.<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>The ESP32s have 512bB of RAM (+ 8kB RTC RAM). but substantial amounts of that are used by the wireless stack(s).<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>DOes anyone know how much is left for application use?<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thanks<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>CHarles<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div><p class=MsoNormal>_______________________________________________<br>Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.ourshack.com" target="_blank">Chchrobotics@lists.ourshack.com</a><br><a href="https://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">https://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>Meetings usually 3rd Monday each month. See <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a> for venue, directions and dates.<br>When replying, please edit your Subject line to reflect new subjects.<o:p></o:p></p></div></blockquote></div></div><p class=MsoNormal>_______________________________________________<br>Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.ourshack.com" target="_blank">Chchrobotics@lists.ourshack.com</a><br><a href="https://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">https://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>Meetings usually 3rd Monday each month. See <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a> for venue, directions and dates.<br>When replying, please edit your Subject line to reflect new subjects.<o:p></o:p></p></blockquote></div><p class=MsoNormal>_______________________________________________<br>Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.ourshack.com" target="_blank">Chchrobotics@lists.ourshack.com</a><br><a href="https://lists.ourshack.com/mailman/listinfo/chchrobotics" target="_blank">https://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>Meetings usually 3rd Monday each month. See <a href="http://kiwibots.org" target="_blank">http://kiwibots.org</a> for venue, directions and dates.<br>When replying, please edit your Subject line to reflect new subjects.<o:p></o:p></p></blockquote></div></div></body></html>