Placing data at a specific memory location

Comments

5 comments

  • Avatar
    Louis Tran

    Not sure if this help, but try have you tried adding "size = 'NumOfBytes'"

    0
    Comment actions Permalink
  • Avatar
    Mdivis

    Yes I tried that.

    I'm surprised how little information there is about this and I thought it would be a trivial task.

    Does anyone have any other idea?

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    I think the problem is that var is zeroed data, not initialised data, so you need to use #pragma zeroedseg rather than #pragma dataseg.

    0
    Comment actions Permalink
  • Avatar
    Todd Hunter

    I'm in the process of upgrading my project from Cross Studio v1.3 to v2.0.9 (for MSP430).    I'm trying to place a specific code section at a specific address, but the ProgramSection "start" arguement is being ignored and simply placing the code section after the end of the previous section.  Here's an example of what I am doing:

    <MemorySegment name="FLASH">

    <ProgramSection load="Yes" name="CODE" />

    <ProgramSection load="Yes" name="CONST" />

    <ProgramSection load="Yes" start="0xec00" name="MyCode" />

    </MemorySegment>

     

    I would expect to see MyCode section at 0xEC00, but it falls immediately after CONST.

    Any ideas?

    0
    Comment actions Permalink
  • Avatar
    Todd Hunter

    OK, I just hardcoded a "size" arguement to the ProgramSection and that worked.  The size is bigger than I need, but atleast the code is placed in the correct section now.

    <ProgramSection size="0x1000" load="Yes" start="0xec00" name="MyCode" />

    0
    Comment actions Permalink

Please sign in to leave a comment.