Hacking Hardware Picofly - a HWFLY switch modchip

marhalloweenvt

Well-Known Member
Member
Joined
Oct 2, 2014
Messages
235
Trophies
0
Age
29
XP
912
Country
If anyone gets the following error:
Code:
wwiii@wwiii-VAIO MSYS ~/picotool/build
$ cmake -G "MSYS Makefiles" -DPC_LIBUSB_INCLUDEDIR="/mingw64/include/libusb-1.0" ..
CMake Error: Could not create named generator MSYS Makefiles
Yeah, those errors are really annoying with Mingw. I faced it many times when ever I use Mingw on Window environment. My another hobby requires lots of Linux based system to produce FW file. For times, I have set-up a Linux machine act as server with multipurpose and service for ease of mind.
 
  • Like
Reactions: binkinator

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,065
Trophies
3
Age
46
Location
At my chair.
XP
17,666
Country
Colombia
If anyone gets the following error:
Code:
wwiii@wwiii-VAIO MSYS ~/picotool/build
$ cmake -G "MSYS Makefiles" -DPC_LIBUSB_INCLUDEDIR="/mingw64/include/libusb-1.0" ..
CMake Error: Could not create named generator MSYS Makefiles

Generators
* Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
Ninja Multi-Config = Generates build-<Config>.ninja files.
CodeBlocks - Ninja = Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
CodeLite - Ninja = Generates CodeLite project files.
CodeLite - Unix Makefiles = Generates CodeLite project files.
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
Kate - Ninja = Generates Kate project files.
Kate - Unix Makefiles = Generates Kate project files.
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files.


wwiii@wwiii-VAIO MSYS ~/picotool/build
$ which cmake
/usr/bin/cmake

wwiii@wwiii-VAIO MSYS ~/picotool/build
It's because regular cmake has priority in your path over the mingw version.

Try this to fix it:

Code:
wwiii@wwiii-VAIO MSYS ~/picotool/build
$ export PATH=/mingw64/bin:$PATH

wwiii@wwiii-VAIO MSYS ~/picotool/build
$ which cmake
/mingw64/bin/cmake

wwiii@wwiii-VAIO MSYS ~/picotool/build
$ cmake -G "MSYS Makefiles" -DPC_LIBUSB_INCLUDEDIR="/mingw64/include/libusb-1.0" ..
Thank you so much buddy, copying this information on my personal record :D
 
  • Love
Reactions: binkinator

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,152
Country
United States
  • Like
  • Love
Reactions: impeeza and peteruk

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,152
Country
United States
Thank you so much buddy, copying this information on my personal record :D
You bet!

Trying to catch up with everyone else in this thread that seems to know how to do everything already.

End goal is to get my device ID so if this thing every materializes I'll be ready...

Here's the next thing that stumped me for a bit while trying to get the pico-examples to compile (you might have breezed through this but I'm a nüb sometimes.)

DILLIGAF!

Code:
wwiii@wwiii-VAIO MSYS ~/projects/pico-examples/build
$ cmake ..
-- Building for: Ninja
Using PICO_SDK_PATH from environment ('C:/Users/wwiii/projects/pico-sdk/')
PICO_SDK_PATH is C:/Users/wwiii/projects/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
-- Defaulting build type to 'Release' since not specified.
PICO compiler is pico_arm_gcc
CMake Error at C:/Users/wwiii/projects/pico-sdk/cmake/preload/toolchains/find_compiler.cmake:28 (message):
  Compiler 'arm-none-eabi-gcc' not found, you can specify search path with
  "PICO_TOOLCHAIN_PATH".
Call Stack (most recent call first):
  C:/Users/wwiii/projects/pico-sdk/cmake/preload/toolchains/pico_arm_gcc.cmake:20 (pico_find_compiler)
  C:/devkitPro/msys2/mingw64/share/cmake/Modules/CMakeDetermineSystem.cmake:124 (include)
  CMakeLists.txt:6 (project)


CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool
.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Install the following (and select all 4 packages)

Code:
pacman -S mingw-w64-x86_64-arm-none-eabi-toolchain

wwiii@wwiii-VAIO MSYS ~/projects/pico-examples
$ mkdir build; cd build

