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

RE: [microblaze-uclinux] VGA controller in Microblaze



Hi Pablo,

 I think you should first check that the TFT IP works. Connect the MPLB port to the PLB bus in order to read the framebuffer memory, which must be within the DDR space memory. To program the TFT configuration registers connect the SPLB port to the PLB bus, and in this way EDK will compile the TFT library for peripheral testing.

Regards,

 Inaki


-----Mensaje original-----
De: owner-microblaze-uclinux@xxxxxxxxxxxxxx en nombre de pcolodron@xxxxxxxx
Enviado el: mié 18/03/2009 16:41
Para: microblaze-uclinux@xxxxxxxxxxxxxx
Asunto: Re: [microblaze-uclinux] VGA controller in Microblaze
 
Hi Inaki,

I've tried to dump the file to /dev/fb0 (with cat /bin/busybox
/dev/fb0) but I got the next message: '/dev/fb0: cannot create".

Unfortunately I couldn't test the TFT peripheral because the only
tests which are available in my project in EDK are for uartlite, gpio,
iic and sysace. Do you know where I could find one?

I will tell you the steps that I have followed to create my system
such that you may see if there is something wrong:

     - I have created a project for my Spartan3 Starter kit using the
tool Base System Builder in EDK.
     - Then I have followed the Petalinux tutorial to add fs-boot, etc.
Moreover, I've added one PS/2 peripheral and one TFT peripheral.

Here I have some doubts. In the TFT IP Core, there is a parameter
called 'Base Address of PLB Attached Video Memory'. I supose that the
framebuffer should be in the DDR memory, so in that parameter I wrote
an address which is inside the DDR. I don't know if this is the
appropriate way of setting up the framebuffer. Another thing is that  
in my TFT IP Core, the parameter 'Select Controller Register Access  
Interface' is selected and 'Select TFT Interface' is unselected. It is  
connected to PLB bus using a SPLB interface.

Moreover, I am not sure about which is the suitable way of configuring
my DDR. In this IP Core, PORT0 is configured as PLBV46, and this is
the only thing that I have configured. However, I don't know if some
other port must ve activated in mode VFBC (Virtual Frame Buffer Controller).

     -Once I created EDK project, I compiled the kernel with  
'xilinxfb', as you had told me (with framebuffer support and so on).  
Then I loaded the kernel into the board and I got the following boot  
log:

## Booting image at 858c0000 ...
    Image Name:   PetaLinux Kernel 2.6
    Image Type:   Microblaze Linux Kernel Image (uncompressed)
    Data Size:    2379812 Bytes =  2.3 MB
    Load Address: 88000000
    Entry Point:  88000000
    Verifying Checksum ... OK
OK
Linux version 2.6.20-uc0 (root@xxxxxxxxxxxxxxxxxxxxx) (gcc version  
3.4.1 ( PetaL
inux 0.20 Build -rc1 050607 )) #47 Wed Mar 18 15:59:38 CET 2009
setup_cpuinfo: initialising
setup_cpuinfo: No PVR support in CPU.  Using static compile-time info
set_cpuinfo_static: Using static CPU info.
setup_memory: max_mapnr: 0x8ffff
setup_memory: min_low_pfn: 0x88000
setup_memory: max_low_pfn: 0x8000
On node 0 totalpages: 32768
   DMA zone: 256 pages used for memmap
   DMA zone: 0 pages reserved
   DMA zone: 32512 pages, LIFO batch:7
   Normal zone: 0 pages used for memmap
Built 1 zonelists.  Total pages: 32512
Kernel command line:  
mtdparts=physmap-flash.0:256K(boot),256K(bootenv),256K(conf
ig),5M(image),2M(spare) macaddr=00:0a:35:00:22:01 console=fb0  
console=ttyS0,1152
00
OPB INTC #0 at 0x81800000
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 127388k/131072k available
Calibrating delay loop... 1.40 BogoMIPS (lpj=7040)
Mount-cache hash table entries: 512
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
xgpio0 #0 at 0x81420000 mapped to 0x81420000 device: 10,185 not using IRQ
xgpio1 #1 at 0x81400000 mapped to 0x81400000 device: 10,186 not using IRQ
uartlite.0: ttyS0 at MMIO 0x84000000 (irq = 1) is a uartlite
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
uclinux[mtd]: RAM probe address=0x8816ed8c size=0xe9000
Creating 1 MTD partitions on "RAM":
0x00000000-0x000e9000 : "ROMfs"
uclinux[mtd]: set ROMfs to be root filesystem index=0
i8042.c: i8042 controller self test timeout.
mice: PS/2 mouse device common for all mice
VFS: Mounted root (cramfs filesystem) readonly.
Freeing unused kernel memory: 88k freed
Mounting proc:
Mounting var:
Populating /var:
Running local start scripts.
Mounting /etc/config:
Populating /etc/config:
flatfsd: Nonexistent or bad flatfs (-48), creating new one...
flatfsd: Failed to write flatfs (-48): No such device
flatfsd: Created 3 configuration files (117 bytes)
Mounting sysfs:
Setting hostname:
uclinux login:


