Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Read firmware date / bin from a T 3.2 ?

  1. #1
    Senior Member
    Join Date
    Apr 2019
    Posts
    179

    Read firmware date / bin from a T 3.2 ?

    I have 2 T3.2

    one i programmed some time ago and it works fine

    a later one i have programmed is acting differently !

    I have tried reflashing many different versions of software but the strange bug is still there

    is is possible to read when the good T3.2 was programmed or even lift the bin and reflash it to another T3.2 ?

    any suggestions greatly appreciated

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,097

    Cool

    You can use the pre-defined macros: '__DATE__' and '__TIME__' that give you the date and time the module was compiled:
    Code:
    const char date_time[] = __DATE__ " " __TIME__;

  3. #3
    Senior Member
    Join Date
    Apr 2019
    Posts
    179
    I will add that to the new code.

    Is there a way to read the bin on the T 3.2 ?

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,256
    This is a common start on sketches here so when I pick up a sketch I know what is on it:
    Code:
      while (!Serial && millis() < 2500 );
      Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
    There is no easy way to pull the HEX back off a programmed board.

    If the build was recent enough and the TEMP folder is still around it may hold the Hex and sources? Though noticed that Arduino seems to wipe them when it closes?

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,721
    Quote Originally Posted by Gadget999 View Post
    I will add that to the new code.

    Is there a way to read the bin on the T 3.2 ?
    It maybe depends on how hard you really want/need to get the old binary code...

    Warning I have never tried any of this, but maybe if you can setup a hardware debugger to connect to your T3.2, then ???

    That is you will need to modify your Teensy, to talk with debugger... I am not sure of the best instructions for doing that... I have seen postings and the like talking about it, like:
    https://mcuoneclipse.com/2014/08/09/...swd-debugging/

    Now IF and a big IF you can get the debugger to talk to the chip, then maybe you can ask it to grab the data off of the Teensy, which maybe you might be able to directly or indirectly build a .hex file from... Then you might be able to program new chip with that Hex... But again...

  6. #6
    Senior Member
    Join Date
    Apr 2019
    Posts
    179
    Thats a good link to the information !

    The soldering looks a bit more than my eyesight can handle !

    I was hoping i could somehow read the hex/bin file back from the chip using usb.

    I will have to program the chip with every software version and should find the problem that way.

    I am using the flexcan libary - i wonder if this is actually what has changed

    Is it possible i have a clone t3.2 that just does not work the same

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,256
    T_3.2 clone is possible - post a pic ... and refer to the PJCR.com official photos to see what they look like in production.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,206
    Quote Originally Posted by Gadget999 View Post
    I was hoping i could somehow read the hex/bin file back from the chip using usb.
    The bootloader and Teensy Loader are specifically designed to NOT do this. While it would be convenient in some cases, many people wish to put Teensy inside products where they do not want their code to be easily copied and cloned onto other / competitor hardware.

    If the FSEC byte wasn't changed, you could desolder the MKL02 chip and connect a debugger. But if FSEC was edited to lock secure mode, then the only way to gain access is with the mass erase command.

  9. #9
    Senior Member
    Join Date
    Apr 2019
    Posts
    179
    I am pleased to hear the data can not be read, it means my code is safe

    I am wondering of the flexcan Libary has changed and this is why compiling the sketch now gives a different result

    i will investigate and post my findings here

    thank you everyone for the help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •