调试环境mini2440+jlink+keil
程序
1、S3C2440.s是keil默认的启动文件
2、interrupt.c如下
/*
* 功能:实现按键点亮
* LED1--GPB5
* LED2--GPB6
* LED3--GPB7
* LED4--GPB8
* K1--EINT8
* K2--EINT11
* K3--EINT13
* K4--EINT14
*/
#define GPBCON (*(volatile unsigned long*)0x56000010)
#define GPBDAT (*(volatile unsigned long*)0x56000014)
#define GPBUP (*(volatile unsigned long*)0x56000018)
#define GPGCON (*(volatile unsigned long*)0x56000060)
#define GPGUP (*(volatile unsigned long*)0x56000068)
#define GPGDAT (*(volatile unsigned long*)0x56000064)
#define EINTMASK (*(volatile unsigned long*)0x560000a4) //使能
#define INTMSK (*(volatile unsigned long*)0x4A000008) //使能
#define INTOFFSET (*(volatile unsigned long*)0x4A000014)//查看是哪个中断
#define INTMOD (*(volatile unsigned long*)0x4A000004) //IRQ
#define EINTPEND (*(volatile unsigned long*)0x560000A8)//清除中断相关
#define SRCPND (*(volatile unsigned long*)0x4A000000)
#define INTPND (*(volatile unsigned long*)0x4A000010)
#define MPLL_400MHz ((92<<12)|(1<<4)|(1<<0))
#define MPLL_200MHz ((92<<12)|(4<<4)|(1<<0))
#define MPLLCON (*(volatile unsigned long*)0x4c000004)
#define CLKDIVN (*(volatile unsigned long*)0x4c000014)//其实最重要的初始化工作可以用2440.s搞定(时间短)
//#define U32 unsigned int
#define pISR_EINT8_23 (*(volatile unsigned long*)0x33ffff34)
#define Led1_On ~(1<<5)
#define Led1_Off (1<<5)
#define Led2_On ~(1<<6)
#define Led2_Off (1<<6)
#define Led3_On ~(1<<7)
#define Led3_Off (1<<7)
#define Led4_On ~(1<<8)
#define Led4_Off (1<<8)
void __irq IRQ_Handler(void);
void Led_Port_Init(void);
void delay(int times);
void Clock_Init(void);
void Interrupt_init(void);
void delay(int times)
{
int i,j;