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.

Is Flash API Compatible with SysBios

Other Parts Discussed in Thread: TMS320F28027, TMS320F28026, SYSBIOS

I am working on a large development project with the Piccolo (TMS320F28027 and TMS320F28026) and have successfully implement many of the features in SysBios. I am now trying to save/load variables to/from the on-chip Flash, something I thought would be simple, but I am hitting a lot of snags.TI provides a 41 page document on Flash Programming (TMS320F2802x Flash API V2.01) and the application note on emulating EEPROM using the flash SPRAB69. I am having trouble translating TIs example code to my project . My questions are listed below:

  1. Will the Flash API work with a Sys Bios project? TI does not provide the API  source code so I can't tell. The *.cmd file and the API documents link to the PIE Vector Table which is forbidden in a SysBios project.  The application notes says that FlashCallbackVar must point to address 0x000D02, which is the memory map for INT1.
      UNION run = PIE_VECT, PAGE = 1
       {
          PieVectTableFile
          GROUP
          {
             EmuKeyVar
             EmuBModeVar
             FlashCallbackVar
             FlashScalingVar
          }
       }
     I replaced PieVectTableFile with .vecs, the PIE vector for SysBios, but  CCS gives me:
    a run placement fails for object "UNION_1", size 0x6 (page 1)
    .  I could really use some help getting the linker setup correctly since I really don't know what the FLASH API and what SysBios needs.
  2. Has anyone ever written a variable to Flash using SysBios, or I am I the only one in the world with this requirement?

  • Hi Grant10435,

    Which version of SYS/BIOS are you using?

    Thanks,

    Steve

  • My help documentation says Version 5.41.11.38.

  • Hi Grant,

    I contacted someone familiar with the flash APIs.  Here's what they had to say:

    "The flash API does require some data to be loaded at the top of the PIE vector table.  This is reserved space and not actually used by the PIE (it is just RAM).  Because of this we used it as a fixed location for the flash API in the boot ROM to retrieve the information from the user’s application.

    To map the variables to these locations in the flash API example we have used the linker command file as shown below.    From what he says this is not doable in BIOS – I think its because BIOS auto generates a linker file with the PIE information. 

    The user could, instead, create a pointers in their application to those fixed locations and populate the data that way.   (ie hard code the address instead of letting the linker do it).  One is a pointer to a function and the other is a pointer to unsigned long:

    extern Uint32 Flash_CPUScaleFactor;

    extern void (*Flash_CallbackPtr) (void);

     "

    Can you give this a try and see if it helps solve the problem?

    Steve