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.

Compiler/LAUNCHXL2-570LC43: How to use EMIF to store custom structures/data?

Part Number: LAUNCHXL2-570LC43


Tool/software: TI C/C++ Compiler

Good day, im pretty new to this and i cant understand how to use EMIF to store your own data?

For example, i have a structure

struct Struct{
    
     float32_t    x ;
     float32_t    y ;
     float32_t    z ;
     struct BinData{
                 uint32_t seconds            :32;
                 uint32_t indication         :8;
                 uint32_t mode               :8;
                 uint32_t modeArea           :8;
     }binDataTM;
};

I want this to be stored in the EMIF not in the RAM.

How can i do this?

i tried to use __attribute__(section("myEmifSection")) , but this realy didnt work

struct  TelemPackStruct  telemetryStruct __attribute__((section(".EMemory")))={.tmMarker=0xf99ff99f};

What i want to reach, is to write some local structres one after another (pointer++;). I need EMIF to store only this structures.

  • I can shed some light.  But I suspect I will not be able to totally solve your problem.

    This ...

    Roman Kosiy said:
    struct  TelemPackStruct  telemetryStruct __attribute__((section(".EMemory")))={.tmMarker=0xf99ff99f};

    ... is a good starting point.  It creates an input section named .EMemory which contains the initialization of a struct object named telemetryStruct.  The next step is to modify your linker command file so that the .EMemory input section is combined with 0 or more other input sections into an output section.  Then make sure that output section is allocated to a memory range which corresponds to external memory.  This external memory is controlled by the EMIF.  For more background, including an explanation of the terms input section, output section, and memory range, please see the article Linker Command File Primer.  

    There are other system concerns.  You need to know which memory range corresponds to external memory.  Part of the system startup includes configuring the EMIF so that external memory can be accessed.  These details are beyond my expertise.

    Thanks and regards,

    -George

  • Thanks for answer. Yes, i modified the linker file (memory and sections), didnt share the code.. and initialized EMemory with 0x80000000 adress wich is EMIF's start adress of my launchpad. Compiler says everything is alright but when i start Debug Session the structure is still in the ram. and the answer about local variables and creating many structures using pointer++ is still there(

  • The discussion of this issue will be concluded in this forum thread.

    Thanks and regards,

    -George