Hacking Question How to compile .bin payloads to .uf2?

Akira

I'm not a SHRIMP!!!!
OP
Member
Joined
Apr 28, 2013
Messages
1,246
Trophies
0
XP
1,666
Country
United States
I'm asking mainly because I have those chinese dongles(the $16 ones) and they don't have all the .uf2's of some of the payloads I want to try. For example, I want to try and compile briccmii to .uf2(don't ask me why, I just want to lol) I just want to learn instead of relying on downloading it on some random github page. I'm using a Mac, Xcode installed, homebrew. There might be more to be installed for sure.
 

tom2199

Well-Known Member
Member
Joined
Apr 23, 2015
Messages
256
Trophies
0
XP
540
Country
Germany
Last edited by tom2199,
  • Like
Reactions: Akira

itsjch

Well-Known Member
Member
Joined
Feb 22, 2016
Messages
176
Trophies
0
Age
31
Location
Sydney
XP
995
Country
Australia
Im having trouble with this im not sure what to do after installing the program and downloading the requisites im trying to build hekate 4.1
 

tom2199

Well-Known Member
Member
Joined
Apr 23, 2015
Messages
256
Trophies
0
XP
540
Country
Germany
Im having trouble with this im not sure what to do after installing the program and downloading the requisites im trying to build hekate 4.1
just open the build.ino file with the arduino ide, change the include line to the hekate 4.1 .h file and export the compiled binary. this build .bin file has to be converted to uf2 with the script.
 

itsjch

Well-Known Member
Member
Joined
Feb 22, 2016
Messages
176
Trophies
0
Age
31
Location
Sydney
XP
995
Country
Australia
just open the build.ino file with the arduino ide, change the include line to the hekate 4.1 .h file and export the compiled binary. this build .bin file has to be converted to uf2 with the script.


I cant find the 4.1.h file from the sourcecode material from hekate latest release?
 

BillyJo

Well-Known Member
Newcomer
Joined
Jan 8, 2017
Messages
53
Trophies
0
Age
40
Location
Canada
XP
1,247
Country
Canada
i've build a file .h from hekate4_1.bin and convert it to UF2 but doesnt seem to boot Hekate... maybe i've done something wrong when i convert it... i do some test and try to make it public when it will work !
 

tom2199

Well-Known Member
Member
Joined
Apr 23, 2015
Messages
256
Trophies
0
XP
540
Country
Germany
i've build a file .h from hekate4_1.bin and convert it to UF2 but doesnt seem to boot Hekate... maybe i've done something wrong when i convert it... i do some test and try to make it public when it will work !
you dont convert the .h file, you have to compile the code in the arduino ide with the .h file included
here is my hekate 4.1 .uf2 file, but remember:
If you don't trust it, don't run it!
 

Attachments

  • hekate_ctcaer_4.1.rar
    98.3 KB · Views: 272
  • Like
Reactions: itsjch

BillyJo

Well-Known Member
Newcomer
Joined
Jan 8, 2017
Messages
53
Trophies
0
Age
40
Location
Canada
XP
1,247
Country
Canada
same problem as my file, it did not boot hekate

--------------------- MERGED ---------------------------

files need to have 512ko and the one generated with hekate4.1 have around 266Ko so the trinket didnt accept it as a boot file
 

BillyJo

Well-Known Member
Newcomer
Joined
Jan 8, 2017
Messages
53
Trophies
0
Age
40
Location
Canada
XP
1,247
Country
Canada
works fine ! thanks
how did you compile your files ? if its not a problem for you to explain ? did you use python script ? or arduino software ? thanks !
 

Kubas_inko

"Something funny goes here."
Member
Joined
Feb 3, 2017
Messages
6,324
Trophies
1
Age
24
Location
I gues on earth.
XP
5,180
Country
Czech Republic
same problem as my file, it did not boot hekate

--------------------- MERGED ---------------------------

files need to have 512ko and the one generated with hekate4.1 have around 266Ko so the trinket didnt accept it as a boot file
Sx payload has 16kb and works fine.
Never mind. This is about dongle, not modchip.
 
Last edited by Kubas_inko,
  • Like
Reactions: tom2199

Akira

I'm not a SHRIMP!!!!
OP
Member
Joined
Apr 28, 2013
Messages
1,246
Trophies
0
XP
1,666
Country
United States
:rofl2:thanks for the response guys, though Im having problems converting the .bin to .h. Im getting this error whenever I try to use the script

Arrons-MacBook-Pro:test-build arron$ python3 binConverter.py hekate.bin
reading file: hekate.bin
[ ] 0%Traceback (most recent call last):
File "binConverter.py", line 42, in <module>
stringBuffer += "0x"+binascii.hexlify(byte).decode('ascii')+", "
TypeError: a bytes-like object is required, not 'int'

I used windows and i managed to convert it to .h. Now that im trying to compile the .h into a .bin using Arduino IDE, Im getting this error

Usb.h: no such file or directory

I managed to compile the .bin using arduino ide. Now im having problems converting it to uf2:rofl2: i downloaded the script and run it but its asking for a drive to deploy.

Edit: Upon inspection of the code, there are commands on just to convert it to uf2. Profit! Now to check if it works.

All are working properly. Managed to run it both in Windows and Mac. Thanks guys. I could write a tutorial if anyone wants it.
 
Last edited by Akira,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: Imma make quesadillas for lunch :D +1