MCPcopy Index your code
hub / github.com/Ansem-SoD/Picofly

github.com/Ansem-SoD/Picofly @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
99 symbols 239 edges 25 files 8 documented · 8% updated 3y ago★ 1,22845 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Picofly

Information and firmware related to the rp2040-zero based chip for the switch. all credits goto Rehius, flynnsmt4, Vittorio and anyone else who helped for the released firmwares

Troubleshooting

As of firmware 2.70 and beyond, the debug led color and codes have chanaged.

  • now it's only 3 colours: blue (glitching), white (flashing), yellow (error code). This was made to make possible pi pico debugging + get rid of RGB/GRB issues

Error codes list (= is long pulse, * is short pulse):

  • = USB flashing done

  • ** RST is not connected

  • *= CMD is not connected
  • =* D0 is not connected
  • == CLK is not connected

  • =** eMMC init failure during glitch process

  • =*= CPU never reach BCT check, should not happen
  • ==* CPU always reach BCT check (no glitch reaction, check mosfet)
  • === Glitch attempt limit reached, cannot glitch

  • =*** eMMC init failure

  • =**= eMMC write failure - comparison failed
  • == eMMC write failure - write failed
  • =*== eMMC test failure - read failed
  • ==** eMMC read failed during firmware update
  • ==*= BCT copy failed - write failure
  • ===* BCT copy failed - comparison failure
  • ==== BCT copy failed - read failure

The second major feature is CPU downvoltage. This might be useful when your MOSFET (or the wire) is not strong enough for the glitch. (do you remember the case where you press "RESET" on the rp2040 when joycon logo appears to make it working? that's it, system lowers CPU voltage) Therefore you can solder two additional wires to the chip so it could lower the CPU voltage making the glitch easier. This is optional! only if you really need.

  • Waveshare rp2040: SDA=12, SCL=13
  • Pi Pico: SDA = 19, SCL = 20
  • XIAO 2040: SDA=3, SCL=4
  • ItayBitsy 2040: SDA = 18, SCL = 19

Core symbols most depended-on inside this repo

halt_with_error
called by 22
code/usk/misc.c
put_pixel
called by 9
code/usk/misc.c
gpio_disable_input_output
called by 8
code/usk/misc.c
led_pin
called by 7
code/usk/board_detect.c
pwr_pin
called by 7
code/usk/board_detect.c
detect_by_pull_up
called by 6
code/usk/board_detect.c
gli_pin
called by 6
code/usk/board_detect.c
write_data
called by 5
code/usk/payload.c

Shape

Function 93
Class 5
Enum 1

Languages

C96%
Python3%
C++1%

Modules by API surface

code/usk/payload.c32 symbols
code/usk/board_detect.c14 symbols
code/usk/config.c11 symbols
code/usk/glitch.c10 symbols
code/busk/main.c9 symbols
code/usk/misc.c8 symbols
code/usk/main.c5 symbols
code/usk/prepare.py3 symbols
code/usk/fuses.c3 symbols
code/usk/pio_upload.c1 symbols
code/usk/boot_detect.c1 symbols
code/busk/firmware.h1 symbols

For agents

$ claude mcp add Picofly \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact