5 Replies Latest reply on Jun 15, 2015 6:15 AM by user_246598725

    modifying linker script for EMIF acess -> variable initialization

    user_246598725

      Hi,

         

       

         

      I want to use the EMIF. Since the EMIF is not part of the GCC default linker file, a custom linker file has to be created.

         

      This document www.cypress.com/ describes the basics of linker file modification on page 28. Additionally, I found a example project here www.cypress.com/ in the last posting.

         

       

         

      Now, my question is about initializing the variables located in external memory. According to the PDF document global and/or static initialized and zero initialized variables must reside in the .data/.bss sections, otherwise they're not initialized, even if they're explicitely initialized. To ensure variables are initialized, the AT keyword has to be used (see page 24).

         

      Viewing the example project mentioned above shows that the linker file also has a SECTIONS entry for the EMIF with the AT keyword. The question is why it uses the AT if initialization is ignored? Or does it mean that only local variables can be initialized?

         

       

         

      Regards,

         

       

         

      Ralf