As you can see, there are no references to fb0 or any framebuffer  
parameter and I think that those kind of parameters should be  
mentioned, shouldn't they?

Thanks a lot for your advices, they are being very helpful.

Kind regars,

Pablo Colodron



Val Inaki escribió:
> Hi Pablo,
>
>  this xilinx framebuffer driver is just for Linux kernel, U-boot   
> uses its own framebuffer driver. So, having the device /dev/fb0,   
> could you try to dump something (dummy file) to /dev/fb0?
>
>  > cat /bin/busybox > /dev/fb0
>
>  you should see something in the screen.
>
> Have you tried the TFT peripheral test from EDK to see if the TFT IP works?
>
> Regards,
>
>  Inaki
>
>
> -----Mensaje original-----
> De: owner-microblaze-uclinux@xxxxxxxxxxxxxx en nombre de pcolodron@xxxxxxxx
> Enviado el: mié 18/03/2009 13:07
> Para: microblaze-uclinux@xxxxxxxxxxxxxx
> Asunto: Re: [microblaze-uclinux] VGA controller in Microblaze
>  Hi Inaki,
>
> In order to set up the framebuffer for my Spartan3 board, I've done   
>  what you told me. I added xilinxfb.c and xilinxfb.h to the  
> petalinux   tree. I've also modified the 'Kconfig' and 'Makefile'  
> files which  are  in .../drivers/video. Then, in 'menuconfig' I have  
> selected the   framebuffer such that the compiler uses xilinxfb.c as  
> framebuffer.
>
> I've compiled the kernel and everything seemed to be ok. However, my  
>   uClinux system doesn't recognize the framebuffer. If I execute   
> 'fbset  --show' it says that there are no devices (although in   
> folder /dev I  can see 'fb0'). I have also tried to check if U-boot   
> recognized the  device using the command 'coninfo', but the list of   
> available devices  was empty.
>
> I think I am missing some steps when trying to set up the   
> framebuffer.  Do you know if U-boot needs an extra configuration to   
> add the  framebuffer? I've been tried to figure this out for many   
> days but I  couldn't do it.
>
> Please if anybody has any hint it would be very appreciated.
>
> Thank you very much.
>
> Regards,
>
> Pablo Colodron
>
>
>
> Val Inaki escribió:
>> Hi,
>>
>>  you also need the headers file 'xilinxfb.h' and modify the    
>> 'Kconfig' and 'Makefile' files from the /drivers/video folder.   
>> There  is another issue with this driver because you need to add   
>> the code  for registering the device with its resources, which are   
>> the address  space for accesing the SPLB registers.
>>
>>  The graphical libraries can use the framebuffer driver, so they    
>> will use '/dev/fb0'.
>>
>> Best regards,
>>
>>  Inaki
>>
>>
>> -----Mensaje original-----
>> De: owner-microblaze-uclinux@xxxxxxxxxxxxxx en nombre de pcolodron@xxxxxxxx
>> Enviado el: mar 20/01/2009 10:31
>> Para: microblaze-uclinux@xxxxxxxxxxxxxx
>> Asunto: RE: [microblaze-uclinux] VGA controller in Microblaze
>>  Hi Inaki,
>>
>> It is nice to have your help, thanks a lot. As you have guessed, I   
>>  am  thinking of using a LDC display and I have configured the IP    
>> core to  25MHz.
>>
>> So, according to your mail, the only thing that I should do is to    
>> copy  the driver 'xilinxfb.c' in the directory    
>> .../linux-2.6.x/drivers/video  and after that rebuild the kernel.   
>> Is  that right?
>>
>> Once the kernel is built, one should start with the graphical    
>> library  but in this step, which is the video device that you use   
>> (I  mean the  device in romfs/dev/)? fb0? console?
>>
>> Thank you very much for your help Inaki.
>>
>> Kind regards,
>>
>> Pablo
>>
>>
>> Val Inaki escribió:
>>> Hi,
>>>
>>>  We are also using the Xilinx TFT IP with a Spartan3A FPGA and
>>> Petalinux/MicroblazeMMU. In our Petalinux distribution there was not any
>>> TFT driver, so we had to add it manually in the kernel tree:
>>>
>>> http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/drivers/video/xilinxfb.c
>>>
>>> You also need to activate the framebuffer support in order to access de
>>> video memory. After everything is working you can use any graphical
>>> library, in our case we have started working with the supplied version
>>> of microwindows in the Petalinux distribution.
>>>
>>> Remember that the Xilinx TFT IP is for a hardcoded 640x480 resolution,
>>> but clocking the IP to 25MHz, you can connect a LCD display through the
>>> VGA connector.
>>>
>>> I hope this information would be helpful.
>>>
>>> Regards,
>>>
>>>  Inaki
>>>
>>> -----Mensaje original-----
>>> De: owner-microblaze-uclinux@xxxxxxxxxxxxxx
>>> [mailto:owner-microblaze-uclinux@xxxxxxxxxxxxxx] En nombre de
>>> pcolodron@xxxxxxxx
>>> Enviado el: lunes, 19 de enero de 2009 9:57
>>> Para: microblaze-uclinux@xxxxxxxxxxxxxx
>>> Asunto: Re: [microblaze-uclinux] VGA controller in Microblaze
>>>
>>> Hi John,
>>>
>>> Thanks a lot for your answer. I am using the XPS TFT ip core   
>>> (which   is  available in IP Catalog -> IO Modules, in EDK 10.1).
>>>
>>> I will take a look to the framebuffer drivers that you told me.     
>>>  Anyway, I think I will have to activate the 'framebuffer support'  
>>>   in   the Petalinux configuration, is that right?
>>>
>>> In addition to this, I will try to figure out which is the most     
>>>  suitable graphics engine for my system because I am using fbcon   
>>> and   I  don't know if it is very common in embedded systems.
>>>
>>> I could find this framebuffer in the directory      
>>> /linux-2.6.x/drivers/video/console/fbcon.c. However, when I create  
>>>    the  petalinux kernel and I explore the directory /romfs/dev/,   
>>> it   seems  that the only frammebuffers that I have are   
>>> '@console,c,5,1'   and  '@fb0,c,29,0' (is the fbcon framebuffer   
>>> really activated?). I   have not  tested it yet, but, before doing  
>>>  this, it would be great   to know if my  kernel is properly   
>>> configured.
>>>
>>> Thank you very much for your help John.
>>>
>>> Kind regards
>>>
>>>> Hi Pablo,
>>>>
>>>> On Fri, Jan 9, 2009 at 8:22 PM, <pcolodron@xxxxxxxx> wrote:
>>>>
>>>>
>>>>    I am actually trying to work with the latest version of     
>>>> Petalinux  in my >Xilinx Spartan3 development kit. I am quite     
>>>> unexperienced in  this sense but I >have already solved some     
>>>> problems concerning EDK  and building the Petalinux >kernel.
>>>>
>>>>    What I would like to do now is to develop a graphical user      
>>>> interface in >Petalinux (to do this, I will use a graphic library  
>>>>     called MiniGUI). This >software is basically a C-written   
>>>> program    which shows the GUI by means of the >framebuffer   
>>>> fbcon. However,  I   have some doubts about how to do it.
>>>>
>>>>    My problems are related to the EDK project. I don't really   
>>>> know    if >Petalinux will work with any type of VGA IP Core. I   
>>>> mean,  will   petalinux >detect that I have a VGA IP core? That   
>>>> will be  enough if   I want to use a LCD >or a monitor? Because   
>>>> of my lack  of knowledge   in this sense I don't really get >to   
>>>> understand how  to do this.
>>>>
>>>>    Please if you know any place where some cores are avaliable   
>>>> (or    some >information about how to build a VGA controller   
>>>> which  works  in  Petalinux) it >would be nice of you to tell me.
>>>>
>>>>
>>>> You will require a framebuffer device driver - they are quite     
>>>> simple  to write, >with many examples in linux-2.6.x/drivers/video
>>>>
>>>> Which VGA IP core are you using?
>>>>
>>>> Regards,
>>>>
>>>> John
>>>
>>> ___________________________
>>> microblaze-uclinux mailing list
>>> microblaze-uclinux@xxxxxxxxxxxxxx
>>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>>> Mailing List Archive :
>>> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>>
>>>
>>> ___________________________
>>> microblaze-uclinux mailing list
>>> microblaze-uclinux@xxxxxxxxxxxxxx
>>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>>> Mailing List Archive :     
>>> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>>
>>>
>>
>> ___________________________
>> microblaze-uclinux mailing list
>> microblaze-uclinux@xxxxxxxxxxxxxx
>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>> Mailing List Archive :    
>> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>
>>
>
>
>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive :   
> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>
>




___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/


<<winmail.dat>>