{"id":604,"date":"2026-08-10T23:07:45","date_gmt":"2026-08-10T21:07:45","guid":{"rendered":"https:\/\/www.elrebo.de\/?p=604"},"modified":"2026-08-10T23:07:45","modified_gmt":"2026-08-10T21:07:45","slug":"how-to-save-the-initial-contents-of-an-esp32-soc","status":"publish","type":"post","link":"https:\/\/www.elrebo.de\/index.php\/2026\/08\/10\/how-to-save-the-initial-contents-of-an-esp32-soc\/","title":{"rendered":"How to save the initial contents of an ESP32 SoC"},"content":{"rendered":"\n<p>I have bought an M5STACK CORE2 V1.1 system and now I want to start experimenting with it.<\/p>\n\n\n\n<p>Before flashing something on the system I would like to save the initial contents of the flash, so that I&#8217;m able to restore it to the system after my experiments.<\/p>\n\n\n\n<p>The result of a short internet search was to use esptool, a serial utility for flashing, provisioning, and interacting with Espressif SoCs.<\/p>\n\n\n\n<p>Because I&#8217;m using the ESP-IDF, the integrated development environment of Espressif, I only had to activate the right environment to have the esptool available:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">source ~\/.espressif\/tools\/activate_idf_v6.0.sh<\/pre>\n\n\n\n<p>Now the esptool can be started with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">python3 \/$VIRTUAL_ENV\/bin\/esptool<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"994\" src=\"https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/08\/Bildschirmfoto-2026-08-10-um-15.20.36-1024x994.png\" alt=\"\" class=\"wp-image-606\" srcset=\"https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/08\/Bildschirmfoto-2026-08-10-um-15.20.36-1024x994.png 1024w, https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/08\/Bildschirmfoto-2026-08-10-um-15.20.36-300x291.png 300w, https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/08\/Bildschirmfoto-2026-08-10-um-15.20.36-768x746.png 768w, https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/08\/Bildschirmfoto-2026-08-10-um-15.20.36-1536x1491.png 1536w, https:\/\/www.elrebo.de\/wp-content\/uploads\/2026\/08\/Bildschirmfoto-2026-08-10-um-15.20.36.png 1716w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To read out the whole flash memory of the SoC the command I used this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">esptool --chip esp32 --port \/dev\/cu.usbserial-59740149631 <br>--baud 230400 read-flash 0 0x1000000 m5stack_core2_backup.bin<\/pre>\n\n\n\n<p>Using higher baud rates of 921600 and 460800 did not work. With the baud rate of 230400 the process ran for ~ 13 minutes.<\/p>\n\n\n\n<p>The name of the USB port to use was found by listing the ports with<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ls \/dev\/cu.usb*<\/pre>\n\n\n\n<p>on my Mac.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have bought an M5STACK CORE2 V1.1 system and now I want to start experimenting with it. Before flashing something on the system I would like to save the initial contents of the flash, so that I&#8217;m able to restore it to the system after my experiments. The result of a short internet search was [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":608,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,1,16,18],"tags":[12,74],"class_list":["post-604","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32_socs","category-oss","category-physical_computing","category-werkzeuge","tag-esp-idf","tag-esptool"],"_links":{"self":[{"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/posts\/604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/comments?post=604"}],"version-history":[{"count":2,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/posts\/604\/revisions"}],"predecessor-version":[{"id":609,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/posts\/604\/revisions\/609"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/media\/608"}],"wp:attachment":[{"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/media?parent=604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/categories?post=604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elrebo.de\/index.php\/wp-json\/wp\/v2\/tags?post=604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}