[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Re: [uClinux-dev] writing into main memory (in uClinux)



At 13 Sep 2004 07:26:23 -0000,
anand_12 wrote:
[...]
> 1. is the above piece of code correct to write to a particular location in memory?

it'd be nice to have volatile. also location should be unsigned.

> 2. can user apps directly write to absolute addresses in main memory (with uClinux)?

yes.

> 3. if yes,then why is it that multiple pixels are getting enabled
> when infact i am writing only a byte using a resolution of 320x240(1
> bit per pixel)?

don't know ;)

seriously, are you accessing word aligned address? if you access byte
aligned address to write a byte data, use "unsigned char *"
instead. (this generates assembly code with `sb' instead of `sw')

if you have a doubt in your code, see generated assembly code.  if the
generated assembly code represents what you inteded to do, and also
doesn't have any fault according to MicroBlaze Processor Reference
Guide, there might be a bug in the cpu.

>  thanks for any help in this regard
> 
> if it helps,when the same code is executed directly on hardware
> without uClinux,it works perfectly fine..i mean only that particular
> pixel is enabled...so what i essentially see a dot on the top left
> corner of the vga monitor...i guess my understanding of how uclinux
> handles memory is still unclear...any pointers are most welcome!!.

hmm... I've seen a symptom; a value in a register changes when I just
read. I still can't make test code for this.

I'm not sure this is the same symptom.

best,
--
        yashi
___________________________
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/