Re: Accessing 20-bit memory range - issues with indirect addressing mode

Tomek Lorek <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <CAP62dvBXTSyrV1kjH0mbhHFydWuM3QYRN54Xv8D8zeiQzyTSvg@mail.gmail.com>
2014-05-04 22:14 GMT+02:00 Tomek Lorek <[email protected]>:
> Just checked the flashdump diff right before and after executing the
> program - "movx #0, @%0"::"r"(flash))" variant messed up the flash
> bank A from where I was running the code and it erased 0xc400 instead
> of 0x1c400.
> Do you have any idea why?

Ok, got it! I have misplaced the input and output operands:
Correct: __asm__ __volatile__ ("movx.b #0, @%0":"=r"(flash):);
Incorrect: __asm__ __volatile__ ("movx.b #0, @%0"::"=r"(flash));

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.