wwiii@wwiii-VAIO MSYS ~/projects/pico-examples/build
$ cmake ..
PICO_SDK_PATH is C:/Users/wwiii/projects/pico-sdk
PICO platform is rp2040.
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/devkitPro/msys2/mingw64/bin/arm-none-eabi-gcc.exe
Build type is Release
Defaulting PICO target board to pico since not specified.
Using board configuration from C:/Users/wwiii/projects/pico-sdk/src/boards/include/boards/pico.h
-- Found Python3: C:/Users/wwiii/AppData/Local/Programs/Python/Python310/python.exe (found version "3.10.0") found components: Interpreter
TinyUSB available at C:/Users/wwiii/projects/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
cyw43-driver available at C:/Users/wwiii/projects/pico-sdk/lib/cyw43-driver
lwIP available at C:/Users/wwiii/projects/pico-sdk/lib/lwip
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/wwiii/projects/pico-examples/build
 

Mr Skinner

Well-Known Member
Member
Joined
Jul 12, 2010
Messages
162
Trophies
1
Age
36
Location
Bananna Land.
Website
www.nerdfy.com.br
XP
831
Country
Brazil
Honestly, it’s weird. More info and/or uncut video of this thing booting, or it didn’t happen

I had the same feeling with the emmc interface assembly. The correct thing would be to use a pin for voltage control. I still doubt it, because there are pins that are not consistently explained in the assembly (everything is encrypted, so no conclusions) But I don't think it's fake, I'm just curious about the kind of "trick" the dev would have used to flash with custom bootcode with so much limitation. We know it's possible to convert syntax to binary, but could the 2040 REALLY have write access make any like that?

In any case, if it works, I am extremely happy, not so much for the result, but for feeling the amount of effort involved in solving these logical problems.
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,152
Country
United States
Because it's the datasheet for the microcontroller and not the SPI flash chip the ID is read from. :P
Ah. Makes sense. Appreciate the hint. I was up to page 75...guess I can stop now. Shits dryer than Michener fr tho.
 
  • Like
Reactions: peteruk

TheSynthax

Well-Known Member
Member
Joined
Apr 29, 2018
Messages
220
Trophies
0
XP
509
Country
United States
unable to find a datasheet for that SPI NOR, top of the chip reads "1p138 0q24fg" probably can't change the unique ID of it anyway, but who knows?
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,350
Trophies
1
XP
3,236
Country
The flash used on the Pico boards is Winbond W25Q080 according to the SDK. Strangely there are only datasheets for W25Q80 without the extra 0. Close enough i guess. Capacity is 16 megabit.

Note that this may differ from what the author of the leaked firmware used. But the ID format description should still be useful.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Snow days $25 on steam may grab it
  • SylverReZ @ SylverReZ:
    Measuring sizes with AncientBoi, I see.
  • K3Nv2 @ K3Nv2:
    I guess Ancientboi would be Peter
    +2
  • SylverReZ @ SylverReZ:
    Loooooool :rofl2:
  • SylverReZ @ SylverReZ:
    So true
  • BigOnYa @ BigOnYa:
    @K3Nv2 Snow Day is pretty fun. My only bitch would be the camera controls, when you move around, say down, you have to move the right stick left or right to get camera to turn and get your view, other than that I like it so far.
  • K3Nv2 @ K3Nv2:
    From what people say pvp isn't even worth it
  • BigOnYa @ BigOnYa:
    I just been playing offline, and they give you a few bots here n there on your team to help battle. I don't think it's as funny as the other games tho, more battle oriented than humor, which kinda sucks, but I'm still early in it
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, doesnt the game have a campaign mode?
  • BigOnYa @ BigOnYa:
    Yea, and co-op, but you can also start a pvp session and battle just with friends. You get special skill cards (powers) the more you play. And higher value cards, but you can only enable so many cards at a time.
  • K3Nv2 @ K3Nv2:
    If you can find enough for it
  • BigOnYa @ BigOnYa:
    Toilet paper is considered the money, you collect and buy stuff with TP, kinda funny. Graphics are def better than the other games tho, I think they used Unity 5 engine.
  • Psionic Roshambo @ Psionic Roshambo:
    Look if I zoom in enough I can see the herpes!!!
    +1
  • BigOnYa @ BigOnYa:
    In fact I'm gonna go make a drink, roll a fatty n play some, good night to all!
    +2
  • Xdqwerty @ Xdqwerty:
    I bet most people at the time still watched it in black and white
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Many of them did before colour television was common.
  • SylverReZ @ SylverReZ:
    Likely because black and white TV was in-expensive.
    +1
  • K3Nv2 @ K3Nv2:
    It certainly wasn't inexpensive it cost the same as a new car back then
  • K3Nv2 @ K3Nv2:
    How much did a 1965 color TV cost?

    For example, a 21-inch (diagonal) GE color television in 1965 had an advertised price of $499, which is equal to $4,724 in today's dollars, according to the federal government's inflation calculator.
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, take into consideration how economy was back then
    Xdqwerty @ Xdqwerty: @K3Nv2, take into consideration how economy was back then