How to recover files (code) from a bricked Raspberry Pi Pico: Micropython & hex editing
In this video, I'll show you how to recover code and save power on your Raspberry Pi Pico, even if you've bricked it. In a previous video, I demonstrated how to clear or flash a Raspberry Pi Pico when it's bricked, but that process wiped out all the memory. Now, I'll show you how to recover your code and avoid losing your progress. I'll also explain how underclocking your Raspberry Pi Pico can save power and walk you through editing the hex dump to find and recover your main.py file. Whether you're working on a temperature probe project or another coding project, this guide will help you avoid frustration and keep your progress intact.
This is a followup on my quest to unbrick a raspberry pi pico.
in my original video (https://www.youtube.com/watch?v=wCMJaAg-owo) i used the more documented way to re-flash the pico. but what if you have files you need to recover.
this method works if you bricked a pico with micropython. I do not believe this will work if you need to recover data files used with a program in c/c++ as they use a different file system. and i have not tested how to recover those files (yet).
the way i bricked the pico (this time) is i slowed the clock to 10 MHz. from research I did after i made this video is, the usb serial clock needs to reinitialized after a clock speed change. I have not tested to do this in micropython (again yet).
this is the file i used in this video
https://micropython.org/resources/firmware/rp2-pico-20220117-v1.18.uf2
there are newer versions of micropython for the pico.
this is how i "fixed" it.
contents:
00:00 - intro
01:00 - how I bricked it (this time)
06:17 - getting hex dump of uf2 file (xxd)
07:25 - editing the hex dump (searching for main.py)
09:45 - recreating a uf2 file from the edited hexdump (xxd)
10:30 - uploading new file to the pico
12:00 - correct code that bricked pico (main.py)
12:40 - upload the standard micropython uf2 file
15:00 - closing
xxd man page
https://linux.die.net/man/1/xxd
Rp2040 Datasheet:
https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf
Raspberry Pi Pico Datasheet:
https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf
Raspberry Pi Pico pinout diagram:
https://datasheets.raspberrypi.com/pico/Pico-R3-A4-Pinout.pdf
Samples & Tests git:
https://github.com/transvidium/samplesandtests
Samples & Tests website:
https://transvidium.com/samplesandtests/
Playlist: https://www.youtube.com/watch?v=A6IFsDK65OY&list=PLGBh5bnttFWtnPfSYysLVLjYUkeRF1-qH
where to get a pico: https://www.microcenter.com/product/632771/raspberry-pi-pico-microcontroller-development-board
https://www.amazon.com/dp/B09QKDTWCD?ref=ppx_yo2ov_dt_b_product_details&th=1
Samples & Tests: Blog:
https://qwerty12134.blogspot.com/
⬇️⬇️⬇️Subscribe to our channel for more Videos!⬇️⬇️⬇️
👉https://www.youtube.com/channel/UCpWcbuBcTjHm8X6W0pySi5A?sub_confirmation=1
🔴Business inquiries:⬇️⬇️⬇️
https://docs.google.com/forms/d/e/1FAIpQLSfEiKjMGrgo3DcJRBRyuqIgPMpuI02c6UNhcxHDzupq69J7kg/viewform
🔴Affiliate Links: ⬇️⬇️⬇️
Namecheap Domains:
https://www.tkqlhce.com/click-100638314-12892698
Rexing wifi Dashcam:
https://www.anrdoezrs.net/click-100638314-13999325
RVT RV Finder:
https://www.anrdoezrs.net/click-100638314-10676664
Creality3D Printers:
https://www.tkqlhce.com/click-100638314-14476734
Adagio Teas:
https://www.jdoqocy.com/click-100638314-10405733
Signs on the cheap:
https://www.anrdoezrs.net/click-100638314-11312833
Filippa Marketplace:
https://www.jdoqocy.com/click-100638314-15232687
Holiday Autos:
https://www.anrdoezrs.net/click-100638314-12363666
Hushed (Telephone app):
https://www.tkqlhce.com/click-100638314-14417030
Vonage:
https://www.tkqlhce.com/click-100638314-15024364
RX Safety (Glasses):
https://www.tkqlhce.com/click-100638314-15138183
Segway (free shipping on orders over $99):
https://www.jdoqocy.com/click-100638314-15349390
AAA Auto Club:
https://www.anrdoezrs.net/click-100638314-15371181
Checks in the Mail:
https://www.anrdoezrs.net/click-100638314-13333421
Crystal Travel:
https://www.jdoqocy.com/click-100638314-13280458
🔴Affiliate Disclaimer :
The channel Samples & Tests is a channel dedicated to providing sample tests for various purposes. The channel is not affiliated with any particular testing organization. The channel provides sample tests for informational purposes only. The channel does not provide any guarantee of accuracy or completeness of any of the tests provided.
🔴Disclaimer :
This channel is all about samples and tests of technical projects. Any information provided in these videos is for educational and informational purposes only. I am not responsible for any actions you take as a result of watching any of my videos.
#raspberrypipico #micropython #bricked