Cortex-M4ÔÚkeilÏÂÆô¶¯Îļþ½âÎö ÏÂÔر¾ÎÄ

Stack_Size EQU 0x00000400

¶¨ÒåÕ»¿Õ¼ä´óСΪ0x00000400¸ö×Ö½Ú£¬¼´1Kbyte¡£ AREA STACK, NOINIT, READWRITE, ALIGN=3

AREAÖ¸ÁαָÁÓÃÓÚ¶¨Òå´úÂë¶Î»òÊý¾Ý¶Î£¬ºó¸úÊôÐÔ±êºÅ¡£ÆäÖбȽÏÖØÒªµÄÒ»¸ö±êºÅΪ¡°READONLY¡±»òÕß¡°READWRITE¡±£¬ÆäÖÐ ¡°READONLY¡±±íʾ¸Ã¶ÎΪֻ¶ÁÊôÐÔ£¬¾ßÓÐÖ»¶ÁÊôÐԵĶα£´æÓÚFLASHÇø¡£¶ø ¡°READWRITE¡±±íʾ¸Ã¶ÎΪ¡°¿É¶Áд¡±ÊôÐÔ£¬¿ÉÖª¡°¿É¶Áд¡±¶Î±£´æÓÚSRAMÇø¡£

ÓÉ´Ë¿ÉÒÔÖª£¬¶ÑÕ»¶ÎλÓÚSRAM¿Õ¼ä£¬ÖжÏÏòÁ¿±í·ÅÖÃÓëFLASHÇø£¬¶øÕâÒ²ÊÇÕûƬÆô¶¯´úÂëÖÐ×îÏȱ»·Å½øFLASHÇøµÄÊý¾Ý¡£Òò´Ë¿ÉÒԵõ½Ò»ÌõÖØÒªµÄÐÅÏ¢£¿£¿µØÖ·´æ·ÅµÄÊÇÕ»¶¥µØÖ·__initial_sp£¬£¿£¿µØÖ·´æ·ÅµÄÊǸ´Î»ÖжÏÏòÁ¿ Reset_Handler¡£ K60ʹÓÃ32λ×ÜÏߣ¬Òò´Ë´æ´¢¿Õ¼äΪ4×Ö½Ú¶ÔÆë¡£ Stack_Mem SPACE Stack_Size

¿ª±ÙÒ»¶Î´óСΪStack_sizeµÄÄÚ´æ¿Õ¼ä×÷Ϊջ¡£ __initial_sp

±êºÅ__initial_sp,±íʾջ¿Õ¼äµÄ¶¥µØÖ·¡£ Heap_Size EQU 0x00000000 ¶¨Òå¶Ñ¿Õ¼ä´óС¡£

AREA HEAP, NOINIT, READWRITE, ALIGN=3 αָÁîAREA¡£ __heap_base

±êºÅ__heap_base£¬±íʾ¶Ñ¿Õ¼äÆðʼµØÖ·¡£ Heap_Mem SPACE Heap_Size

¿ª±ÙÒ»¶Î´óСΪHeap_SizeµÄÄÚ´æ¿Õ¼ä×÷Ϊ¶Ñ¡£ __heap_limit

±êºÅ__heap_limit£¬±íʾ¶Ñ¿Õ¼äµÄ½áÊøµØÖ·¡£ PRESERVE8

¸æËß±àÒëÆ÷ÒÔ8×Ö½Ú¶ÔÆë¡£ THUMB

¸æËß±àÒëÆ÷ʹÓÃTHUMBÖ¸Á

AREA RESET, DATA, READONLY

αָÁîAREA£¬¶¨ÒåÖ»¶ÁÊý¾ÝÇø£¬Êµ¼ÊÉÏÊÇÔÚCODEÇø EXPORT __Vectors

EXPORT __Vectors_End EXPORT __Vectors_Size

EXPORT£¬½«±êºÅ__Vectors£¬__Vectors_End£¬__Vectors_SizeÉùÃ÷Ϊȫ¾Ö±êºÅ£¬ÕâÑùÍⲿÎļþ¾Í¿ÉÒÔʹÓÃÕâ¸ö±êºÅ¡£ __Vectors

±êºÅ __Vectors£¬±íʾÖжÏÏòÁ¿µÄÈë¿ÚµØÖ·¡£ DCD __initial_sp ; Top of Stack DCD Reset_Handler ; Reset Handler DCD NMI_Handler ; NMI Handler

DCD HardFault_Handler ; Hard Fault Handler DCD MemManage_Handler ; MPU Fault Handler DCD BusFault_Handler ; Bus Fault Handler

