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.

F021 Flash API

Other Parts Discussed in Thread: HALCOGEN, TMDS570LS31HDK, TMS570LS3137

Good afternoon TI!

My company started development in Hercules safety uControllers. Why I am writing to you, is about the F021 Flash API linking. I am working with IAR Embedded Workbench for ARM, where I link the Cortex R4F Big Endian library to the project. What else should I do, in case to bring the API to life? Linking the library and the F021.h didn't result in success until now. I have read all the information according to the topic in F021 reference guide, and especially the recommended FSM flows in the above mentioned document, after which I wrote a specific Flash protocol based on the f021. What is the correct "workflow" of linking the f021 to a project? What linker files shall I use? Is there something that I need to change in the HalCoGen, which I use for driver generation?

(I'm using the devboard below:

http://www.ti.com/tool/tmds570ls31hdk

with the uC TMS570LS3137)


What I am trying to do, is a bootloader featured with the f021 API. What it has to do, is to copy an area of flash to another - the binary program gets to the controllers flash area in another way - while still working from the Flash, from a third area/sector. I do not have to wander out to the RAM, and work from there, that is why no address switching needed. But somehow, I stucked with the opening steps.

Thanks in advance for your reply!

Thomas

  • Hello Thomas,

    I am not sure I understand what you mean by the question "What else should I do, in case to bring the API to life?". 

    To include the F021 Flash API to a project, all you need to do is include "F021.h" and add the correct library for your device (in your case this would be "F021_API_CortexR4_BE.lib" to Linker->Libraries->Additional libraries in the project options.  Use the "TMS570LS3137.icf" linker configuration file found in "<Embedded Workbench install directory>\arm\config\linker\TexasInstruments".

    The HALCoGen question I will have to let someone else answer.

    You cannot program or erase in the same bank code is executing from.  This is a device limitation.  If your code for Flashing is in Bank 0, you can only erase and program Banks 1 and 7.  If your code for Flashing is in Bank 1, you can only erase and program Banks 0 and 7.  Bank 7 is not allowed to execute code at all.  If you want to be able to erase and program in the same bank as where the F021 Flash API code resides, you will need to copy the routines into RAM to accomplish this.

  • Hi John!

    This is exactly what I was looking for, I wanted to know that the steps that I did was right and enough. Yes, I included the lib and all you said, so I think I will be OK with these things after all.

    I also know I can't erase/program in the same bank that I'm in, but thanks for this info also. Fortunately, I'm running in the other bank than where I should "play" with the flash.

    Thank you for your help!

    Thomas

  • Hello All,

    From the recently downloaded code from the 3137 Wiki page (in which links are still broken); I had this same problem (originally). 

    I have downloaded the Flash stuff - but I cannot find F021_API_CortexR4_BE.lib - because it went to the C:\ drive and not my development
    drive.  

    Anyway I thought it was worth mentioning I had the same issue that was posted here due to the Flash API not being where I expected it to be.

    Maybe the Flash API can be part of CCS updates for Hercules?

    Regards,
    johnw

  • Hello John,

    The Flash API is now included in the Halcogen installation package.
  • Hello Chuck,

    Not sure if that is really addressing the issue - might be better to have this as part of one of the CCS update options.

    Regards,
    John
  • Hi John,

    I'm not really sure what issue you are wanting addressed. However, the F021 Flash API is a library of functions used in developing applications that program the flash in the Hercules devices. It is developed separately from CCS and is a stand alone library so it doesn't make since to include it in CCS necessarily. Note that we also support other IDEs beyond CCS and the library can be used with each of the supported IDEs.

    As far as how to download it, as I mentioned it is included with Halcogen and it is also available as a separate download under the Tools&Software tab of the Hercules page or the Tools&Software tab of each of the Hercules product pages. A search using "F021 Flash API" will provide a direct link to the software page for the library as well.

    See:

    www.ti.com/.../f021flashapi;tisearch=Search-EN-Everything

  • Chuck,

    As a for instance - how does the Flash code stay synced with the bootloader code? What is the procedure for that?

    Regards,
    John W.