S3C2440开发工具realview MDK4.22使用入门
led.c文件:
#include"S3C2440.h"
#define gpbcon (*(volatile ulong *)0xa0000010)
#define gpbdat (*(volatile ulong *)0xa0000014)
static __inline void wait(ulong dly);
#define GPB5_out (1<(5*2))
#define GPB6_out (1<(6*2))
#define GPB7_out (1<(7*2))
#define GPB8_out (1<(8*2))
static __inline void wait(ulong dly)
{
for(;dly > 0; dly--);
}
int Main(void)
{
ulongi = 0;
gpbcon= GPB5_out | GPB6_out | GPB7_out | GPB8_out;
while(1)
{
wait(3000000);
gpbdat= (~(i<5));
if(++i== 16)
i=0;
}
}
内存布局scatter文件:
;*
; * Scatter-Loading Description File generated by uVision *
; *
LR_ROM1 0x00000000 0x00200000 { ; load region size_region
NANDFLASH 0x00000000 0x00200000 { ; load address = executionaddress
*.o (initcode, +First)
.ANY (+RO)
}
}
LR_ROM2 2048 2048 {
SDRAM 0xb0004000 {
led.o (*)
}
}
S3C2440开发工具realviewMDK4 2 相关文章:
- S3C2440开发工具realview MDK4.22之库的使用(11-19)
- Linux2.4内核为我们带来了什么?(11-12)
- RedHatLinux新手入门教程(11-12)
- RedHatLinux新手入门教程(2)(11-12)
- 让Windows系统也能访问Linux文件系统(04-15)
- 达芬奇数字媒体片上系统的架构和Linux启动过程(06-02)