Create a ProgramSection in Flash. Not working.

Comments

13 comments

  • Avatar
    Paul Curtis

    One assumes you have not instructed the linker to keep that symbol.

    0
    Comment actions Permalink
  • Avatar
    Doug Sandru

    Thanks Paul, I changed the Linker Options->Keep Symbols to include "VERSION" in the solution properties. As a result I get a warning: "kept symbol "VERSION" not found in object files". Still the memory section isn't created. Maybe I did something wrong?

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    If you read the manual in this area, it has some tips on what you need to do.  I could tell you here, but really, try reading the manual...

    0
    Comment actions Permalink
  • Avatar
    Doug Sandru

    I have read through the manual and done numerous searches on the topic before I posted here. It might be obvious but I still don't see it.

    0
    Comment actions Permalink
  • Avatar
    Doug Sandru

    I still have not found a solution to my problem. I have added command line argument -K_ver per manual... Also included _ver in the keep symbols option under linker properties. The only way I get this to work is if I set up a dummy instruction in main to equal _ver. This is obviously specific to the compiler so I would think I could get a little more help on this issue...

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    The Linker Options > Keep Symbols should be set to _ver.

    I've just tried this and it works perfectly.

    The symbol to keep is not VERSION but _ver.

    0
    Comment actions Permalink
  • Avatar
    Doug Sandru

    I did see that mistake yesterday, but this is still not working for some reason. I have this set under the properties config Solution->Common

    0
    Comment actions Permalink
  • Avatar
    Doug Sandru

    I should also note I am using CrossWorks for MSP430 Release 2.1.0.2010120702.9082

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    I have attached an example project which does exactly what you need.  It builds and "ver" is correctly placed.

    0
    Comment actions Permalink
  • Avatar
    Doug Sandru

    I found the problem. I was adding the "_" to the variable name in the code as well as the option in the linker to keep the symbol. The "_" should only be added to the option in the linker config and not in the code itself. This fixed it.

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    This is covered in the documentation:

    http://www.rowleydownload.co.uk/documentation/msp430_2_0/hcl_option_keep_symbol.htm

    0
    Comment actions Permalink
  • Avatar
    Doug Sandru

    I read that and took it to mean add "_" to the C variable name in my code... It was a misunderstanding of the documentation. Sorry for the misunderstanding and thanks for taking the time to help out.

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    Hmm, ok.  I can read it that way too.

    0
    Comment actions Permalink

Please sign in to leave a comment.