0

Programming
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Programming

by Karma73 on Mon Jun 20, 2022 9:31 am

I was wondering if someone could help and point me in the right direction if it’s possible…
I have a product that has a “Trinket” installed and I want to swap it out for the “Trinket MO” but I need to download / pull the program from the original, because I don’t have access to the original program.

Karma73
 
Posts: 4
Joined: Mon Jun 20, 2022 9:25 am

Re: Programming

by dastels on Mon Jun 20, 2022 9:42 am

You're out of luck I'm afraid. To move the program from a Trinket to TrinketM0 you'll need the C++ source code. At the very least it will need to be recompiled for the M0, and might require rework depending on how AVR specific the code is.

Dave

dastels
 
Posts: 10145
Joined: Tue Oct 20, 2015 3:22 pm

Re: Programming

by adafruit_support_bill on Mon Jun 20, 2022 9:45 am

If it is one of the original ATTiny-85-based trinkets, that is not possible to do. In theory with the appropriate tools, you could extract the binary program data from the Flash memory. But the processor architectures of the ATTiny-85 and the ATSAMD-21 (M0) are vastly different so the binary code from one will not execute on the other.

adafruit_support_bill
 
Posts: 84034
Joined: Sat Feb 07, 2009 10:11 am

Re: Programming

by Karma73 on Mon Jun 20, 2022 2:09 pm

Is there a tutorial or something I could read up on, if possible then to basically clone what’s on a Trinket and put on a new Trinket, not the Trinket MO?
I’m working on a controller for my saltwater aquarium and the company I bought them from is not the greatest to deal with and they said they are now discounted. I sent it in for warranty and they said they fixed it, but apparently they didn’t. My other controller is working properly, so I was wondering if I could extract the program from that one and download it to a new Trinket board.

Karma73
 
Posts: 4
Joined: Mon Jun 20, 2022 9:25 am

Re: Programming

by Karma73 on Mon Jun 20, 2022 2:27 pm

64CBE0C4-F4F0-4F38-8BC5-BC3250144896.jpeg
Board
64CBE0C4-F4F0-4F38-8BC5-BC3250144896.jpeg (120.85 KiB) Viewed 44 times

Karma73
 
Posts: 4
Joined: Mon Jun 20, 2022 9:25 am

Re: Programming

by adafruit_support_bill on Mon Jun 20, 2022 2:44 pm


adafruit_support_bill
 
Posts: 84034
Joined: Sat Feb 07, 2009 10:11 am

Re: Programming

by Karma73 on Wed Jun 22, 2022 3:28 pm

Okay, Thanks
Once I get time, I’m going to attempt this.

Karma73
 
Posts: 4
Joined: Mon Jun 20, 2022 9:25 am

Please be positive and constructive with your questions and comments.