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

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




Hi all

 I am running uClinux on a memec spartan 2 E microblaze board..we have memory mapped a framebuffer device..
and using the vga monitor to observe the display for any bytes written into that memory region...

i wrote this code to write a byte into a particular memory location :

----------------start----------------------------------

 int *ptr;
 ptr=(int *)0xffe00000;
 *ptr=0x01;

---------------end--------------------------------------

i integrated this with my uClinux dist using the "Adding user app HOWTO" instructions..it compiles well and when i download and execute the image on board...the display on the vga monitor seems to suggest that multiple bytes have been written all over the frame buffer memory map(the screen displays random patterns all over)..

regarding this i have a few doubts :

1. is the above piece of code correct to write to a particular location in memory?

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

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)?

 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!!.




Cheers

V.Anand
(www.tenet.res.in)







****************************************
"Being happy doesn't mean that everything is perfect... It just means that
you have decided to see beyond the imperfections"  --  Rash

___________________________
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/