ImageVerifierCode 换一换
格式:DOCX , 页数:73 ,大小:32.97KB ,
资源ID:10179760      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/10179760.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(S3C24402410的LCD实验代码.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

S3C24402410的LCD实验代码.docx

1、S3C24402410的LCD实验代码一Makefile文件CC = arm-linux-gccLD = arm-linux-ldAR = arm-linux-arOBJCOPY = arm-linux-objcopyOBJDUMP = arm-linux-objdumpINCLUDEDIR := $(shell pwd)/includeCFLAGS := -Wall -O2CPPFLAGS := -nostdinc -I$(INCLUDEDIR)export CC LD AR OBJCOPY OBJDUMP INCLUDEDIR CFLAGS CPPFLAGSobjs := head.o i

2、nit.o nand.o interrupt.o serial.o lcddrv.o framebuffer.o lcdlib.o main.o lib/libc.alcd.bin: $(objs) $LD -Tlcd.lds -o lcd_elf $ $OBJCOPY -O binary -S lcd_elf $ $OBJDUMP -D -m arm lcd_elf lcd.dis.PHONY : lib/libc.alib/libc.a: cd lib; make; cd . %.o:%.c $CC $(CPPFLAGS) $(CFLAGS) -c -o $ $%.o:%.S $CC $(

3、CPPFLAGS) $(CFLAGS) -c -o $ $clean: make clean -C lib rm -f lcd.bin lcd_elf lcd.dis *.o lcd.lds文件文件SECTIONS . = 0x00000000; .init : AT(0) head.o init.o nand.o . = 0x30000000; .text : AT(4096) *(.text) .rodata ALIGN(4) : AT(LOADADDR(.text)+SIZEOF(.text)+3)&(0x03) *(.rodata*) .data ALIGN(4) : AT(LOADA

4、DDR(.rodata)+SIZEOF(.rodata)+3)&(0x03) *(.data) _bss_start = .; .bss ALIGN(4) : *(.bss) *(COMMON) _bss_end = .;二. S3C24*.h/* WOTCH DOG register */#define WTCON (*(volatile unsigned long *)0x53000000)#define WTDAT (*(volatile unsigned long *)0x53000004)#define WTCNT (*(volatile unsigned long *)0x5300

5、0008)/* SDRAM regisers */#define MEM_CTL_BASE 0x48000000#define SDRAM_BASE 0x30000000/* NAND Flash registers */#ifdef S3C2410#define NFCONF (*(volatile unsigned int *)0x4e000000)#define NFCMD (*(volatile unsigned char *)0x4e000004)#define NFADDR (*(volatile unsigned char *)0x4e000008)#define NFDATA

6、(*(volatile unsigned char *)0x4e00000c)#define NFSTAT (*(volatile unsigned char *)0x4e000010)#else /* S3C2440 */#define NFCONF (*(volatile unsigned int *)0x4e000000)#define NFCONT (*(volatile unsigned short *)0x4e000004)#define NFCMD (*(volatile unsigned char *)0x4e000008)#define NFADDR (*(volatile

7、unsigned short *)0x4e00000C)#define NFDATA (*(volatile unsigned short *)0x4e000010)#define NFSTAT (*(volatile unsigned char *)0x4e000020)#endif/* GPIO registers */#define GPACON (*(volatile unsigned long *)0x56000000)#define GPADAT (*(volatile unsigned long *)0x56000004)#define GPBCON (*(volatile un

8、signed long *)0x56000010)#define GPBDAT (*(volatile unsigned long *)0x56000014)#define GPBUP (*(volatile unsigned long *)0x56000018)#define GPCCON (*(volatile unsigned long *)0x56000020)#define GPCDAT (*(volatile unsigned long *)0x56000024)#define GPCUP (*(volatile unsigned long *)0x56000028)#define

9、 GPDCON (*(volatile unsigned long *)0x56000030)#define GPDDAT (*(volatile unsigned long *)0x56000034)#define GPDUP (*(volatile unsigned long *)0x56000038)#define GPECON (*(volatile unsigned long *)0x56000040)#define GPEDAT (*(volatile unsigned long *)0x56000044)#define GPEUP (*(volatile unsigned lon

10、g *)0x56000048)#define GPFCON (*(volatile unsigned long *)0x56000050)#define GPFDAT (*(volatile unsigned long *)0x56000054)#define GPFUP (*(volatile unsigned long *)0x56000058)#define GPGCON (*(volatile unsigned long *)0x56000060)#define GPGDAT (*(volatile unsigned long *)0x56000064)#define GPGUP (*