DCD UsageFault_Handler ; Usage Fault Handler DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved

DCD SVC_Handler ; SVCall Handler

DCD DebugMon_Handler ; Debug Monitor Handler DCD 0 ; Reserved

DCD PendSV_Handler ; PendSV Handler DCD SysTick_Handler ; SysTick Handler ½¨Á¢ÄÚ²¿ÖжÏÏòÁ¿±í ; External Interrupts

DCD DMA0_IRQHandler ; DMA Channel 0 Transfer Complete DCD DMA1_IRQHandler ; DMA Channel 1 Transfer Complete DCD DMA2_IRQHandler ; DMA Channel 2 Transfer Complete DCD DMA3_IRQHandler ; DMA Channel 3 Transfer Complete DCD DMA4_IRQHandler ; DMA Channel 4 Transfer Complete DCD DMA5_IRQHandler ; DMA Channel 5 Transfer Complete DCD DMA6_IRQHandler ; DMA Channel 6 Transfer Complete DCD DMA7_IRQHandler ; DMA Channel 7 Transfer Complete DCD DMA8_IRQHandler ; DMA Channel 8 Transfer Complete DCD DMA9_IRQHandler ; DMA Channel 9 Transfer Complete DCD DMA10_IRQHandler ; DMA Channel 10 Transfer Complete DCD DMA11_IRQHandler ; DMA Channel 11 Transfer Complete DCD DMA12_IRQHandler ; DMA Channel 12 Transfer Complete DCD DMA13_IRQHandler ; DMA Channel 13 Transfer Complete DCD DMA14_IRQHandler ; DMA Channel 14 Transfer Complete DCD DMA15_IRQHandler ; DMA Channel 15 Transfer Complete DCD DMA_Error_IRQHandler ; DMA Error Interrupt DCD MCM_IRQHandler ; Normal Interrupt DCD FTFL_IRQHandler ; FTFL Interrupt

DCD Read_Collision_IRQHandler ; Read Collision Interrupt

DCD LVD_LVW_IRQHandler ; Low Voltage Detect, Low Voltage Warning DCD LLW_IRQHandler ; Low Leakage Wakeup DCD Watchdog_IRQHandler ; WDOG Interrupt DCD RNG_IRQHandler ; RNGB Interrupt DCD I2C0_IRQHandler ; I2C0 interrupt DCD I2C1_IRQHandler ; I2C1 interrupt DCD SPI0_IRQHandler ; SPI0 Interrupt DCD SPI1_IRQHandler ; SPI1 Interrupt DCD SPI2_IRQHandler ; SPI2 Interrupt

DCD CAN0_ORed_Message_buffer_IRQHandler ; CAN0 OR'd Message Buffers Interrupt DCD CAN0_Bus_Off_IRQHandler ; CAN0 Bus Off Interrupt DCD CAN0_Error_IRQHandler ; CAN0 Error Interrupt

DCD CAN0_Tx_Warning_IRQHandler ; CAN0 Tx Warning Interrupt DCD CAN0_Rx_Warning_IRQHandler ; CAN0 Rx Warning Interrupt DCD CAN0_Wake_Up_IRQHandler ; CAN0 Wake Up Interrupt DCD Reserved51_IRQHandler ; Reserved interrupt 51 DCD Reserved52_IRQHandler ; Reserved interrupt 52

DCD CAN1_ORed_Message_buffer_IRQHandler ; CAN1 OR'd Message Buffers Interrupt DCD CAN1_Bus_Off_IRQHandler ; CAN1 Bus Off Interrupt DCD CAN1_Error_IRQHandler ; CAN1 Error Interrupt

DCD CAN1_Tx_Warning_IRQHandler ; CAN1 Tx Warning Interrupt DCD CAN1_Rx_Warning_IRQHandler ; CAN1 Rx Warning Interrupt DCD CAN1_Wake_Up_IRQHandler ; CAN1 Wake Up Interrupt DCD Reserved59_IRQHandler ; Reserved interrupt 59 DCD Reserved60_IRQHandler ; Reserved interrupt 60

DCD UART0_RX_TX_IRQHandler ; UART0 Receive/Transmit interrupt DCD UART0_ERR_IRQHandler ; UART0 Error interrupt

DCD UART1_RX_TX_IRQHandler ; UART1 Receive/Transmit interrupt DCD UART1_ERR_IRQHandler ; UART1 Error interrupt

DCD UART2_RX_TX_IRQHandler ; UART2 Receive/Transmit interrupt DCD UART2_ERR_IRQHandler ; UART2 Error interrupt

