{"id":9221,"date":"2026-03-10T20:26:39","date_gmt":"2026-03-11T03:26:39","guid":{"rendered":"https:\/\/visualgdb.com\/w\/?p=9221"},"modified":"2026-04-01T13:12:39","modified_gmt":"2026-04-01T20:12:39","slug":"upgrading-a-legacy-esp32-project-to-a-new-esp-idf-with-ai","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/ai\/esp32\/upgrading\/","title":{"rendered":"Upgrading a legacy ESP32 project to a new ESP-IDF with AI"},"content":{"rendered":"<p>This tutorial shows how to use AI to fix build errors caused by switching from ESP-IDF 4.x to 5.x. We will import an existing <a href=\"https:\/\/github.com\/framenic\/esp32-mqtt-switch\">open-source ESP32 MQTT demo<\/a>, try building it with ESP-IDF 5.5.2, and will then use AI-powered techniques to avoid fixing trivial errors by hand.<\/p>\n<p>Before you begin, install VisualGDB 6.1R3 or later.<\/p>\n<ol>\n<li>Start Visual Studio and open the ESP-IDF project wizard:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/01-esp.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9222\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/01-esp.png\" alt=\"\" width=\"890\" height=\"575\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/01-esp.png 890w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/01-esp-300x194.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/01-esp-768x496.png 768w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/a><\/li>\n<li>Enter the project name to create. You can keep an arbitrary folder here, as it will be updated later:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/02-name.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9223\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/02-name.png\" alt=\"\" width=\"890\" height=\"575\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/02-name.png 890w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/02-name-300x194.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/02-name-768x496.png 768w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/a><\/li>\n<li>Select &#8220;Import an existing project&#8221; and point to the location where you cloned the <a href=\"https:\/\/github.com\/framenic\/esp32-mqtt-switch\">project<\/a>. Make sure the &#8220;Relocate Visual Studio Project&#8221; checkbox is checked:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/03-import.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9224\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/03-import.png\" alt=\"\" width=\"856\" height=\"693\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/03-import.png 856w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/03-import-300x243.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/03-import-768x622.png 768w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/a><\/li>\n<li>Choose the latest ESP-IDF toolchain and the SDK:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/04-consolidated.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9225\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/04-consolidated.png\" alt=\"\" width=\"856\" height=\"693\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/04-consolidated.png 856w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/04-consolidated-300x243.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/04-consolidated-768x622.png 768w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/a><\/li>\n<li>Finally, you can enter the debug settings matching your board, or just proceed with the default ones:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/05-devkit.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9226\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/05-devkit.png\" alt=\"\" width=\"856\" height=\"693\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/05-devkit.png 856w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/05-devkit-300x243.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/05-devkit-768x622.png 768w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/a><\/li>\n<li>The original project was built using ESP-IDF 4.1, so building it with 5.5.2 results in over 50 errors:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/06-errors.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9227\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/06-errors.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/06-errors.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/06-errors-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/06-errors-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/06-errors-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a>If you look closely, many of them have similar causes. E.g. the MQTT configuration struct now uses nested structs (see the <a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/stable\/esp32\/migration-guides\/release-5.x\/5.0\/protocols.html\">migration guide<\/a>) and using signed format specifier (%d) for uint32_t now causes a compiler error.<\/li>\n<li>Most of the errors are rather trivial to fix, as soon as you look at the correct definitions. However, since the definitions are spread between multiple header files, many classical AI tools will take too long to produce meaningful results. We will now use VisualGDB&#8217;s symbol-level edits to quickly fix the errors without spending too many tokens. Click on the edit button above mqtt_init():<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/07-start-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9229\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/07-start-1.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/07-start-1.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/07-start-1-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/07-start-1-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/07-start-1-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<li>VisualGDB will create a new editing session, that includes <strong>mqtt_init()<\/strong> and all types referenced by it (e.g. <strong>esp_mqtt_client_config_t<\/strong>):<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/08-session.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9230\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/08-session.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/08-session.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/08-session-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/08-session-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/08-session-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a>Switch the mode to &#8220;Fix Errors&#8221; and make sure the references mode (magnet icon) is enabled, and press Go to start the edit.<\/li>\n<li>Most of the models will handle this rather fast, mapping the old definitions to the new definitions:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/09-fixed.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9231\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/09-fixed.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/09-fixed.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/09-fixed-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/09-fixed-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/09-fixed-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a>Here&#8217;s a quick overview of how different models handled the task (averaged over 3 re-runs):<br \/>\n<table style=\"border-collapse: collapse; width: 100%; height: 120px;\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; height: 24px;\">Model<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">Average time<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">Remarks<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; height: 24px;\">Claude Sonnet 4.6<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">17 sec<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">Cleanest<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; height: 24px;\">Gemini 3 Flash<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">11 sec<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">Good<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; height: 24px;\">Gemini 2.5 Flash<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">4 sec<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">75% success rate (broken syntax)<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 33.3333%; height: 24px;\">GPT-OSS-120B (Cerebras)<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">4 sec<\/td>\n<td style=\"width: 33.3333%; height: 24px;\">Tried initializing all fields<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>There is always a trade-off between using large vs. small models. Claude models typically produce good results, but are slow. GPT-OSS-120B running on the Cerebras platform is very fast, but tends to reformat code or remove comments. You can mitigate it by stepping back and giving instructions like &#8220;keep existing format&#8221;, or just stick to larger models.<\/li>\n<li>The remaining errors in the file are split between two symbols (<strong>send_timer()<\/strong> and <strong>mqttDataCb()<\/strong>). Instead of manually adding them to the context window, finish the session, and click the button in the top right corner of the editor:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/10-add.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9232\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/10-add.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/10-add.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/10-add-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/10-add-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/10-add-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<li>This will start another session featuring all the symbols with errors:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/11-symbols.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9233\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/11-symbols.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/11-symbols.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/11-symbols-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/11-symbols-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/11-symbols-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<li>This is a tricky one, since on most systems using <strong>%u<\/strong> for <strong>uint32_t<\/strong> will work just fine, so only Claude managed to get it right, taking about 60 seconds:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/12-fixed.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9234\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/12-fixed.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/12-fixed.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/12-fixed-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/12-fixed-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/12-fixed-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a>Other models either skipped several instances, or produced outright broken code. That said, giving them more precise instructions worked just fine:\n<pre>Use %lu for uint32_t and fix other specifiers<\/pre>\n<p>Gemini Flash 3 handled it in 28 seconds, and the older 2.5 did it in just 15 seconds.<\/li>\n<li>VisualGDB highlights the chunks of added\/deleted\/replaced text on the scroll bar, and also provides buttons for quickly jumping between the edits:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/13-jump.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9235\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/13-jump.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/13-jump.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/13-jump-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/13-jump-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/13-jump-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a>Smaller models that provide near-instant replies tend to reformat\/rewrite the code that was not a part of the problem. You can reject these edits efficiently by selecting the edited code and pressing the &#8220;reject&#8221; button (or using the context menu).<\/li>\n<li>None of the models figured out that the &#8220;array subscript is of type &#8216;char'&#8221; should be fixed by casting <strong>tolower<\/strong> argument to <strong>uint8_t<\/strong>, so this was easier done by hand:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/14-manual.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9236\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/14-manual.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/14-manual.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/14-manual-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/14-manual-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/14-manual-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<li>If you build the project now, it will raise 22 errors in different source files:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/15-build.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9238\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/15-build.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/15-build.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/15-build-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/15-build-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/15-build-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<li>You can fix groups of them by clicking the &#8220;Start error fixing session&#8221; button in the errors window. As most of the errors are in <strong>apconfig.c<\/strong>, let&#8217;s focus on fixing this file first:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/16-filter.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9239\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/16-filter.png\" alt=\"\" width=\"1186\" height=\"622\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/16-filter.png 1186w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/16-filter-300x157.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/16-filter-1024x537.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/16-filter-768x403.png 768w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/16-filter-390x205.png 390w\" sizes=\"(max-width: 1186px) 100vw, 1186px\" \/><\/a><\/li>\n<li>The errors are caused by changes in network-related function names, most of which are declared in <strong>esp_netif.h<\/strong> (you can find it out via global search in Code Explorer). Let&#8217;s tell the AI to look into that file when fixing the errors:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/17-netif.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9240\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/17-netif.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/17-netif.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/17-netif-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/17-netif-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/17-netif-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<li>Since the models now see the relevant declarations, rewriting the code to use them is fairly straight-forward:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/18-fixed.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9241\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/18-fixed.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/18-fixed.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/18-fixed-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/18-fixed-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/18-fixed-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<li>This did not fix the <strong>esp_efuse_mac_get_default()<\/strong> error (since it&#8217;s declared in another header), but using the VisualGDB&#8217;s header search worked just fine:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/19-fix.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9242\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/19-fix.png\" alt=\"\" width=\"1311\" height=\"801\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/19-fix.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/19-fix-300x183.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/19-fix-1024x626.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/19-fix-768x469.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<li>Most of the other errors involve trivial cast expressions, replacing <strong>portTICK_RATE_MS<\/strong> with <strong>portTICK_PERIOD_MS\u00a0<\/strong>and referencing the camera component via the Smart Terminal:\n<pre>idf.py add-dependency <span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>espressif\/esp32-camera<span class=\"pl-pds\">\"\r\nidf.py reconfigure<\/span><\/span><\/pre>\n<p>Having the remaining errors fixed, the project will build successfully, producing a valid executable:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/built.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9246\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/built.png\" alt=\"\" width=\"1311\" height=\"807\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/built.png 1311w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/built-300x185.png 300w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/built-1024x630.png 1024w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2026\/03\/built-768x473.png 768w\" sizes=\"(max-width: 1311px) 100vw, 1311px\" \/><\/a><\/li>\n<\/ol>\n<p>As of early 2026, the AI models are still very far from handling every development task. However, they got rather good at fixing repeating errors with minimal prompts, and VisualGDB&#8217;s symbol-level editing allows them to produce good results quickly and efficiently.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to use AI to fix build errors caused by switching from ESP-IDF 4.x to 5.x. We<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[253],"tags":[254,160],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/9221"}],"collection":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/comments?post=9221"}],"version-history":[{"count":4,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/9221\/revisions"}],"predecessor-version":[{"id":9247,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/9221\/revisions\/9247"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=9221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=9221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=9221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}