11、(volatile unsigned long *)0x56000068)#define GPHCON (*(volatile unsigned long *)0x56000070)#define GPHDAT (*(volatile unsigned long *)0x56000074)#define GPHUP (*(volatile unsigned long *)0x56000078)/*UART registers*/#define ULCON0 (*(volatile unsigned long *)0x50000000)#define UCON0 (*(volatile unsi

12、gned long *)0x50000004)#define UFCON0 (*(volatile unsigned long *)0x50000008)#define UMCON0 (*(volatile unsigned long *)0x5000000c)#define UTRSTAT0 (*(volatile unsigned long *)0x50000010)#define UTXH0 (*(volatile unsigned char *)0x50000020)#define URXH0 (*(volatile unsigned char *)0x50000024)#define

13、 UBRDIV0 (*(volatile unsigned long *)0x50000028)/*interrupt registes*/#define SRCPND (*(volatile unsigned long *)0x4A000000)#define INTMOD (*(volatile unsigned long *)0x4A000004)#define INTMSK (*(volatile unsigned long *)0x4A000008)#define PRIORITY (*(volatile unsigned long *)0x4A00000c)#define INTP

14、ND (*(volatile unsigned long *)0x4A000010)#define INTOFFSET (*(volatile unsigned long *)0x4A000014)#define SUBSRCPND (*(volatile unsigned long *)0x4A000018)#define INTSUBMSK (*(volatile unsigned long *)0x4A00001c)/*external interrupt registers*/#define EINTMASK (*(volatile unsigned long *)0x560000a4

15、)#define EINTPEND (*(volatile unsigned long *)0x560000a8)/*clock registers*/#define LOCKTIME (*(volatile unsigned long *)0x4c000000)#define MPLLCON (*(volatile unsigned long *)0x4c000004)#define UPLLCON (*(volatile unsigned long *)0x4c000008)#define CLKCON (*(volatile unsigned long *)0x4c00000c)#def

16、ine CLKSLOW (*(volatile unsigned long *)0x4c000010)#define CLKDIVN (*(volatile unsigned long *)0x4c000014)/*PWM & Timer registers*/#define TCFG0 (*(volatile unsigned long *)0x51000000)#define TCFG1 (*(volatile unsigned long *)0x51000004)#define TCON (*(volatile unsigned long *)0x51000008)#define TCN

17、TB0 (*(volatile unsigned long *)0x5100000c)#define TCMPB0 (*(volatile unsigned long *)0x51000010)#define TCNTO0 (*(volatile unsigned long *)0x51000014)/* I2C registers */#define IICCON (*(volatile unsigned char *)0x54000000) / IIC control#define IICSTAT (*(volatile unsigned char *)0x54000004) / IIC

18、status#define IICADD (*(volatile unsigned char *)0x54000008) / IIC address#define IICDS (*(volatile unsigned char *)0x5400000c) / IIC data shift/ LCD CONTROLLER#define LCDCON1 (*(volatile unsigned long *)0x4d000000) /LCD control 1#define LCDCON2 (*(volatile unsigned long *)0x4d000004) /LCD control 2

19、#define LCDCON3 (*(volatile unsigned long *)0x4d000008) /LCD control 3#define LCDCON4 (*(volatile unsigned long *)0x4d00000c) /LCD control 4#define LCDCON5 (*(volatile unsigned long *)0x4d000010) /LCD control 5#define LCDSADDR1 (*(volatile unsigned long *)0x4d000014) /STN/TFT Frame buffer start addr

20、ess 1#define LCDSADDR2 (*(volatile unsigned long *)0x4d000018) /STN/TFT Frame buffer start address 2#define LCDSADDR3 (*(volatile unsigned long *)0x4d00001c) /STN/TFT Virtual screen address set#define REDLUT (*(volatile unsigned long *)0x4d000020) /STN Red lookup table#define GREENLUT (*(volatile un

21、signed long *)0x4d000024) /STN Green lookup table #define BLUELUT (*(volatile unsigned long *)0x4d000028) /STN Blue lookup table#define DITHMODE (*(volatile unsigned long *)0x4d00004c) /STN Dithering mode#define TPAL (*(volatile unsigned long *)0x4d000050) /TFT Temporary palette#define LCDINTPND (*(

