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.

page already specified for ".econst" error

I am having a problem moving a project that works correctly in ram to flash.  I would really appreciate any suggestions or advice.

 

I get an error during link that says "page already specified for ".econst""   The code snippet from the linker command file is shown below.  The very first line of the snippet is where the error is flagged.  I see no other references to .econst in the file so I am not sure where to look.  Also, the project I am using supposedly worked before but not for me so I wonder if I have a problem with my CC3 setup.

 

   .econst          :   LOAD = FLASH_RAML0, PAGE = 0
                         RUN = RAML4,
                         LOAD_START(_RamEconstStart),
                         LOAD_END(_RamEconstLoadEnd),
                         RUN_START(_RamEconstRunStart),
                         PAGE = 1

 

Thanks

  • I just ran an experiment, and it seems to link without errors using code generation tools V5.0.0, but the same project gives me the error described above using V5.2.5.  Does this mean that I have something else wrong with my CC3 setup, or do I need to modify my linker cmd file somehow to use V5.2.5?

  • David,

    I'm going to move this to the codegen forum.  Can you provide a testcase and all the compiler switches used?

    Otherwise it is difficult to determine what is happening.

    -Lori

  • David,

    It appears to be a syntax issue. This should work with codegen tools 5.2.5:

    .econst          :   LOAD = FLASH_RAML0, PAGE = 0
                             RUN = RAML4, PAGE=1
                             LOAD_START(_RamEconstStart),
                             LOAD_END(_RamEconstLoadEnd),
                             RUN_START(_RamEconstRunStart)
                       

    As you said, your previous syntax works in v5.0.0 codegen tools but is not accepted by 5.1.0 and higher. I'm not sure if this is a bug or intentional change but I will submit a bug report to get further explanation and analysis from the codegen team.

  • It appears the linker is not associating page 0 with the load address, and page 1 with the run address.  (That's the desired behavior, right?)  Presuming that the memory range names FLASH_RAMLO and RAML4 are not repeated on other pages, a possible workaround is to simply remove all PAGE specifications.  The linker will infer the page from the memory range name.

    Thanks and regards,

    -George

     

  • Thanks for the help.  This syntax seems to compile correctly with both v5.0.0 and v5.2.5.  I will test some more today, but I believe that your answer has solved my problem.

     

    Thanks

     

    Dave Miller