Sorry, I did not mean I wanted the source code. I just need to upload the binary .hex file. And program another Teensy with it... According to your post it is easy, or I misunderstood? If it easy, so how can I do that?I don't think there is a way back from the compiled sketch inside the Teensy to the PC als an workable changeable file. But there is maybe a small door. Try http://www.jassenbaum.de/ja-tools/index.html to get an Assembler file.
Thank you! Then I suppose if I do not build this functionality, it is very hard if not possible to extract my code from Teensy and program other Teensy with it. What I mean is hacker protection - is it good enough?I'm sorry, there's no way to read the .hex file back from an already-programmed Teensy 2.0.
Well, of course, if you really need this kind of functionality, you could plan in advance and built it into your program. It's pretty easy for your program to read itself from memory and transmit the data somehow. But if you didn't build this sort of functionality into your program in advance, then it's impossible to read it back. The Teensy 2.0 Halfkay bootloader simply doesn't have that functionality (it is only 512 bytes afterall).
What I mean is hacker protection
- is it good enough?
1. How?It's pretty easy for your program to read itself from memory and transmit the data somehow.
2. Also flash:r options on tools like avrdude are blocked? so there is no way to dump the whole flash?It's certainly good enough to thwart efforts using any of the normal ISP programming tools.