22、volatile unsigned long *)0x4d000054) /LCD Interrupt pending#define LCDSRCPND (*(volatile unsigned long *)0x4d000058) /LCD Interrupt source#define LCDINTMSK (*(volatile unsigned long *)0x4d00005c) /LCD Interrupt mask#define LPCSEL (*(volatile unsigned long *)0x4d000060) /LPC3600 Control#define PALETT

23、E 0x4d000400 /Palette start address#define ISR_EINT0_OFT 0 #define ISR_EINT1_OFT 1#define ISR_EINT2_OFT 2 #define ISR_EINT3_OFT 3#define ISR_EINT4_7_OFT 4 #define ISR_EINT8_23_OFT 5#define ISR_NOTUSED6_OFT 6 #define ISR_BAT_FLT_OFT 7#define ISR_TICK_OFT 8 #define ISR_WDT_OFT 9#define ISR_TIMER0_OFT

24、10 #define ISR_TIMER1_OFT 11#define ISR_TIMER2_OFT 12 #define ISR_TIMER3_OFT 13#define ISR_TIMER4_OFT 14 #define ISR_UART2_OFT 15#define ISR_LCD_OFT 16 #define ISR_DMA0_OFT 17#define ISR_DMA1_OFT 18 #define ISR_DMA2_OFT 19#define ISR_DMA3_OFT 20 #define ISR_SDI_OFT 21#define ISR_SPI0_OFT 22 #define

25、ISR_UART1_OFT 23#define ISR_NOTUSED24_OFT 24 #define ISR_USBD_OFT 25#define ISR_USBH_OFT 26 #define ISR_IIC_OFT 27#define ISR_UART0_OFT 28 #define ISR_SPI1_OFT 29#define ISR_RTC_OFT 30 #define ISR_ADC_OFT 31/ PENDING BIT#define BIT_EINT0 (0x1) #define BIT_EINT1 (0x11)#define BIT_EINT2 (0x12) #define

26、 BIT_EINT3 (0x13)#define BIT_EINT4_7 (0x14) #define BIT_EINT8_23 (0x15)#define BIT_CAM (0x16) / Added for 2440.#define BIT_BAT_FLT (0x17) #define BIT_TICK (0x18)#define BIT_WDT_AC97 (0x19) #define BIT_TIMER0 (0x110)#define BIT_TIMER1 (0x111) #define BIT_TIMER2 (0x112)#define BIT_TIMER3 (0x113) #defi

27、ne BIT_TIMER4 (0x114)#define BIT_UART2 (0x115) #define BIT_LCD (0x116)#define BIT_DMA0 (0x117) #define BIT_DMA1 (0x118)#define BIT_DMA2 (0x119) #define BIT_DMA3 (0x120)#define BIT_SDI (0x121) #define BIT_SPI0 (0x122)#define BIT_UART1 (0x123) #define BIT_NFCON (0x124) / Added for 2440.#define BIT_USB

28、D (0x125) #define BIT_USBH (0x126)#define BIT_IIC (0x127) #define BIT_UART0 (0x128)#define BIT_SPI1 (0x129) #define BIT_RTC (0x130)#define BIT_ADC (0x131) #define BIT_ALLMSK (0xffffffff)#define BIT_SUB_ALLMSK (0x7fff) #define BIT_SUB_AC97 (0x114)#define BIT_SUB_WDT (0x113) #define BIT_SUB_CAM_S (0x1

29、12) / Added for 2440.#define BIT_SUB_CAM_C (0x111) / Added for 2440.#define BIT_SUB_ADC (0x110) #define BIT_SUB_TC (0x19)#define BIT_SUB_ERR2 (0x18) #define BIT_SUB_TXD2 (0x17)#define BIT_SUB_RXD2 (0x16) #define BIT_SUB_ERR1 (0x15)#define BIT_SUB_TXD1 (0x14) #define BIT_SUB_RXD1 (0x13)#define BIT_SU

30、B_ERR0 (0x12) #define BIT_SUB_TXD0 (0x11)#define BIT_SUB_RXD0 (0x10)#define GSTATUS1 (*(volatile unsigned long *)0x560000B0)三.head.s* File: head.S 功能: 设置SDRAM,将程序复制到SDRAM,然后跳到SDRAM继续执行* .extern main.text .global _start _start:* 中断向量,本程序中,除Reset和HandleIRQ外,其它异常都没有使用* b Reset 0x04: 未定义指令中止模式的向量地址HandleUndef: b HandleUndef

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1