{"id":149,"date":"2025-05-15T23:18:11","date_gmt":"2025-05-15T15:18:11","guid":{"rendered":"http:\/\/47.111.133.139\/?p=149"},"modified":"2025-05-21T22:43:54","modified_gmt":"2025-05-21T14:43:54","slug":"fatfs","status":"publish","type":"post","link":"https:\/\/yin.nnneri.me\/?p=149","title":{"rendered":"fatfs\uff08\u672a\u5b8c\u6210\uff09"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u914d\u7f6e<\/h2>\n\n\n<h3 class=\"wp-block-heading\">\u4fee\u6539\u8bbe\u5b9a\u914d\u7f6e<\/h3>\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728 <code>SDK Configuration editor<\/code> \u4e2d\u627e\u5230 <code>Partition Table<\/code><br>\u9009\u9879\u6539\u6210 <code>Custom partition table CSV<\/code><\/li>\n\n\n\n<li>\u627e\u5230 <code>Custom partition CSV file<\/code><br>\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u548c\u8be5\u540d\u79f0\u76f8\u540c\u7684\u6587\u4ef6\uff08\u540d\u5b57\u53ef\u4fee\u6539\uff0c\u4f46\u5fc5\u987b\u4fdd\u6301\u4e00\u81f4\uff09<\/li>\n\n\n\n<li>\u4fdd\u5b58\u5e76\u9000\u51fa<\/li>\n<\/ul>\n\n\n<h3 class=\"wp-block-heading\">\u7f16\u5199\u5206\u533a\u8868<\/h3>\n\n\n<p>\u5206\u533a\u8868\u793a\u4f8b\uff1a\u624b\u52a8\u5212\u5206fat\u5206\u533a<\/p>\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#333545;color:#ebebe6\">C<\/span><span role=\"button\" tabindex=\"0\" data-code=\"# Name,   Type, SubType, Offset,  Size, Flags\n# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap\nnvs,      data, nvs,     0x9000,  0x6000,\nphy_init, data, phy,     0xf000,  0x1000,\nfactory,  app,  factory, 0x10000, 1M,\nstorage,  data, fat,     ,        1M,\" style=\"color:#f6f6f4;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dracula-soft\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F6F6F4\"># Name,   Type, SubType, Offset,  <\/span><span style=\"color: #97E1F1; font-style: italic\">Size<\/span><span style=\"color: #F6F6F4\">, Flags<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F6F6F4\"># Note: <\/span><span style=\"color: #F286C4\">if<\/span><span style=\"color: #F6F6F4\"> you have increased the bootloader size, make sure to update the offsets to avoid overlap<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F6F6F4\">nvs,      data, nvs,     <\/span><span style=\"color: #F286C4\">0x<\/span><span style=\"color: #BF9EEE\">9000<\/span><span style=\"color: #F6F6F4\">,  <\/span><span style=\"color: #F286C4\">0x<\/span><span style=\"color: #BF9EEE\">6000<\/span><span style=\"color: #F6F6F4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F6F6F4\">phy_init, data, phy,     <\/span><span style=\"color: #F286C4\">0x<\/span><span style=\"color: #BF9EEE\">f000<\/span><span style=\"color: #F6F6F4\">,  <\/span><span style=\"color: #F286C4\">0x<\/span><span style=\"color: #BF9EEE\">1000<\/span><span style=\"color: #F6F6F4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F6F6F4\">factory,  app,  factory, <\/span><span style=\"color: #F286C4\">0x<\/span><span style=\"color: #BF9EEE\">10000<\/span><span style=\"color: #F6F6F4\">, <\/span><span style=\"color: #EE6666; font-style: italic; text-decoration: underline\">1M<\/span><span style=\"color: #F6F6F4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F6F6F4\">storage,  data, fat,     ,        <\/span><span style=\"color: #EE6666; font-style: italic; text-decoration: underline\">1M<\/span><span style=\"color: #F6F6F4\">,<\/span><\/span><\/code><\/pre><\/div>\n\n\n<p>\u9700\u8981\u6ce8\u610f<\/p>\n\n\n<ul class=\"wp-block-list\">\n<li>NVS\u5206\u533a\u5927\u5c0f\u6700\u5c0f0x3000\u5b57\u8282<\/li>\n\n\n\n<li><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-orange-color\">\u6240\u6709\u5206\u533a\u7684Offset\u5747\u53ef\u4ee5\u4e3a\u7a7a\uff0c\u7a0b\u5e8f\u4f1a\u81ea\u884c\u8ba1\u7b97<\/mark><\/li>\n\n\n\n<li>app\u7c7b\u578b\u5206\u533a\u5fc5\u987b64K\u5bf9\u9f50<\/li>\n\n\n\n<li>\u6240\u6709\u5206\u533a\u5fc5\u987b4K\u5bf9\u9f50<\/li>\n<\/ul>\n\n\n<h3 class=\"wp-block-heading\">\u4fee\u6539CMakeLists\uff08\u5982\u679c\u9700\u8981\u70e7\u5f55\u65f6\u5199\u5165\u6587\u4ef6\uff09<\/h3>\n\n\n<p>\u66f4\u6539\/main\/CMakeLists.txt<\/p>\n\n\n<p>\u6dfb\u52a0<\/p>\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#333545;color:#ebebe6\">C<\/span><span role=\"button\" tabindex=\"0\" data-code=\"fatfs_create_rawflash_image(storage &lt;\u4f60\u7684\u9700\u8981\u955c\u50cf\u7684\u8def\u5f84&gt; FLASH_IN_PROJECT PRESERVE_TIME)\" style=\"color:#f6f6f4;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dracula-soft\" style=\"background-color: #282A36\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #62E884\">fatfs_create_rawflash_image<\/span><span style=\"color: #F6F6F4\">(storage <\/span><span style=\"color: #F286C4\">&lt;<\/span><span style=\"color: #F6F6F4\">\u4f60\u7684\u9700\u8981\u955c\u50cf\u7684\u8def\u5f84<\/span><span style=\"color: #F286C4\">&gt;<\/span><span style=\"color: #F6F6F4\"> FLASH_IN_PROJECT <\/span><span style=\"color: #FFB86C; font-style: italic\">PRESERVE_TIME<\/span><span style=\"color: #F6F6F4\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u521d\u59cb\u5316<\/h2>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u914d\u7f6e \u4fee\u6539\u8bbe\u5b9a\u914d\u7f6e \u7f16\u5199\u5206\u533a\u8868 \u5206\u533a\u8868\u793a\u4f8b\uff1a\u624b\u52a8\u5212\u5206fat\u5206\u533a \u9700\u8981\u6ce8\u610f \u4fee\u6539CMakeLists\uff08\u5982\u679c\u9700\u8981\u70e7\u5f55\u65f6\u5199\u5165\u6587\u4ef6\uff09 \u66f4\u6539 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-149","post","type-post","status-publish","format-standard","hentry","category-esp32"],"_links":{"self":[{"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=\/wp\/v2\/posts\/149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=149"}],"version-history":[{"count":7,"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=\/wp\/v2\/posts\/149\/revisions"}],"predecessor-version":[{"id":216,"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=\/wp\/v2\/posts\/149\/revisions\/216"}],"wp:attachment":[{"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yin.nnneri.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}