DCD UART3_RX_TX_IRQHandler ; UART3 Receive/Transmit interrupt DCD UART3_ERR_IRQHandler ; UART3 Error interrupt

DCD UART4_RX_TX_IRQHandler ; UART4 Receive/Transmit interrupt DCD UART4_ERR_IRQHandler ; UART4 Error interrupt

DCD UART5_RX_TX_IRQHandler ; UART5 Receive/Transmit interrupt DCD UART5_ERR_IRQHandler ; UART5 Error interrupt DCD ADC0_IRQHandler ; ADC0 interrupt DCD ADC1_IRQHandler ; ADC1 interrupt DCD CMP0_IRQHandler ; CMP0 interrupt DCD CMP1_IRQHandler ; CMP1 interrupt DCD CMP2_IRQHandler ; CMP2 interrupt

DCD FTM0_IRQHandler ; FTM0 fault, overflow and channels interrupt DCD FTM1_IRQHandler ; FTM1 fault, overflow and channels interrupt DCD FTM2_IRQHandler ; FTM2 fault, overflow and channels interrupt DCD CMT_IRQHandler ; CMT interrupt DCD RTC_IRQHandler ; RTC interrupt

DCD Reserved83_IRQHandler ; Reserved interrupt 83 DCD PIT0_IRQHandler ; PIT timer channel 0 interrupt DCD PIT1_IRQHandler ; PIT timer channel 1 interrupt DCD PIT2_IRQHandler ; PIT timer channel 2 interrupt DCD PIT3_IRQHandler ; PIT timer channel 3 interrupt DCD PDB0_IRQHandler ; PDB0 Interrupt DCD USB0_IRQHandler ; USB0 interrupt

DCD USBDCD_IRQHandler ; USBDCD Interrupt

DCD ENET_1588_Timer_IRQHandler ; Ethernet MAC IEEE 1588 Timer Interrupt

DCD ENET_Transmit_IRQHandler ; Ethernet MAC Transmit Interrupt DCD ENET_Receive_IRQHandler ; Ethernet MAC Receive Interrupt

DCD ENET_Error_IRQHandler ; Ethernet MAC Error and miscelaneous Interrupt DCD I2S0_IRQHandler ; I2S0 Interrupt DCD SDHC_IRQHandler ; SDHC Interrupt DCD DAC0_IRQHandler ; DAC0 interrupt DCD DAC1_IRQHandler ; DAC1 interrupt DCD TSI0_IRQHandler ; TSI0 Interrupt DCD MCG_IRQHandler ; MCG Interrupt

DCD LPTimer_IRQHandler ; LPTimer interrupt

DCD Reserved102_IRQHandler ; Reserved interrupt 102 DCD PORTA_IRQHandler ; Port A interrupt DCD PORTB_IRQHandler ; Port B interrupt DCD PORTC_IRQHandler ; Port C interrupt DCD PORTD_IRQHandler ; Port D interrupt DCD PORTE_IRQHandler ; Port E interrupt

DCD Reserved108_IRQHandler ; Reserved interrupt 108 DCD Reserved109_IRQHandler ; Reserved interrupt 109 DCD Reserved110_IRQHandler ; Reserved interrupt 110 DCD Reserved111_IRQHandler ; Reserved interrupt 111 DCD Reserved112_IRQHandler ; Reserved interrupt 112 DCD Reserved113_IRQHandler ; Reserved interrupt 113 DCD Reserved114_IRQHandler ; Reserved interrupt 114 DCD Reserved115_IRQHandler ; Reserved interrupt 115 DCD Reserved116_IRQHandler ; Reserved interrupt 116 DCD Reserved117_IRQHandler ; Reserved interrupt 117 DCD Reserved118_IRQHandler ; Reserved interrupt 118 DCD Reserved119_IRQHandler ; Reserved interrupt 119 ½¨Á¢ÍⲿÖжÏÏòÁ¿±í __Vectors_End

±êºÅ__Vectors_End£¬±íʾÖжÏÏòÁ¿±íµÄ½áÊøµØÖ·¡£ __Vectors_Size EQU __Vectors_End - __Vectors ±êºÅ__Vectors_Size£¬±íʾÖжÏÏòÁ¿±í¿Õ¼äµÄ´óС¡£

BackDoorK0 EQU 0xFF BackDoorK1 EQU 0xFF BackDoorK2 EQU 0xFF BackDoorK3 EQU 0xFF BackDoorK4 EQU 0xFF BackDoorK5 EQU 0xFF BackDoorK6 EQU 0xFF BackDoorK7 EQU 0xFF nFPROT0 EQU 0x00

FPROT0 EQU nFPROT0:EOR:0xFF