Forum Discussion
15 Replies
- Altera_Forum
Honored Contributor
Do you have an LCD? If not, don't include the LCD driver in the menuconfig.
- Altera_Forum
Honored Contributor
--- Quote Start --- Do you have an LCD? If not, don't include the LCD driver in the menuconfig. --- Quote End --- yes ,i have ,i use DE2-70. I donnot know how to fix it - Altera_Forum
Honored Contributor
What is the name of the LCD peripheral? it needs to match what it's called in the driver.
- Altera_Forum
Honored Contributor
--- Quote Start --- What is the name of the LCD peripheral? it needs to match what it's called in the driver. --- Quote End --- Copy the kernel header file lcd_16207.h to uClinux-dist/linux-2.6.x/source/drivers/char/ Goto: http://www.nioswiki.com/operatingsystems/uclinux/lcd_16207 for source file. I had to make the following modification to bypass the cache in the driver code in lcd_16207.h:
In lcd_16207.c change# include "linux/lcd_16207.h" to# include "lcd_16207.h" The device name in de SOPC builder "lcd_16207_0"!! If the character driver for the display is loaded in your kernel, and you use the MSH shell which allows redirection from the echo command, you should be able to do something as simple as: switch to the MSH shell: /> msh # echo "Hello World!" > /dev/lcd16207 You will need to have the MSH shell enabled in the kernel and the 'echo' command from busybox.# define ADR_LCD_COMMAND na_lcd_16207_0 + 0x80000000# define ADR_LCD_READY (na_lcd_16207_0 + 0x80000000 + 4)# define ADR_LCD_DATA (na_lcd_16207_0 + 0x80000000 + 8)# define ADR_LCD_READ (na_lcd_16207_0 + 0x80000000 + 12) - Altera_Forum
Honored Contributor
--- Quote Start --- Copy the kernel header file lcd_16207.h to uClinux-dist/linux-2.6.x/source/drivers/char/ Goto: http://www.nioswiki.com/operatingsystems/uclinux/lcd_16207 for source file. I had to make the following modification to bypass the cache in the driver code in lcd_16207.h:
In lcd_16207.c change# include "linux/lcd_16207.h" to# include "lcd_16207.h" The device name in de SOPC builder "na_lcd_16207_0"!! If the character driver for the display is loaded in your kernel, and you use the MSH shell which allows redirection from the echo command, you should be able to do something as simple as: switch to the MSH shell: /> msh # echo "Hello World!" > /dev/lcd16207 You will need to have the MSH shell enabled in the kernel and the 'echo' command from busybox. --- Quote End --- Thank you very much, though it doesnot work. I think na_lcd_16207_0 is something about address. i am using linux-mmu .do you have any other suggestions?# define ADR_LCD_COMMAND na_lcd_16207_0 + 0x80000000 # define ADR_LCD_READY (na_lcd_16207_0 + 0x80000000 + 4) # define ADR_LCD_DATA (na_lcd_16207_0 + 0x80000000 + 8) # define ADR_LCD_READ (na_lcd_16207_0 + 0x80000000 + 12) - Altera_Forum
Honored Contributor
--- Quote Start --- Thank you very much, though it doesnot work. I think na_lcd_16207_0 is something about address. i am using linux-mmu .do you have any other suggestions? --- Quote End --- Me tip is usefull for a system without a mmu. I think the + 0x8000000 is not needed with a mmu based system. Is jou system running and you can compile linux? - Altera_Forum
Honored Contributor
--- Quote Start --- Me tip is usefull for a system without a mmu. I think the + 0x8000000 is not needed with a mmu based system. Is jou system running and you can compile linux? --- Quote End --- yes,everything goes fine,except adding lcd - Altera_Forum
Honored Contributor
--- Quote Start --- yes,everything goes fine,except adding lcd --- Quote End --- What do you mean with "except adding lcd"? Compile errors? - Altera_Forum
Honored Contributor
--- Quote Start --- What do you mean with "except adding lcd"? Compile errors? --- Quote End --- yes,when compiling after add lcd : error:"na_lcd_16207_0" undeclared - Altera_Forum
Honored Contributor
--- Quote Start --- yes,when compiling after add lcd : error:"na_lcd_16207_0" undeclared --- Quote End --- Oeps little typo on my side!! The device name in de SOPC builder "na_lcd_16207_0"!! this is wrong!! change it to "lcd_16207_0"!! Regenerate the custom_fpga.h with the new .sopcinfo file (use sopc-create-header-files tool) and recompile linux.