2014-05-04 22:14 GMT+02:00 Tomek Lorek <tlo...@gmail.com>:
> 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
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to