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

Thread: Possible error in Teensy Loader for i.MX RT

  1. #1
    Senior Member
    Join Date
    Mar 2014
    Location
    Switzerland
    Posts
    100

    Possible error in Teensy Loader for i.MX RT

    Hi All

    Attached is an Intel Hex file for the Teensy 4.0 which programs 4 different programs in one go. It has a boot loader at the start, then a recovery loader at 0x4000, followed by a second loader at 0x10000 and finally an application at 0x20000. (0x60000000 respecting the actial QSPI addressing)
    The problem that I have is that when I load it to the Teensy 4.0 using Teensy Loader there are two iHex lines that are not programed to the QSPI flash.
    Since these two lines contain version numbers the code otherwise operates but the data in those two lines are lost.

    The lost lines are always after a 64k boundary so the first is at the address 0x10000:

    ...
    :10FFE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF21
    :10FFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11
    :020000021000EC <---- Extended segment address 0x100000
    :1000000046414C4C4241434B5F4C44080000D58C68 <---- Missing after programming
    :10001000E250ED500000AE88ED50000000000000FE <--- following are OK
    :1000200043620069006E000000FFFF0F00DFFFFF6A
    ...


    ...
    :10FFE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF21
    :10FFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11
    :020000022000DC <---- Extended segment address 0x200000
    :1000000055504C4F41445F4449534B080000241263 <---- Missing after programming
    :10001000EA50ED5000001C89ED5000000000000087 <--- following are OK
    ...


    If I manually edit the iHEX file so that the lost lines are in the file twice, eg.

    ...
    :10FFE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF21
    :10FFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11
    :020000021000EC <---- Extended segment address 0x100000
    :1000000046414C4C4241434B5F4C44080000D58C68 <---- Missing after programming
    :1000000046414C4C4241434B5F4C44080000D58C68 <---- Repeated line is programmed and OK
    :10001000E250ED500000AE88ED50000000000000FE <--- following are OK
    :1000200043620069006E000000FFFF0F00DFFFFF6A
    ...

    all is programed correctly.

    Does this mean that there is a bug in the teensy loader or the programmer on the board or is there a limitation that needs to be respected with the iHex formatting?

    Thanks in advance

    Regards

    Mark


    P.S If the attached HEX file is loaded the QSPI flash content appears as a disk drive and so can be easily viewed and the difference between the program and the flash seen.
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Mar 2014
    Location
    Switzerland
    Posts
    100
    Hi All

    This issue has been solved.
    The extended record being sent didn't have both a CR and LF like all other lines and this looks to cause a problem with the line following it.
    I ensure all lines were set with CR + LF and now all lines are programmed.

    Regards

    Mark

  3. #3
    Quote Originally Posted by uTasker View Post
    Hi All

    Attached is an Intel Hex file for the Teensy 4.0 which programs 4 different programs in one go. It has a boot loader at the start, then a recovery loader at 0x4000, followed by a second loader at 0x10000 and finally an application at 0x20000. (0x60000000 respecting the actial QSPI addressing)
    The problem that I have is that when I load it to the Teensy 4.0 using Teensy Loader there are two iHex lines that are not programed to the QSPI flash.
    Since these two lines contain version numbers the code otherwise operates but the data in those two lines are lost.

    The lost lines are always after a 64k boundary so the first is at the address 0x10000:

    ...
    :10FFE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF21
    :10FFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11
    :020000021000EC <---- Extended segment address 0x100000
    :1000000046414C4C4241434B5F4C44080000D58C68 <---- Missing after programming
    :10001000E250ED500000AE88ED50000000000000FE <--- following are OK
    :1000200043620069006E000000FFFF0F00DFFFFF6A
    ...


    ...
    :10FFE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF21
    :10FFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11
    :020000022000DC <---- Extended segment address 0x200000
    :1000000055504C4F41445F4449534B080000241263 <---- Missing after programming
    :10001000EA50ED5000001C89ED5000000000000087 <--- following are OK
    ...


    If I manually edit the iHEX file so that the lost lines are in the file twice, eg.

    ...
    :10FFE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF21
    :10FFF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF11
    :020000021000EC <---- Extended segment address 0x100000
    :1000000046414C4C4241434B5F4C44080000D58C68 <---- Missing after programming
    :1000000046414C4C4241434B5F4C44080000D58C68 <---- Repeated line is programmed and OK
    :10001000E250ED500000AE88ED50000000000000FE <--- following are OK
    :1000200043620069006E000000FFFF0F00DFFFFF6A
    ...

    all is programed correctly.

    Does this mean that there is a bug in the teensy loader or the programmer on the board or is there a limitation that needs to be respected with the iHex formatting?

    Thanks in advance

    Regards

    Mark


    P.S If the attached HEX file is loaded the QSPI flash content appears as a disk drive and so can be easily viewed and the difference between the program and the flash seen.
    I've been looking through this post for a while. And only now I see this issue is solved

Posting Permissions

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