[coldfire-gnu-discuss] How to access FLASHBAR?

micke micke at beronius.com
Mon Oct 4 09:29:58 UTC 2010


On Mon, 04 Oct 2010 11:03:13 +0200, m8847 <m8847 at abc.se> wrote:
> 
> On Thu, 30 Sep 2010 16:07:13 +0100, Nathan Sidwell
> <nathan at codesourcery.com> wrote:
>> 
>>     __asm__ volatile ("movec %0,FLASHBAR" : : "r"(0x21));
>> 
>> will do what you want.  You may need %% before FLASHBAR, I'm not sure.


> OK, 
>      __asm__ volatile ("movec %0,%%FLASHBAR" : : "r"(0x21));
> 
> compiles fine, but when I look in the assember window in the debugger,
it
> comes out as 
>     moveq #33,%d0
>     movec %d0,%rambar0
> 
> 
> RAMBAR0?? Is there some relation here that I don't see? rambar ought to
be
> C05, flashbar C04.
> 
> Looking in the "registers" view, flashbar still says 0x0121, that is
with
> WP still set, and naturally my software gets a 'access' violation when
> trying to write the first longword @ address 0. 

OK, doing a memory view gives that the address is actually C04, i.e.
FLASHBAR, so the debugger probably has some old references to another
device (wild guess), which has rambar0 on this adddress.

Now I have to understand why in the world, the FLASHBAR does not get
written as it ought to..


- Micael



More information about the coldfire-gnu-discuss mailing list