[{"data":1,"prerenderedAt":802},["ShallowReactive",2],{"post-esp32-partition-table-explained-en":3,"related-posts-esp32-partition-table-explained-en":753,"related-categories-esp32-partition-table-explained-en":785},{"id":4,"title":5,"author":6,"authorImageUrl":7,"authorUrl":8,"body":9,"categorySlug":715,"categoryText":716,"dateModified":717,"datePublished":717,"description":718,"extension":719,"faqs":720,"image":736,"imageAlt":737,"language":738,"meta":739,"navigation":740,"path":741,"seo":742,"sitemap":743,"stem":744,"summary":745,"tags":746,"__hash__":752},"blog\u002Fblog\u002Fesp32-partition-table-explained.md","ESP32 Partition Table Explained: Flash Layout and OTA","Mauro Brambilla","\u002Fimages\u002Fauthors\u002Fbruma.jpg","\u002Fabout",{"type":10,"value":11,"toc":703},"minimark",[12,33,50,55,65,72,85,88,93,99,103,125,135,142,185,189,209,212,298,317,321,343,348,388,397,401,427,431,447,462,466,483,489,493,502,513,517,520,582,585,591,606,612,616,619,624,673,676,680,689],[13,14,15,16,20,21,24,25,28,29,32],"p",{},"The ESP32 partition table is a small map stored in flash at offset 0x8000 that tells the bootloader where the app, the settings storage (",[17,18,19],"code",{},"nvs","), the OTA data and the filesystem live. You choose it with a ",[17,22,23],{},"partitions.csv"," file, or with a built-in scheme such as ",[17,26,27],{},"default.csv"," or ",[17,30,31],{},"huge_app.csv",". If the table runs past the real flash size, Espressif's esptool documentation warns the chip will not work correctly.",[13,34,35,36,39,40,45,46,49],{},"This guide reads that map the way the chip does: the CSV columns, the Arduino-ESP32 schemes with their sizes in KB, why the bootloader offset differs between chips, and what ",[17,37,38],{},"N16R8"," on a module name means for your layout. The real example is the ",[41,42,44],"a",{"href":43},"\u002Fprojects\u002Fgizmo-ticker","Gizmo Ticker",": I decoded the ",[17,47,48],{},"release-partitions.bin"," that its flasher writes, and checked it against Espressif's documentation and the Arduino-ESP32 CSV files.",[51,52,54],"h2",{"id":53},"what-is-the-esp32-partition-table","What is the ESP32 partition table?",[13,56,57,58,64],{},"A partition table divides the external flash chip into named regions with a type, an offset and a size. Espressif's ",[41,59,63],{"href":60,"rel":61},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32\u002Fapi-guides\u002Fpartition-tables.html",[62],"nofollow","partition table guide"," says it is flashed at 0x8000 by default, occupies one 4 KB sector, and is 0xC00 bytes long because it allows at most 95 entries, followed by an MD5 checksum the bootloader uses to check its integrity.",[13,66,67],{},[68,69],"img",{"alt":70,"src":71},"A maker holds up a XIAO board next to a folded paper strip with colored sections labeled nvs and app0, like a map of its flash","\u002Fimages\u002Fblog\u002Fesp32-partition-table-explained-illustration.webp",[13,73,74,75,80,81,84],{},"The bootloader is the first program that runs from flash. ESP-IDF's ",[41,76,79],{"href":77,"rel":78},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32s3\u002Fapi-guides\u002Fbootloader.html",[62],"bootloader page"," lists its job: select the application partition to boot, based on the partition table and ",[17,82,83],{},"ota_data"," if there is one, load the image into RAM and hand over control. So the table is not a setting inside your app. It is a file in flash that exists before your code does.",[13,86,87],{},"A typical table holds four kinds of partitions:",[89,90],"blog-list",{":items":91,"variant":92},"[\"nvs: key-value storage for settings and Wi-Fi data, used by the Preferences library\",\"otadata: records which OTA app slot to boot, 0x2000 bytes\",\"app slots (factory, ota_0, ota_1): the firmware images\",\"data partitions such as spiffs or coredump: a filesystem, crash dumps, or your own bytes\"]","circle",[13,94,95],{},[68,96],{"alt":97,"src":98},"The Gizmo Ticker's flash map for huge_app.csv on an 8 MB board: bootloader, table, nvs, otadata, a 3 MB app0, 896 KB spiffs, coredump and 4 MB with no partition","\u002Fimages\u002Fblog\u002Fesp32-partition-table-explained-flash-map.webp",[51,100,102],{"id":101},"what-does-a-partitionscsv-file-look-like","What does a partitions.csv file look like?",[13,104,105,106,109,110,113,114,117,118,124],{},"The CSV has six columns: name, type, subtype, offset, size and flags. Whitespace is ignored, lines starting with ",[17,107,108],{},"#"," are comments, and sizes can be hex, decimal or use ",[17,111,112],{},"K"," and ",[17,115,116],{},"M",". A name is at most 16 bytes including the terminator. Here is the real table of every OpenGizmo firmware, from the Arduino-ESP32 core's ",[41,119,122],{"href":120,"rel":121},"https:\u002F\u002Fgithub.com\u002Fespressif\u002Farduino-esp32\u002Fblob\u002Fmaster\u002Ftools\u002Fpartitions\u002Fhuge_app.csv",[62],[17,123,31],{}," as read on November 14, 2026 (its comment line with the column names is left out here):",[126,127,133],"pre",{"className":128,"code":130,"filename":31,"language":131,"meta":132},[129],"language-csv","nvs,      data, nvs,     0x9000,  0x5000,\notadata,  data, ota,     0xe000,  0x2000,\napp0,     app,  ota_0,   0x10000, 0x300000,\nspiffs,   data, spiffs,  0x310000,0xE0000,\ncoredump, data, coredump,0x3F0000,0x10000,\n","csv","",[17,134,130],{"__ignoreMap":132},[13,136,137,138,141],{},"Three rules explain most of the numbers, all from the ESP-IDF guide. Offsets are multiples of 4 KB (0x1000), the flash sector size. An ",[17,139,140],{},"app"," partition must start at a multiple of 64 KB (0x10000), which is why the first app sits at 0x10000 and the 0x9000 to 0xFFFF area before it holds only small data partitions. And if you leave an offset blank, the partition starts right after the previous one, with app partitions aligned for you.",[13,143,144,145,147,148,151,152,154,155,158,159,162,163,165,166,168,169,172,173,176,177,180,181,184],{},"Type and subtype are what the bootloader and the libraries look for, not the name. Per the same guide, the default ",[17,146,19],{}," partition is the one with type ",[17,149,150],{},"data"," and subtype ",[17,153,19],{},", and ",[17,156,157],{},"otadata"," has subtype ",[17,160,161],{},"ota",". The binary table the flasher writes stores them as numbers. I decoded the shipped file with a few lines of Python: ",[17,164,19],{}," is data\u002F0x02, ",[17,167,157],{}," is data\u002F0x00, ",[17,170,171],{},"app0"," is app\u002F0x10 (",[17,174,175],{},"ota_0","), ",[17,178,179],{},"spiffs"," is data\u002F0x82 and ",[17,182,183],{},"coredump"," is data\u002F0x03.",[51,186,188],{"id":187},"which-partition-table-do-the-opengizmo-firmwares-use","Which partition table do the OpenGizmo firmwares use?",[13,190,191,192,195,196,199,200,205,206,208],{},"All three set ",[17,193,194],{},"board_build.partitions = huge_app.csv"," in ",[17,197,198],{},"platformio.ini",", for example in the ",[41,201,204],{"href":202,"rel":203},"https:\u002F\u002Fgithub.com\u002Fopen-gizmo\u002Fgizmo-ticker\u002Fblob\u002Fmain\u002Fmicrocontroller\u002Fplatformio.ini",[62],"Ticker's file",", with the comment \"One 3 MB app slot (no wireless updates), the same in every OpenGizmo firmware\". The ",[17,207,48],{}," files of the Ticker v1.2.0, the Reolink Switch v1.2.0 and the Camera v1.0.0, as served from the CDN on November 14, 2026, are byte-identical (3,072 bytes), and they decode to exactly the CSV above.",[13,210,211],{},"What does that mean for the hardware?",[213,214,215,231,237,262],"ul",{},[216,217,218,222,223,225,226,230],"li",{},[219,220,221],"strong",{},"One app slot, no OTA."," There is a single ",[17,224,175],{}," slot of 3 MB (3,072 KB) and no second one, so a new image has nowhere to be written while the old one runs. The ",[41,227,229],{"href":228},"\u002Fblog\u002Fesp32-ota-update-methods-compared","OTA methods comparison"," explains why that rules out Wi-Fi updates and compares the slot sizes against the real app.",[216,232,233,236],{},[219,234,235],{},"Room to grow."," The Ticker v1.2.0 app is 1,796,736 bytes, about 57% of the slot. The Reolink Switch app is 1,778,336 bytes and the Camera app 1,722,192 bytes, taken from the sizes of the release files.",[216,238,239,242,243,248,249,252,253,256,257,261],{},[219,240,241],{},"Settings are safe."," The Preferences library ",[41,244,247],{"href":245,"rel":246},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Farduino-esp32\u002Fen\u002Flatest\u002Fapi\u002Fpreferences.html",[62],"stores data in the NVS partition",", and the Ticker's and the Reolink Switch's ",[17,250,251],{},"storage.cpp"," both use Preferences. The flasher writes the bootloader, table, ",[17,254,255],{},"boot_app0"," and app, none of which overlaps 0x9000 to 0xDFFF, as the ",[41,258,260],{"href":259},"\u002Fblog\u002Fesp-web-tools-flash-esp32-from-browser","browser flashing guide"," describes.",[216,263,264,267,268,270,271,274,275,278,279,113,282,284,285,288,289,291,292,297],{},[219,265,266],{},"An unused filesystem."," The 896 KB ",[17,269,179],{}," partition is declared, but searching the ",[17,272,273],{},"microcontroller\u002F"," sources of all three firmwares for ",[17,276,277],{},"LittleFS",", ",[17,280,281],{},"SPIFFS",[17,283,179],{}," finds nothing. The shared ",[17,286,287],{},"gizmo-common"," library is not covered by that search. The 64 KB ",[17,290,183],{}," partition is where ESP-IDF's ",[41,293,296],{"href":294,"rel":295},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32\u002Fapi-guides\u002Fcore_dump.html",[62],"core dump feature"," writes crash data, and whether these firmwares enable it is not something I checked.",[13,299,300,301,306,307,310,311,313,314,316],{},"One more detail is easy to miss. The XIAO ESP32-S3 has 8 MB of flash (the Plus model has 16 MB) according to ",[41,302,305],{"href":303,"rel":304},"https:\u002F\u002Fwiki.seeedstudio.com\u002Fxiao_esp32s3_getting_started\u002F",[62],"Seeed's wiki",", and PlatformIO's own board file for it points to ",[17,308,309],{},"default_8MB.csv",". The OpenGizmo override to ",[17,312,31],{}," ends at 0x400000, so the upper 4 MB of that flash has no partition at all. It costs nothing to leave it empty, and the firmware's own ",[17,315,198],{}," comment says the same table is used in every OpenGizmo firmware, including the 4 MB ESP32-CAM.",[51,318,320],{"id":319},"what-are-the-default-arduino-esp32-partition-schemes","What are the default Arduino-ESP32 partition schemes?",[13,322,323,324,332,333,336,337,342],{},"The Arduino-ESP32 core ships dozens of ready-made tables in its ",[41,325,328,331],{"href":326,"rel":327},"https:\u002F\u002Fgithub.com\u002Fespressif\u002Farduino-esp32\u002Ftree\u002Fmaster\u002Ftools\u002Fpartitions",[62],[17,329,330],{},"tools\u002Fpartitions"," folder",": the folder held more than 50 files on November 14, 2026. In Arduino IDE they are the Tools, Partition Scheme menu, and in PlatformIO you name the file in ",[17,334,335],{},"board_build.partitions",", as the ",[41,338,341],{"href":339,"rel":340},"https:\u002F\u002Fdocs.platformio.org\u002Fen\u002Flatest\u002Fplatforms\u002Fespressif32.html",[62],"PlatformIO Espressif 32 docs"," show. These are the ones you meet most:",[344,345],"blog-table",{":headers":346,":rows":347},"[\"Scheme file\",\"Flash needed (MB)\",\"App slots\",\"Each app slot (KB)\",\"Filesystem (KB)\"]","[[\"default.csv\",\"4\",\"2 (OTA)\",\"1,280\",\"1,408\"],[\"min_spiffs.csv\",\"4\",\"2 (OTA)\",\"1,920\",\"128\"],[\"no_ota.csv\",\"4\",\"1\",\"2,048\",\"1,920\"],[\"huge_app.csv\",\"4\",\"1\",\"3,072\",\"896\"],[\"default_8MB.csv\",\"8\",\"2 (OTA)\",\"3,264\",\"1,536\"],[\"default_16MB.csv\",\"16\",\"2 (OTA)\",\"6,400\",\"3,456\"]]",[13,349,350,351,278,357,278,364,278,371,113,377,384,385,387],{},"I computed the KB values from the offsets and sizes in each CSV (",[41,352,355],{"href":353,"rel":354},"https:\u002F\u002Fgithub.com\u002Fespressif\u002Farduino-esp32\u002Fblob\u002Fmaster\u002Ftools\u002Fpartitions\u002Fdefault.csv",[62],[17,356,27],{},[41,358,361],{"href":359,"rel":360},"https:\u002F\u002Fgithub.com\u002Fespressif\u002Farduino-esp32\u002Fblob\u002Fmaster\u002Ftools\u002Fpartitions\u002Fmin_spiffs.csv",[62],[17,362,363],{},"min_spiffs.csv",[41,365,368],{"href":366,"rel":367},"https:\u002F\u002Fgithub.com\u002Fespressif\u002Farduino-esp32\u002Fblob\u002Fmaster\u002Ftools\u002Fpartitions\u002Fno_ota.csv",[62],[17,369,370],{},"no_ota.csv",[41,372,375],{"href":373,"rel":374},"https:\u002F\u002Fgithub.com\u002Fespressif\u002Farduino-esp32\u002Fblob\u002Fmaster\u002Ftools\u002Fpartitions\u002Fdefault_8MB.csv",[62],[17,376,309],{},[41,378,381],{"href":379,"rel":380},"https:\u002F\u002Fgithub.com\u002Fespressif\u002Farduino-esp32\u002Fblob\u002Fmaster\u002Ftools\u002Fpartitions\u002Fdefault_16MB.csv",[62],[17,382,383],{},"default_16MB.csv","). The \"flash needed\" column is where the last partition, a 64 KB ",[17,386,183],{},", ends: 0x400000, 0x800000 or 0x1000000. These files change between core releases, so check the version you build with.",[13,389,390,391,393,394,396],{},"The pattern is the trade the whole table is about. Flash is a fixed budget, and every app slot, the filesystem and the OTA data compete for it. A table with two app slots halves the room per slot. That is why a 1.7 MB app like the Ticker's does not fit the 1,280 KB slots of ",[17,392,27],{},", and why ",[17,395,31],{}," gives up the second slot to make one big one.",[51,398,400],{"id":399},"why-do-the-flash-offsets-differ-between-chips","Why do the flash offsets differ between chips?",[13,402,403,404,409,410,414,415,420,421,426],{},"The table itself is at 0x8000 on both the classic ESP32 and the ESP32-S3, but the bootloader moves. ESP-IDF's bootloader pages say the second stage bootloader is ",[41,405,408],{"href":406,"rel":407},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32\u002Fapi-guides\u002Fbootloader.html",[62],"at 0x1000 on the ESP32",", and at 0x0 on the ",[41,411,413],{"href":77,"rel":412},[62],"ESP32-S3",", the ",[41,416,419],{"href":417,"rel":418},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32c3\u002Fapi-guides\u002Fbootloader.html",[62],"ESP32-C3"," and the ",[41,422,425],{"href":423,"rel":424},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32c6\u002Fapi-guides\u002Fbootloader.html",[62],"ESP32-C6",". The OpenGizmo manifests show the effect:",[344,428],{":headers":429,":rows":430},"[\"Part\",\"Gizmo Camera (ESP32)\",\"Gizmo Ticker (ESP32-S3)\",\"Size (bytes)\"]","[[\"bootloader\",\"0x1000 (4096)\",\"0x0 (0)\",\"23,520 on ESP32, 19,968 on S3\"],[\"partition table\",\"0x8000 (32768)\",\"0x8000 (32768)\",\"3,072\"],[\"boot_app0\",\"0xE000 (57344)\",\"0xE000 (57344)\",\"8,192\"],[\"app\",\"0x10000 (65536)\",\"0x10000 (65536)\",\"1,722,192 on Camera, 1,796,736 on Ticker\"]]",[13,432,433,434,437,438,440,441,443,444,446],{},"The manifests are at ",[17,435,436],{},"cdn.opengizmo.dev",", and the sizes come from the files they list. Notice that ",[17,439,255],{}," is 8,192 bytes at 0xE000, which is the exact offset and size of ",[17,442,157],{}," in the table above. Its first sector starts with the value 1 and is otherwise filled with 0xFF apart from a few bytes, and the second sector starts with 0. That fits an initial OTA data image that selects the first app slot, but I did not check it against ESP-IDF's source, so treat it as an inference. If you design your own table, keep that offset in step with wherever you put ",[17,445,157],{},", or check what your build tool writes.",[13,448,449,450,453,454,457,458,461],{},"The table's own offset is not fixed either: ESP-IDF sets it with ",[17,451,452],{},"CONFIG_PARTITION_TABLE_OFFSET",", and says to update any fixed offsets in your CSV if you change it. The ",[41,455,456],{"href":259},"browser flashing post"," shows how those offsets end up in a ",[17,459,460],{},"manifest.json",".",[51,463,465],{"id":464},"what-do-n16r8-and-n8r2-mean","What do N16R8 and N8R2 mean?",[13,467,468,469,472,473,476,477,482],{},"On an Espressif module name, ",[17,470,471],{},"N"," is the flash size in megabytes and ",[17,474,475],{},"R"," is the PSRAM size in megabytes. Espressif's ",[41,478,481],{"href":479,"rel":480},"https:\u002F\u002Fdocumentation.espressif.com\u002Fesp32-s3-wroom-1_wroom-1u_datasheet_en.pdf",[62],"ESP32-S3-WROOM-1 datasheet"," (version 1.8) lists them in its comparison tables. PSRAM is extra RAM in a separate die, so it never appears in the partition table. Only the flash number does.",[13,484,485],{},[68,486],{"alt":487,"src":488},"The module code N16R8 split in two: N16 is 16 MB of quad SPI flash that holds the partition table, R8 is 8 MB of octal PSRAM that is RAM and uses GPIO35 to GPIO37","\u002Fimages\u002Fblog\u002Fesp32-partition-table-explained-module-code.webp",[344,490],{":headers":491,":rows":492},"[\"Module\",\"Flash (MB)\",\"PSRAM (MB)\",\"Table that fits\"]","[[\"ESP32-S3-WROOM-1-N8R2\",\"8, quad SPI\",\"2, quad SPI\",\"default_8MB.csv\"],[\"ESP32-S3-WROOM-1-N8R8\",\"8, quad SPI\",\"8, octal SPI\",\"default_8MB.csv\"],[\"ESP32-S3-WROOM-1-N16R8\",\"16, quad SPI\",\"8, octal SPI\",\"default_16MB.csv\"]]",[13,494,495,496,501],{},"Two practical points sit behind that table. First, the datasheet says that on modules with octal PSRAM (the R8 and R16V series) pins IO35, IO36 and IO37 are connected to the PSRAM and are not available for other uses, so an N16R8 loses three GPIOs that an N8R2 keeps. Second, \"Table that fits\" is my pairing, not Espressif's: any table works as long as it ends within the flash size. The ",[41,497,500],{"href":498,"rel":499},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesptool\u002Fen\u002Flatest\u002Fesp32\u002Fesptool\u002Fflash-modes.html",[62],"esptool documentation"," warns that partitions must fit within the configured size, or the ESP32 will not work correctly.",[13,503,504,505,420,509,461],{},"The XIAO ESP32-S3 is a board, not a WROOM module, but Seeed's wiki lists the same pair of facts: the ESP32-S3R8 chip with 8 MB of PSRAM, and 8 MB of flash. For which chip to buy in the first place, see ",[41,506,508],{"href":507},"\u002Fblog\u002Fwhich-esp32-chip-should-you-buy","Which ESP32 should you buy?",[41,510,512],{"href":511},"\u002Fblog\u002Fxiao-esp32s3-vs-c3-vs-c6","XIAO comparison",[51,514,516],{"id":515},"how-do-you-size-app-ota-and-filesystem-partitions","How do you size app, OTA and filesystem partitions?",[13,518,519],{},"Work from the app size outward, and write the table down before you flash it.",[521,522,523,533,552,567,576],"ol",{},[216,524,525,528,529,532],{},[219,526,527],{},"Measure the app."," Build the firmware and read the size of the ",[17,530,531],{},".bin",". For example, the Ticker's is 1,796,736 bytes.",[216,534,535,538,539,541,542,547,548,551],{},[219,536,537],{},"Decide on OTA."," For updates over Wi-Fi you need ",[17,540,157],{}," plus two app slots, per the ",[41,543,546],{"href":544,"rel":545},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32\u002Fapi-reference\u002Fsystem\u002Fota.html",[62],"ESP-IDF OTA docs"," as summarized in the ",[41,549,550],{"href":228},"OTA comparison",". Each slot must hold the app with headroom for growth.",[216,553,554,560,561,566],{},[219,555,556,557,559],{},"Keep ",[17,558,19],{}," honest."," The ",[41,562,565],{"href":563,"rel":564},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesp-idf\u002Fen\u002Flatest\u002Fesp32\u002Fapi-reference\u002Fstorage\u002Fnvs_flash.html",[62],"NVS documentation"," gives 12 KiB (0x3000) as the minimum for normal read-write use. The Arduino tables use 0x5000 (20 KB).",[216,568,569,572,573,575],{},[219,570,571],{},"Spend the rest on a filesystem, or drop it."," If nothing mounts it, an unused ",[17,574,179],{}," is wasted space you could give to the app slots.",[216,577,578,581],{},[219,579,580],{},"Check the sum."," The last partition must end at or before your flash size, and every app offset must be a multiple of 0x10000.",[13,583,584],{},"For example, an 8 MB board with two 3 MB slots and a small filesystem could use the table below. This is my own arithmetic, not a table I built or flashed, so treat it as a template:",[126,586,589],{"className":587,"code":588,"filename":23,"language":131,"meta":132},[129],"nvs,      data, nvs,     0x9000,   0x5000,\notadata,  data, ota,     0xe000,   0x2000,\napp0,     app,  ota_0,   0x10000,  0x300000,\napp1,     app,  ota_1,   0x310000, 0x300000,\nspiffs,   data, spiffs,  0x610000, 0x1E0000,\ncoredump, data, coredump,0x7F0000, 0x10000,\n",[17,590,588],{"__ignoreMap":132},[13,592,593,594,596,597,602,603,605],{},"The last row ends at 0x800000, exactly 8 MB. In Arduino IDE, save it as ",[17,595,23],{}," in the sketch folder and the build uses it instead of the predefined tables, as the ",[41,598,601],{"href":599,"rel":600},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Farduino-esp32\u002Fen\u002Flatest\u002Ftutorials\u002Fpartition_table.html",[62],"Arduino-ESP32 partition tutorial"," describes. In PlatformIO, point ",[17,604,335],{}," at the file.",[13,607,608,609,611],{},"Changing the table has a cost. ESP-IDF says updating it does not erase data stored under the old table. Since every partition is found by its offset, a moved or resized one will read whatever bytes now sit there (my reading of how offsets work, not a quote from the docs). Keep ",[17,610,19],{}," where it is and the saved settings keep working; otherwise plan for a clean start.",[51,613,615],{"id":614},"how-do-you-find-the-offsets-and-the-flash-size-of-a-board","How do you find the offsets and the flash size of a board?",[13,617,618],{},"Three commands cover it. The first two read your build and your chip, the third reads what is really on the board.",[620,621],"terminal",{":commands":622,"title":623},"[\"pio project metadata -e release --json-output\",\"esptool flash-id\",\"esptool -p \u002Fdev\u002FttyACM0 read-flash 0x8000 0x1000 table.bin\"]","Offsets from the build, flash size from the chip",[213,625,626,642,656],{},[216,627,628,633,634,641],{},[219,629,630],{},[17,631,632],{},"pio project metadata"," prints the flash images with their addresses and the application offset. The Ticker's ",[41,635,638],{"href":636,"rel":637},"https:\u002F\u002Fgithub.com\u002Fopen-gizmo\u002Fgizmo-ticker\u002Fblob\u002Fmain\u002F.github\u002Fscripts\u002Fpackage_firmware.py",[62],[17,639,640],{},"package_firmware.py"," reads exactly that to write the manifest, so you never type an offset by hand.",[216,643,644,649,650,655],{},[219,645,646],{},[17,647,648],{},"esptool flash-id"," prints the manufacturer, the device ID and the \"Detected flash size\", per the ",[41,651,654],{"href":652,"rel":653},"https:\u002F\u002Fdocs.espressif.com\u002Fprojects\u002Fesptool\u002Fen\u002Flatest\u002Fesp32\u002Fesptool\u002Fbasic-commands.html",[62],"esptool basic commands",". Run it before you pick a table for a board you did not buy yourself.",[216,657,658,663,664,668,669,672],{},[219,659,660],{},[17,661,662],{},"read-flash"," copies the table out of the board. The ",[41,665,667],{"href":60,"rel":666},[62],"ESP-IDF guide"," documents ",[17,670,671],{},"gen_esp32part.py"," for turning a binary table back into CSV, and I decoded the shipped files with my own short script instead.",[13,674,675],{},"Command names are the hyphenated forms the current esptool documentation uses, and older versions spelled them with underscores. Match them to the version you have installed.",[51,677,679],{"id":678},"what-does-the-partition-table-decide-for-you","What does the partition table decide for you?",[13,681,682,683,685,686,688],{},"The ESP32 partition table decides how a fixed flash chip is shared between your app, a possible second app, your settings and a filesystem. For OpenGizmo the answer is a deliberate one: ",[17,684,31],{},", one 3 MB slot, about 57% used by the biggest app, settings in ",[17,687,19],{}," that a USB update never touches, and no OTA.",[13,690,691,692,694,695,697,698,702],{},"The limits are worth saying out loud. I read the tables and decoded the shipped binaries, but I did not flash a changed table to a board, so the custom CSV above is arithmetic, and the role of ",[17,693,255],{}," is an inference from its offset, size and first bytes. The next useful step is the ",[41,696,229],{"href":228},", which shows what a second slot would cost this layout, or the ",[41,699,701],{"href":700},"\u002Fblog\u002Farduino-ide-vs-platformio-for-esp32","Arduino IDE vs PlatformIO"," post if you are still choosing where to set the scheme.",{"title":132,"searchDepth":704,"depth":704,"links":705},2,[706,707,708,709,710,711,712,713,714],{"id":53,"depth":704,"text":54},{"id":101,"depth":704,"text":102},{"id":187,"depth":704,"text":188},{"id":319,"depth":704,"text":320},{"id":399,"depth":704,"text":400},{"id":464,"depth":704,"text":465},{"id":515,"depth":704,"text":516},{"id":614,"depth":704,"text":615},{"id":678,"depth":704,"text":679},"guides","Guides","2026-11-14T00:00:00Z","What the ESP32 partition table is, how the partitions.csv columns work, the Arduino-ESP32 schemes with sizes, flash offsets by chip, and what N16R8 means.","md",[721,724,727,730,733],{"question":722,"answer":723},"Where is the partition table stored on an ESP32?","The ESP32 partition table is stored in flash at offset 0x8000 by default, according to the ESP-IDF documentation. It takes one 4 KB sector and holds up to 95 entries plus an MD5 checksum. The bootloader reads it at every boot to find the app and the data partitions.",{"question":725,"answer":726},"How do I change the partition scheme in Arduino IDE or PlatformIO?","In Arduino IDE, pick a layout under Tools, Partition Scheme, or put a partitions.csv file next to your sketch. In PlatformIO, set board_build.partitions in platformio.ini to a built-in table such as huge_app.csv or to your own CSV file in the project root.",{"question":728,"answer":729},"What does N16R8 mean on an ESP32-S3 module?","In ESP32-S3-WROOM-1-N16R8, N16 means 16 MB of quad SPI flash and R8 means 8 MB of octal SPI PSRAM, according to Espressif's datasheet. The flash size decides how large your partition table can be. The PSRAM is extra RAM and does not appear in the partition table.",{"question":731,"answer":732},"Does PSRAM change the ESP32 partition table?","No. PSRAM is RAM, so it has no partition and takes no flash space. Only the flash size matters for the table. A module with octal PSRAM, such as the N16R8, does reserve GPIO35 to GPIO37 for the PSRAM, which affects your pin choices but not your partitions.",{"question":734,"answer":735},"Does flashing a new partition table erase my data?","Flashing a partition table does not erase the other flash contents, per the ESP-IDF documentation. But data is read by offset: if the new table moves or resizes a partition, the old content is misread there. Keep nvs at the same offset and size, and the saved settings survive.","\u002Fimages\u002Fblog\u002Fesp32-partition-table-explained.jpg","A maker with glasses slides a blue app0 block into a gap in a long flash bar made of nvs, app1 and spiffs blocks, with a small chip icon at the left end.","en",{},true,"\u002Fblog\u002Fesp32-partition-table-explained",{"title":5,"description":718},{"loc":741},"blog\u002Fesp32-partition-table-explained","The ESP32 partition table sits at 0x8000 and splits the flash into nvs, otadata, app and filesystem partitions. OpenGizmo's huge_app.csv gives one 3 MB app slot and no OTA.",[747,748,749,750,751],"ESP32","Firmware","Embedded Systems","PlatformIO","OpenGizmo","DSyWbwKral7i8LTIPntDpl0FjcRiX7IaIprS-WyGFUw",[754,760,769,777],{"title":755,"description":756,"image":757,"categoryText":716,"categorySlug":715,"tags":758,"path":259},"ESP Web Tools: Flash an ESP32 From Your Browser","Flash an ESP32 from the browser with ESP Web Tools or esptool-js: how Web Serial, the manifest and the flash offsets work, with a real OpenGizmo manifest.","\u002Fimages\u002Fblog\u002Fesp-web-tools-flash-esp32-from-browser.jpg",[747,748,759,751,749],"Development Tools",{"title":761,"description":762,"image":763,"categoryText":764,"categorySlug":765,"tags":766,"path":768},"ESPHome vs Custom Firmware on ESP32: Which to Use","ESPHome or custom ESP32 firmware? A decision table, what ESPHome can't do, and why OpenGizmo's own web app, portal and MCP server use PlatformIO.","\u002Fimages\u002Fblog\u002Fesphome-vs-custom-esp32-firmware.jpg","Comparisons","comparisons",[747,748,767,750,751],"Home Automation","\u002Fblog\u002Fesphome-vs-custom-esp32-firmware",{"title":770,"description":771,"image":772,"categoryText":716,"categorySlug":715,"tags":773,"path":776},"What Is OpenGizmo? Open-Source ESP32 Gadgets You Can Flash","OpenGizmo is a set of MIT-licensed ESP32 gadgets by Mauro Brambilla: a crypto LED ticker, a Reolink NVR switch and an ESP32-CAM, each flashed from the browser.","\u002Fimages\u002Fblog\u002Fwhat-is-open-gizmo.png",[751,774,747,748,775],"Open Source","3D Printing","\u002Fblog\u002Fwhat-is-opengizmo",{"title":778,"description":779,"image":780,"categoryText":716,"categorySlug":715,"tags":781,"path":784},"CoinGecko API on ESP32: Free Limits and Polling Rate","CoinGecko's free Demo plan allows 100 calls a minute and 10,000 a month. The polling math for an ESP32, how to send the key, and what HTTP 429 means.","\u002Fimages\u002Fblog\u002Fcoingecko-api-esp32-rate-limits.jpg",[747,782,748,751,783],"IoT","MAX7219","\u002Fblog\u002Fcoingecko-api-esp32-rate-limits",[786,792,796],{"name":787,"slug":788,"path":789,"count":790,"image":791},"Builds","builds","\u002Fblog\u002Fcategories\u002Fbuilds",6,"\u002Fimages\u002Fblog\u002F3d-printed-esp32-enclosure-design-guide.jpg",{"name":764,"slug":765,"path":793,"count":794,"image":795},"\u002Fblog\u002Fcategories\u002Fcomparisons",8,"\u002Fimages\u002Fblog\u002Fesp32-ota-update-methods-compared.jpg",{"name":797,"slug":798,"path":799,"count":800,"image":801},"Troubleshooting","troubleshooting","\u002Fblog\u002Fcategories\u002Ftroubleshooting",5,"\u002Fimages\u002Fblog\u002Fesp32-brownout-detector-was-triggered.jpg",1795018237910]