This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28069: Making / using S-Record files with TMS320F28069 / CCS / hex2000

Part Number: TMS320F28069


Tool/software: Code Composer Studio

Hello team,

first, an overview over what we intend to do:

On our target, we plan to have:

1: a bootloader that resides permanently on the board and that shall be started when
  we boot with the "boot to flash" option. A GPIO pin is used to input a signal that tells
  the bootloader whether to branch immediately to the application, or to update the
  application from an on-board SD-card based S-record file, and to launch it subsequently.
  The bootloader uses the SW-API of the flash library - not the boot ROM.
  So far, we managed to write some data to the flash, i.e. flashing works.
 
2:  an application that resides in flash blocks being not used by the bootloader, so that
   the bootloader will keep unharmed when the appl. is updated.
 
 
About this matter, some questions arise:
 
  1.1 When building a project using the hex2000 tool (specified in the project properties dialog)
      with the options...
      --memwidth=16
      --romwidth=16
        --motorola=3
        -o "<xyz>.S19"
        <xyz>.out     (input file),
        
        ...I get  ** 2 output files **  (besides the map file):
        - <xyz>.S19   (the usual S-Rec file extension); but also
        - <xyz>.m01,   which is also an m3-S-Rec file (of same size).

===>  *** The files are clearly different. Which S-Rec file to use for making a binary file?? ***
      
        Within the the S-Rec file, there are several leaps of addressing, such as
          (for better readability, I inserted some blanks):
        
             S3 23 003E81FE 0A0BF4A9...
             S3 23 003E820D 00067608...
             S3 1F 003E821C 0006FE02...
             S3 23 003F4000 FE022B41... <<<=== leap!
             S3 23 003F400F 61F7FE82...
             S3 23 003F401E 61380215...
           and later on:
              S3 22 003F62BA FE96A0A8...
              S3 22 003F62D7 D4FE0076...
              S3 0A 003F62F4 001956FF...
              S3 22 003F7F80 00000000... <<<=== leap!
              S3 22 003F7F9D 00000000...
              S3 22 003F7FBA 00000000...
             S3 22 003F7FD7 00000000...
              
              What is the reason for these leaps? Is it possible to avoid them (in order to
              load the SW in one block)?
 
  2.1: How to tell the linker to place the application code (including its vector table etc.)
      to a desired location (I'm not familiar with the linker command files)?

  2.2: Is it correct that branching from bootloader to the appl. can be done by using
      an assembler "LB <address>" instruction?
        
Ok, so far for today...
Best regards,
Goetz

  • Goetz Borkowski7 said:
        ...I get  ** 2 output files **  (besides the map file):
            - <xyz>.S19   (the usual S-Rec file extension); but also
            - <xyz>.m01,   which is also an m3-S-Rec file (of same size).

    You should not get two output files.  And you should get a diagnostic from the hex utility.  For more explanation, please see the second paragraph in this post.

    Goetz Borkowski7 said:
      What is the reason for these leaps? Is it possible to avoid them (in order to
                  load the SW in one block)?

    Consider using image mode.  Please search the C28x assembly tools manual for the sub-chapter titled Image Mode and the --fill Option.

    Goetz Borkowski7 said:
      2.1: How to tell the linker to place the application code (including its vector table etc.)
          to a desired location (I'm not familiar with the linker command files)?

    For an introduction to linker command files, please see the article Linker Command File Primer.

    Goetz Borkowski7 said:
      2.2: Is it correct that branching from bootloader to the appl. can be done by using
          an assembler "LB <address>" instruction?

    That is outside my expertise.  If it were me, I would try it and see.  If you want verification from TI, then I need to involve some C28x device experts.

    Thanks and regards,

    -George