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.

TMS570 flash programming

Other Parts Discussed in Thread: TMS570LS20216

 

I’m looking for an off the shelf solution for flash programming this part.  We are using the Green Hills MULTI suite for compiling code and debugging.  As of right now, there is no flash programming support for this part in that toolchain.  I found that there is a flash utility called NowFlash, but Green Hills is not in the list of emulators that are supported by this tool (as far as I can tell).  Is there any plan for integrating the Green Hills probes with the NowFlash utility?  If we wanted to use this programming utility, is it as simple as ordering a probe from that list of supported emulators and flash programming will just work?  In other words, would we be able to generate some image file from Green Hills and use NowFlash with say an XDS100v2 USB JTAG emulator to flash it?  We have 2 of the USB stick dev kits… is there any support for flashing over USB?

 

I have also downloaded the flash programming API libs and headers.  At some point we will have an in-system flash programming scheme using these libs.  Do you have any example C code for reference on flash erase/programming?  I see the flash API guide has “Recommended Flow Guidelines”, which I could likely follow and eventually get some programming to happen.  It would be a great help to our TTM if we had working example code to base off of.

 

Thanks for any help you can give.

 

Cheers,

Marco

  • Hello Marco,

    I will have to check with the person that handles 3rd party toolchains to see if there are plans for integrated programming from within the Green Hills tools.  As to supporting the Green Hills probes from within nowFlash, this is the first request I have received on it, so there is currently no plans for this activity, but it is something we can look into.

    The USB sticks have an embedded XDS100v2 emulator on them and can be used directly with nowFlash and yes, it is as simple as obtaining one of the emulators supported by nowFlash for programming as long as the emulator you order has the appropriate JTAG connector for your board.  Typically, TI has used a 14pin JTAG connector instead of the standard 20pin ARM JTAG connector.  The emulators can either be ordered with one or the other connector or use an adaptor to convert from 14pin TI JTAG to 20pin ARM JTAG or vice versa.  nowFlash can take TI COFF and ARM ELF object files, Intel Hex, Motorola S-Record and Tektronix Hex files as input files for programming.

    Currently there is no example code for Flash programming other than the few snippets I included in the API Reference Guide, but an application note is planned to be written on this.

  • Here is a link to the TMS570 WIKI page that has some additional information about JTAG emulators that support the TMS570LS devices and nowFlash:

    http://processors.wiki.ti.com/index.php/JTAG_Emulator_Options_for_TMS570LS

  • John/Anthony,

    Thanks for the quick responses.  Any way to get notified when said app note comes into existence?  Also, can you comment on the naming conventions used in the flash API guide wrt things like xxx_B and xxx_V?

     

    Thanks,

    Marco

  • I'd also like to be notified about the app note.  To date, I haven't found any information in either the F035 manual or the TMS570 TRM about flash writing/erasing (aside from those flowcharts) and it's become a roadblock in my development schedule.

    If there's any kind of documentation whatsoever on how to do a compact/program/erase, other than using the prebuilt libraries, I'd appreciate a pointer to it.

  • Anthony,

    Thanks for the link.  Unfortunately that just calls the library functions (such as Flash_Prog_B in pf035a_api_eabi.lib).  I'm looking for help replacing those functions in a different development environment (gcc) that can't link with those libraries.

    Thanks,

    Tom

  • Tom,

    In my previous reply I was thinking about a different API.  The document Anthony gave the link to is the application note for the API.  We do not document programming the flash on the TMS570LS device using anything other than through the use of the release Flash API as this is the only method supported .  The pf035a_api_eabi.lib is an ELF library which to my knowledge should be linkable with gcc.  I know for a fact that in addition to CCS tools, this library has been successfully linked in projects using the IAR and Keil toolsets.

  • Anthony,

    Thanks for the link, it's looking like it will help alot.  However, I'm in the process or porting this code to the Green Hills toolchain and am running into subtle differences in the assembler directives.  What would really help out at this point would be a map file generated from a CCS build machine of this code.  Do you have any that you can provide?

    Thanks,

    Marco

  • Hi,

     

    I have some more questions about the flash programming API.  I am looking at the bank/sector layout for the TMS570 and noticed that the first bank has some variability in the sector sizes.  I was told (and this now seems like hearsay) that the part had 2k byte sector sizes (aka minimum erase regions).  Of course looking at the sector map, I am noticing a minimum sector size of 8kbytes, but that's only sectors 3 and 4 of bank 0.  I see also that there are some OTP regions of flash that are 2k bytes in size, so this may be the source of confusion.  Either way, I wanted to confirm this with you as this changes some of our usual ways of doing things in our existing code where constant sector sizes are assumed.

     

    So I need 3 things answered:

     

    1) What is the minimum erase region size for this part?

    2) Am I correct that the sectors in bank 0 are not constant size, but the other banks all have constant sized sectors of 0x20000 bytes?

    3) Is it possible to erase less than a full sector?  Just wondering if it's possible to pass the pu32Start param to those API calls as something other than the start address for the desired sector.  The purpose here would be say to erase the 2nd half of the sector, but keep the first half unchanged.

     

    Thanks,

    Marco

  • Hello Marco,

     

    1) The minimum erase region for any of our devices is a sector.  Refer to data sheet of the device you are using for exact bank and sector sizes.

    2)  I need to know the exact TMS570LS device you are looking at to be able to answer this.  The data sheets for the TMS570LS devices may be found here: http://focus.ti.com/mcu/docs/mcuprodtechdoc.tsp?sectionId=95&viewType=mostuseful&tabId=2825&rootFamilyId=4&familyId=1870&docCategoryId=2

    3)  It is not possible to erase less than a full sector.

  • Thanks again John.  I am running into an issue w/ the Green Hills toolchain wrt the EABI version of the flash API lib.  I am waiting to hear back from Green Hills on this issue, but it has to do with linking in a thumb mode library.  It seems the assembler is generating the BL/BLX instructions in such a way as it always is trying to call the flash API lib as if it was built to the ARM instruction set.  This happens no matter which instruction set I compile the rest of my app with.

     

    1) Do you know of any others that have successfully integrated the flash API lib w/ the Green Hills toolchain?

    2) Is there any way I can get the flash API lib in an ARM instruction set version?

     

    Thanks,

    Marco

  • Marco,

    Which device and library are using?

    My assumptions for this answer is you are using an TMS570LS20xxx device with the pf035a_api_eabi.lib library. 

    Based on this,

    1)  You are the first person I know of using the Green Hills toolchain.

    2)  We only have this library built using ARM7 Thumb mode instruction set.  The pf035a_api_eabi_vfp.lib library is built for Cortex R4 instruction set using 16bit mode.  This library my behave differently when linking with the Green Hills tools.  As some compiler toolchains are able to link floating point and non-floating point code, this may be an option to try.  I will have to investigate the possibility of generating an ARM instruction set version of the library and what kind of timeline it would be available in.

  • You assume correct.  I am using the TMS570LS20216 on the USB dev kit board and the pf035a_api_eabi.lib library.

     

    I was looking at the compile options listed in the spnu493b.pdf doc (v1.05 Flash API reference guide).  Can you point me to the documentation for the options used there?  I'm looking for what -mXXX and others mean.  It seems that the Green Hills compiler/linker does not detect the TI library as being in thumb mode, but oddly enough the debugger does a correct disassembly in thumb mode when I browse to the memory that the library has been linked to.  I'm wondering if there's a bug in the Green Hills toolchain or if maybe some header information in the lib is not structured correctly (or correctly enough in Green Hills land).  Meh...

     

    Thanks,

    Marco

     

     

  • Here is the descriptions of the compiler parameters.

    -o2 -> Level 2 optimizations

    -al-> Generate asm listing

    –mt-> 16bit Thumb code generation

    --issue_remarks-> issues remarks (non-seriouse warnings)

    --c_src_interlist-> source code interlist puts the corresponding C code with the ASM statements

    -mv4 -> selects processor version ARM V4 (ARM7)

    --abi=eabi ->  specifies application binary interface as ARM standard EABI

    --symdebug:none -> no debug symbols

  • Just to resolve this issue.  The Green Hills tools expects certain information in an ELF file to determine Thumb mode instructions.  This information is not used by CCS code gen tools and therefore is not added to the file.  Green Hills released a specific patch to Marco for him to link the Flash library to his code.

  • Hi John,
    I am working on GHS and wanted to add the "F021_API_CortexR4_LE.lib" in the linker command file which is sys_link.com.
    I am very beginner to this request you to please help me
    Thanks in advance.

    Regards,
    Lakshmi
  • This is a duplicate post and this thread is already closed.