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.

DM505: Storing Constant Data in QSPI Flash and Locating the Data in QSPI

Part Number: DM505

I am attempting to store some constants at some known address in QSPI memory.  I have the Vision SDK installed an I am using the SBL that comes with it.  What I want to add to that SBL is to inspect a constant in the QSPI flash that I compile into an application to be at a particular address.  FYI, I am using TI's Vision SDK tools to build an AppImage that works with the SD-provided SBL. 

So when the SBL is executing, the App is in QSPI and has not been loaded into the external DDR3 I map it to.  Grabbing the constant data is not as easy as loading the app in DDR3 then checking some address there.  I want to know how I can locate this constant via the App's C project if possible to figure out how to locate where it resides in the QSPI before the SBL loads the App into the DDR3.  I am familiar with C 'pragmas' that place certain symbols (functions, variables, etc.) at certain memory sections listed in the linker script - command file in this instance - so no stranger to this.  Again, the confusion for me comes with the fact that I build an App based on where it will be placed in the DDR3 space delegated by the EMIF configs.  Just difficult to figure out where the constant data specified to be in a certain memory section is located in the QSPI flash. 

If anything is not clear or anything I can provide in terms of information about this, please feel free to ask.  Thank you in advance! 

  • I believe I figured out what I need to do to get what I want to work.  As mentioned, I generate a TI multi-core AppImage and flash it into QSPI.  This AppImage has RPRC sections in it that provide the load address and size.  Therefore, in my C code, I use the DATA_SECTION pragma to place a certain constant symbol at a defined address.  I also will know the size of this constant. 

    In the SBL, I read the QSPI data out and parse it to find the RPRC section that defines the data placed at the known address of my constant.  Again, I will be able to use the load address and size to verify that I am parsing the offset of the QSPI contents that has the information I need. 

    #pragma DATA_SECTION ( versionData , ".mysection")
    const unsigned int versionData[4] = {0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xACEDACED};

    In the QSPI (which the TI Multi-Core AppImage is flashed into)  I see this pattern (look at the TDA SBL User's Guide to reference the pieces I discuss here if necessary):

    - START OF RPRC SECTION x -

    Load Addr = 0x81800000

    RSVD (= 0)

    Size = 0x00000010

    RSVD (= 0)

    RSVD (= 0)

    <16 bytes of data stored in 'versionData'>

    - END OF RPRC SECTION x -

    I used easily searched patterns (i.e. 0xDEADBEEF) to parse the AppImage on my PC with a binary file editor - FYI. 

    Overall, I believe this is what I was seeking an answer for, and I figured this out.