转载地址:https://blog.csdn.net/lvxiong2007/article/details/80363794
参考http://e2e.ti.com/support/arm/sitara_arm/f/791/t/217383.aspx
1. 下载starterware
2. Install it;
2. Go to instalation directory and find /tools/bmpToRaster;
3. Go to the header file BitmapReader.h and comment out #define COMPRESS.
4. To get the binary do make command;
5. Prepare the image with exactly size of display, in my case the image is horizontal with 480x800 pixels and 24bpp. The file name is image.bmp;
6. Put the image file on /tools;
7. give the command: ./a.out 800 480 ./imagem.bmp ./image.h 24 RGB;
8. The file image.h will be created;
9. Edit this file with this:
#ifndef CONFIG_SPL_BUILD
unsigned int const image1[] __attribute__((aligned(4)))= {
....
#endif
10. Copy /lcd directory to /u-boot/drivers 4578.lcd.tar.gz
11. In /u-boot/Makefile add the red line:
LIBS = post/libpost.o
LIBS = drivers/lcd/liblcd.o
ifeq ($(SOC),ti81xx)
LIBS = $(CPUDIR)/omap-common/libomap-common.o
endif
12. At /uboot/include/configs/am335x_evm.h add the lines bellow just before the file end:
#define CONFIG_LCD_TCM
13. At /u-boot/board/ti/am335x/evm.c add the red line inside board_init(void):
...
#ifndef CONFIG_SPL_BUILD
board_evm_init();
Lcd_Init(); // Initialize
#endif
....
gpmc_init();
按照上面的操作进行,结果和部分人一样,没有logo显示,开机还是一片黑。
经查找原因是因为backlight没有设置,被注释掉了,解决办法:
取消LCDBackLightEnable();的注释,
取消lcd.c中的LCDBackLightEnable()函数注释
取消后会用到gpio_v2.c中的函数,从starterware中拷贝改文件到lcd驱动中,在makefile中添加改文件编译。OK,搞定显示正常。