<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Solving Error: Unknown flash device: An OpenOCD Upgrade for Pi Pico / Xiao and other RP2040 Boards</title><link>/products/raspberry-pi/raspberrypi_projects/b/blog/posts/solving-error-unknown-flash-device-an-openocd-upgrade-for-pi-pico-xiao-and-other-rp2040-boards</link><description>Table of Contents

 Introduction 
 What is the Problem? 
 What is the Long Solution 

 Flash Chip Identifiers 


 Short Solution 
 Summary 



Introduction
There exists software called OpenOCD that plays a fairly crucial role in the software development</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Solving Error: Unknown flash device: An OpenOCD Upgrade for Pi Pico / Xiao and other RP2040 Boards</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/solving-error-unknown-flash-device-an-openocd-upgrade-for-pi-pico-xiao-and-other-rp2040-boards</link><pubDate>Sat, 14 Feb 2026 20:56:10 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8fe0aa59-dedb-4146-ac86-12b43a89b9ef</guid><dc:creator>Coconut1</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I had the exact same problem as described above. Bought 4 cheap Pico Boards online and encountered the connection problem when starting to debug.&lt;br /&gt;With a closer look at the board I could see that there is no 10-pin voltage regulator but a unknown 6-pin and additionally a 2MB Flash &amp;#39;BY25Q16ES&amp;#39; from&amp;nbsp;&lt;br /&gt;the chines manufacture BYTe Semiconductor. So I was sure, these boards where counterfeit PICOs.&amp;nbsp;&lt;br /&gt;The error message then was&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;gt; Error: Unknown flash device (ID 0x001540&lt;strong&gt;68&lt;/strong&gt;)&lt;br /&gt;&lt;br /&gt;The by far easiest way to solve this, is to open the openocd.exe in a text editor and search for the entries of the table shown above.&lt;br /&gt;The 10 values of each line there will be interpreted as:&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; name,&amp;nbsp; &amp;nbsp;read_cmd,&amp;nbsp; &amp;nbsp;qread_cmd,&amp;nbsp; &amp;nbsp; pprog_cmd,&amp;nbsp; &amp;nbsp; &amp;nbsp;erase_cmd,&amp;nbsp; &amp;nbsp; chip_erase_cmd,&amp;nbsp; &amp;nbsp; &amp;nbsp;device_id,&amp;nbsp; &amp;nbsp; &amp;nbsp;pagesize,&amp;nbsp; &amp;nbsp; &amp;nbsp;sectorsize,&amp;nbsp; &amp;nbsp; &amp;nbsp;size_in_bytes&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Now since I knew my Flash device, I download its data sheet and checked for the read/write/prog/erase commands and found that there already is an almost identical device&amp;nbsp;&lt;br /&gt;given with a slightly different device ID 0x001540&lt;strong&gt;C8&lt;/strong&gt;. The rest was easy.&amp;nbsp;&lt;br /&gt;Seraching in a text editor (e.g. np++ in HEX-mode) for the byte-sequence &amp;quot;C8 40 15 00&amp;quot; and finding a &amp;quot;03 00 02 D8 C7 00 00 00&amp;quot; next to it, indicating the correct file position.&amp;nbsp;&lt;br /&gt;Now I changed the &amp;quot;&lt;strong&gt;C8&lt;/strong&gt;&amp;quot; to &amp;quot;&lt;strong&gt;68&lt;/strong&gt;&amp;quot; and saved the modified file openocd.exe.&lt;br /&gt;&lt;br /&gt;And it worked!!! The debugger now starts smoothly and every thing is fine ... now after 30+ hours of serching and trying.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27980&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Solving Error: Unknown flash device: An OpenOCD Upgrade for Pi Pico / Xiao and other RP2040 Boards</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/solving-error-unknown-flash-device-an-openocd-upgrade-for-pi-pico-xiao-and-other-rp2040-boards</link><pubDate>Sat, 14 Feb 2026 20:44:54 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8fe0aa59-dedb-4146-ac86-12b43a89b9ef</guid><dc:creator>Coconut1</dc:creator><slash:comments>0</slash:comments><description>&lt;p lang="en-GB"&gt;I had the exact same problem as described above. Bought 4 cheap Pico Boards online and encountered the connection problem when starting to debug.&lt;br /&gt;With a closer look at the board I could see that there is no 10-pin voltage regulator but a unknown 6-pin and additionally a 2MB Flash&amp;nbsp;BY25Q16ES from the chines manufacture BYTe Semiconductor. So I was sure, these boards where counterfeit PICOs. The error message then was &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--&amp;gt;&amp;nbsp; Error: Unknown flash device (ID 0x&lt;span&gt;00154068&lt;/span&gt;)&lt;/p&gt;
&lt;p lang="en-GB"&gt;The by far easiest way to solve this, is to open the openocd.exe in a text editor and search for the entries of the&amp;nbsp;table shown above.&lt;br /&gt;The 10 values of each line there will be interpreted as:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name,&amp;nbsp; &amp;nbsp; &amp;nbsp; read_cmd,&amp;nbsp; &amp;nbsp; &amp;nbsp; qread_cmd,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pprog_cmd,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;erase_cmd,&amp;nbsp; &amp;nbsp; &amp;nbsp; chip_erase_cmd,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;device_id,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pagesize,&amp;nbsp; &amp;nbsp; &amp;nbsp;sectorsize,&amp;nbsp; &amp;nbsp; &amp;nbsp; size_in_bytes&lt;/p&gt;
&lt;p lang="en-GB"&gt;Now since I knew my Flash device I download its data sheet and checked for the read/write/prog/erase commands and found that there already is an almost identical device &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;st m25pe16&amp;quot; given with a slightly different device ID 0x&lt;span&gt;00158020&lt;/span&gt;.&lt;br /&gt;The rest was easy. Seraching in a text editor (e.g. np++ in HEX-mode) for the byte-sequence &amp;ldquo;20 80 15 00&amp;rdquo; and finding a &amp;ldquo;03 00 02 D8 C7 00 00 00&amp;rdquo; next to it, indicating the correct file position. Now I changed the &amp;quot;20 80&amp;quot; to &lt;span&gt;6&lt;/span&gt;8 40&amp;quot; and saved the modified file.&lt;/p&gt;
&lt;p lang="en-GB"&gt;And viola &amp;hellip; it worked. The debugger now started smoothly. Every thing is fine now &amp;hellip; after 50+ hours of serching and trying.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27980&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Solving Error: Unknown flash device: An OpenOCD Upgrade for Pi Pico / Xiao and other RP2040 Boards</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/solving-error-unknown-flash-device-an-openocd-upgrade-for-pi-pico-xiao-and-other-rp2040-boards</link><pubDate>Thu, 28 Aug 2025 23:36:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8fe0aa59-dedb-4146-ac86-12b43a89b9ef</guid><dc:creator>fischp</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Hi, I just bought several RP Picos and I&amp;#39;m having an issue getting my openocd to work with it.&amp;nbsp; I&amp;#39;m using vscode and the pico extension on my mac.&amp;nbsp; I&amp;#39;ll paste a copy of the debug session&amp;#39;s output below, but basically, it doesn&amp;#39;t recognize my flash ID.&amp;nbsp; I forked your openocd code and I&amp;#39;d like to add my chip&amp;#39;s details into the spi.c file.&amp;nbsp; Sadly, I don&amp;#39;t know what to put into the file other than the chip&amp;#39;s id.&amp;nbsp; How can I find this or can you please help/guide me?&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s the debug output:&lt;br /&gt;&lt;br /&gt;[2025-08-28T23:18:55.821Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to &amp;quot;DEBUG CONSOLE&amp;quot; to see GDB interactions.&lt;br /&gt;/Users/fischp/.pico-sdk/openocd/0.12.0+dev/openocd.exe -c &amp;quot;gdb_port 50000&amp;quot; -c &amp;quot;tcl_port 50001&amp;quot; -c &amp;quot;telnet_port 50002&amp;quot; -s /Users/fischp/.pico-sdk/openocd/0.12.0+dev/scripts -f /Users/fischp/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c &amp;quot;adapter speed 5000&amp;quot;&lt;br /&gt;Open On-Chip Debugger 0.12.0+dev (2025-07-17-12:44)&lt;br /&gt;Licensed under GNU GPL v2&lt;br /&gt;For bug reports, read&lt;br /&gt; &lt;a href="http://openocd.org/doc/doxygen/bugs.html" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;openocd.org/.../bugs.html&lt;/a&gt;&lt;br /&gt;DEPRECATED! use &amp;#39;gdb port&amp;#39;, not &amp;#39;gdb_port&amp;#39;&lt;br /&gt;DEPRECATED! use &amp;#39;tcl port&amp;#39; not &amp;#39;tcl_port&amp;#39;&lt;br /&gt;DEPRECATED! use &amp;#39;telnet port&amp;#39;, not &amp;#39;telnet_port&amp;#39;&lt;br /&gt;CDLiveWatchSetup&lt;br /&gt;Info : [rp2040.core0] Hardware thread awareness created&lt;br /&gt;Info : [rp2040.core1] Hardware thread awareness created&lt;br /&gt;adapter speed: 5000 kHz&lt;br /&gt;Info : Listening on port 50001 for tcl connections&lt;br /&gt;Info : Listening on port 50002 for telnet connections&lt;br /&gt;Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E663AC91D37B8939&lt;br /&gt;Info : CMSIS-DAP: SWD supported&lt;br /&gt;Info : CMSIS-DAP: Atomic commands supported&lt;br /&gt;Info : CMSIS-DAP: Test domain timer supported&lt;br /&gt;Info : CMSIS-DAP: FW Version = 2.0.0&lt;br /&gt;Info : CMSIS-DAP: Interface Initialised (SWD)&lt;br /&gt;Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0&lt;br /&gt;Info : CMSIS-DAP: Interface ready&lt;br /&gt;Info : clock speed 5000 kHz&lt;br /&gt;Info : SWD DPIDR 0x0bc12477, DLPIDR 0x00000001&lt;br /&gt;Info : SWD DPIDR 0x0bc12477, DLPIDR 0x10000001&lt;br /&gt;Info : [rp2040.core0] Cortex-M0+ r0p1 processor detected&lt;br /&gt;Info : [rp2040.core0] target has 4 breakpoints, 2 watchpoints&lt;br /&gt;Info : [rp2040.core0] Examination succeed&lt;br /&gt;Info : [rp2040.core1] Cortex-M0+ r0p1 processor detected&lt;br /&gt;Info : [rp2040.core1] target has 4 breakpoints, 2 watchpoints&lt;br /&gt;Info : [rp2040.core1] Examination succeed&lt;br /&gt;Info : [rp2040.core0] starting gdb server on 50000&lt;br /&gt;Info : Listening on port 50000 for gdb connections&lt;br /&gt;Info : accepting &amp;#39;gdb&amp;#39; connection on tcp/50000&lt;br /&gt;Info : no SDFP found&lt;br /&gt;Error: RP2040 rev 2, QSPI Flash id = 0x154068 not recognised&lt;br /&gt;Error: auto_probe failed&lt;br /&gt;Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use &amp;#39;gdb_memory_map disable&amp;#39;.&lt;br /&gt;Error: attempted &amp;#39;gdb&amp;#39; connection rejected&lt;br /&gt;shutdown command invoked&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27980&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Solving Error: Unknown flash device: An OpenOCD Upgrade for Pi Pico / Xiao and other RP2040 Boards</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/solving-error-unknown-flash-device-an-openocd-upgrade-for-pi-pico-xiao-and-other-rp2040-boards</link><pubDate>Sun, 19 May 2024 06:47:07 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8fe0aa59-dedb-4146-ac86-12b43a89b9ef</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;If you used the &lt;a href="https://www.raspberrypi.com/news/raspberry-pi-pico-windows-installer/" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Windows Installer&amp;nbsp;for the Pico C SDK&lt;/a&gt;, the easiest way to update&amp;nbsp;its OPENOCD installation is to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;back up&amp;nbsp;SDK_ROOT/openocd/openocd.exe&lt;/li&gt;
&lt;li&gt;copy shabaz&amp;#39; ZIPFILE/openocd/src/openocd.exe to SDK_ROOT/openocd/openocd.exe&lt;/li&gt;
&lt;li&gt;back up&amp;nbsp;SDK_ROOT/openocd/scripts/target/rp2040.cfg&lt;/li&gt;
&lt;li&gt;copy&amp;nbsp;ZIPFILE&lt;span&gt;/&lt;/span&gt;openocd/tcl/target/rp2040.cfg to SDK_ROOT/openocd/scripts/target/rp2040.cfg&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Tested with a Pico RP2040 and XIAO RP2040, and SDK version 1.5.1.&lt;br /&gt;Expected to work with SDK 1.5.0 too, as it uses the exact same OPENOCD setup as 1.5.1.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27980&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>