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.

TMS570LS3137: How to get source file from TI(Texas instruments) for F021 flash API which is used in bootloader(Tms570ls3137)

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

HI

   I am currently using a  Uart bootloader which works using F021 Flash Api ,But this provided Flash Api which has .Lib files which  works only On CCS (Since it is Ti compiled).

I need Source files so I can run on GHS(Green hills compiler) . So how to get Source file  for F021 flash API for TMS570ls3137 from TI.

  

  • Hello,

    TI does not normally distribute the source code. The reason for this is modifying the code can potentially impact the flash in the devices. A modified API must not be used in an application. For creating a flash programming solution, the flash API library must be used as provided by TI.

    In situations where the user has a justifiable and legitimate need for the source code for certification purposes, it can be provided under a signed license agreement with TI. 

    You can use the flash operations (erase, program) used in LS31x bootloader: bl_flash.c

  • I need Source files so I can run on GHS(Green hills compiler) .

    Does the GreenHills ARM compiler support the ARM standard EABI ELF object format, which the TI F021 Flash API was built with, or does Greenhills use a different object format?

    The reason for asking is that I'm not a GreenHills compiler user, and their website doesn't seem to allow the compiler datasheet to be downloaded without registering with them.

    When creating a HALCoGen project there is the option to select "GHS Tools". 

    There is also the C:\ti\Hercules\F021 Flash API\02.01.01\include\CGT.GHS.h file in F021 Flash API installation but contains the following comment:

     *  Description:  GHS compiler specific info used by the F021 API.
     *                Note:  This has not been tested with the GHS compiler.

    Therefore, not sure if TI has tested the F021 Flash API with the GHS compiler or not.

  • MR.Chester Gillon 

               The Ghs does not support F021 API because it does not support ARM standard EABI ELF object format.Even if you try to compile it in GHS it will show Multiply defined Error

    and also even if you try to suppress error by making Multiply defined error to silent in compiler option,

    The compiled  program will run but the functions from the object file will not be included in your final ELf output,

    When you try to run the program in your controller it will show an  Abort error.

    This abort error  is due to no text in the specified symbol location on RAM due to compiler which did not include the fapi (F021 api object) in to the final elf file  

    the link below shows the error ghs produce while compiling with F021 library api file 

    e2e.ti.com/.../pb-between-green-hills-tools-and-f021-library

  • Thanks Mr.Wang  

    But how to  contact TI,

    is there any way to get the source file from TI.  

  • the link below shows the error ghs produce while compiling with F021 library api file 

    e2e.ti.com/.../pb-between-green-hills-tools-and-f021-library

    The errors in that referenced thread seem to coming from the debug information in the TI compiled F021 API library files.

    Have you tried linking the filename suffixed by "_NDS" (which means compiled without debug symbols included)?

    Which for your TMS570LS3137 would be F021_API_CortexR4_BE_NDS.lib

  • ok  I will try it and reply you ,Thanks for your info

  • As you  can see the linker produce warning ,which is the F021 Api files are not part of the link 

    I have used the Api which has No debug symbols still the same issue.

  • As you  can see the linker produce warning ,which is the F021 Api files are not part of the link 

    The F021_API_CortexR4_BE_NDS.lib contains 41 object files:

    $ ar t /mnt/windows/ti/Hercules/F021\ Flash\ API/02.01.01/F021_API_CortexR4_BE_NDS.lib | wc -l
    41
    

    The GreenHills linker is warning that 15 object files in the F021_API_CortexR4_BE_NDS.lib library are not included in the link. This looks like be normal behaviour, in that a linker only the includes the object files from a library that are needed to satisfy undefined symbols for the extecutable.

    Does the linked executable run successfully?

  • No Mr.Chester Gillon the place where the .text files of the Flash API should be stored based on the Symbols location of the Map file  does not have Data in the RAM location or in copy Rom location when I execute the code.

    These are the symbol location where the start up code copies the Flash API from the copy ROM location into the RAM when My program executes

    But these locations are just empty  since the compiler did not include during compilation

    when I try to run the code the controller goes into Undefined entry ,which is Run time error  due to execution of undefined instruction 

    This error is due there is no hex code or instructions  placed on the location of the Flash API symbols.

  • No Mr.Chester Gillon the place where the .text files of the Flash API should be stored based on the Symbols location of the Map file  does not have Data in the RAM location or in copy Rom location when I execute the code.

    OK, since I don't have a license for the Green Hills compiler I can't investigate further.

    Can you ask Green Hills for support?

  • Mr.Chester Gillon

         I will try to ask Green Hills Just as you said

  • Iam also going to ask Ti for the source files