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.

Concerto F021 Flash Api M3 Linker File Problem

Hi,1643.F28M35x_generic_wshared_M3_FLASH_FAPI.rar

I use a linker file for my project, I wan to add the F021 Flash Api to my linker file.In the example there is no any other allocation in ramfunc section like load , run,load start... I  don't know hot to add it. Is there a manual for this or can you help me. I am sending you my linker file thanks a lot.
Best Regards. 

  • Unal,

    if you want to place a function in any user defined section (here in this case it is ramfuncs) you need to use #PRAGMA CODE_SECTION () directive. THis is explained in the compiler tools documentation. similary for any data you need to use #PRAGMA DATA_SECTION().

    Hope it helps.

    Best Regards

    Santosh

     

  • Santosh,

    I know that I wonder how to link the .lib file in the linker cmd file.

    I have this in ramfuncs section in the cmd file:

    ramfuncs : LOAD = FLASH1 | FLASH2,
    RUN = C0 | C1 | C2 | C3,
    LOAD_START(RamfuncsLoadStart),
    LOAD_SIZE(RamfuncsLoadSize),
    RUN_START(RamfuncsRunStart),
    PAGE = 0

    But in the FAPI example its like this:

    GROUP
    {
    ramfuncs
    { -l F021_API_CortexM3_LE.lib}
    }

    I wan to implement this part in example into my cmd file,but I don't know exactly how to do this?

  • Unal,

    In the linker command file provided for the Flash API usage example, ramfuncs and Flash API library are grouped together to load in to Flash and run from RAM as you can see below from the linker command file.     

         GROUP
         {
         ramfuncs
         { -l F021_API_CortexM3_LE.lib}
         }LOAD = FLASHLOAD,
          RUN = C0,
          LOAD_START(RamfuncsLoadStart),
          LOAD_SIZE(RamfuncsLoadSize),
          RUN_START(RamfuncsRunStart),
          PAGE = 0

    In your case, you can use above but you have to replace FLASHLOAD with FLASH 1  | FLASH2 and C0 with C0 | C1 | C2 | C3.

    Let us know if you need more details.

    Thanks and regards,
    Vamsi

     

     

     

  • No, it doesn't work.But I didn't write any code for flash api. I have only implement the includes and .cmd file. Is linker looking for code that uses .lib file? Is it the problem? Is there a manual or documentation about haw to write a .cmd file?

  • Unal,

    Did you include the Flash API library in the file search path under linker in build settings?

    Thanks and regards,
    Vamsi

  • Yes I have done that, but haven't wrote the code yet its empty only my codes that is not anything to do with flash api. I think that I don't use any of the functions in the library so it gives me a warning. I have talked to Santosh also. And he said the same thing.