[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Odd Microblaze behavior
Hi Richard,
Richard Klosinski wrote:
> int main (void)
> {
> volatile int a;
>
> a = 33;
> a = 33;
> }
> Background.
> Compiled with optimization off.
> Executing out of bram, not external memory (which it will work fine in).
> Cache is on (the code works if cache is off)
Which cache - data or instruction?
Just a heads-up - you should not allow the cacheable range to overlap
the LMB memory range - it doesn't make sense, and result may be undefined..
> Problem.
> Stopping at the first 'a=33', the debugger indicates a = 765. I checked its
> address, and yeap, 765. Stepping to the next 'a=33', a finally = 33. This
> behavior happens all through the code.
Odd. Can you post the output of
$ mb-objdump -S mycode.o
for this particular code fragment? It will show exactly what assembly
instructions were generated by the compiler. But really this looks more
like a cache induced gdb artifact or something like that.
Finally, is this uClinux application code? Or stand alone (bare-metal)?
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/