⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 startup_rvmdk.s

📁 Luminary Micro BLDC motor control software
💻 S
字号:
; <<< Use Configuration Wizard in Context Menu >>>;******************************************************************************;; startup_rvmdk.S - Startup code for use with Keil's uVision.;; Copyright (c) 2007 Luminary Micro, Inc.  All rights reserved.; Luminary Micro Confidential - For Use Under NDA Only;;******************************************************************************;******************************************************************************;; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>;;******************************************************************************Stack   EQU     0x00001000;******************************************************************************;; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>;;******************************************************************************Heap    EQU     0x00000000;******************************************************************************;; Allocate space for the stack.;;******************************************************************************        AREA    STACK, NOINIT, READWRITE, ALIGN=3StackMem        SPACE   Stack__initial_sp;******************************************************************************;; Allocate space for the heap.;;******************************************************************************        AREA    HEAP, NOINIT, READWRITE, ALIGN=3__heap_baseHeapMem        SPACE   Heap__heap_limit;******************************************************************************;; Indicate that the code in this file preserves 8-byte alignment of the stack.;;******************************************************************************        PRESERVE8;******************************************************************************;; Place code into the reset code section.;;******************************************************************************        AREA    RESET, CODE, READONLY        THUMB;******************************************************************************;; External declarations for the interrupt handlers used by the application.;;******************************************************************************        EXTERN  IntDefaultHandler        EXTERN  ADC0IntHandler        EXTERN  ADC1IntHandler        EXTERN  ADC2IntHandler        EXTERN  ADC3IntHandler        EXTERN  CANIntHandler        EXTERN  EthernetIntHandler        EXTERN  GPIOBIntHandler        EXTERN  GPIOCIntHandler        EXTERN  FaultISR        EXTERN  NmiSR        EXTERN  PWM0IntHandler        EXTERN  MainWaveformTick        EXTERN  MainMillisecondTick        EXTERN  QEIIntHandler        EXTERN  SysTickIntHandler        EXTERN  Timer0AIntHandler        EXTERN  Timer1AIntHandler        EXTERN  UART0IntHandler        EXTERN  WatchdogIntHandler;******************************************************************************;; The vector table.;;******************************************************************************        EXPORT  __Vectors__Vectors        DCD     StackMem + Stack            ; Top of Stack        DCD     Reset_Handler               ; Reset Handler        DCD     NmiSR                       ; NMI Handler        DCD     FaultISR                    ; Hard Fault Handler        DCD     IntDefaultHandler           ; MPU Fault Handler        DCD     IntDefaultHandler           ; Bus Fault Handler        DCD     IntDefaultHandler           ; Usage Fault Handler        DCD     0                           ; Reserved        DCD     0                           ; Reserved        DCD     0                           ; Reserved        DCD     0                           ; Reserved        DCD     IntDefaultHandler           ; SVCall Handler        DCD     IntDefaultHandler           ; Debug Monitor Handler        DCD     0                           ; Reserved        DCD     IntDefaultHandler           ; PendSV Handler        DCD     SysTickIntHandler           ; SysTick Handler        DCD     IntDefaultHandler           ; GPIO Port A        DCD     GPIOBIntHandler             ; GPIO Port B        DCD     GPIOCIntHandler             ; GPIO Port C        DCD     IntDefaultHandler           ; GPIO Port D        DCD     IntDefaultHandler           ; GPIO Port E        DCD     UART0IntHandler             ; UART0        DCD     IntDefaultHandler           ; UART1        DCD     IntDefaultHandler           ; SSI        DCD     IntDefaultHandler           ; I2C        DCD     IntDefaultHandler           ; PWM Fault        DCD     PWM0IntHandler              ; PWM Generator 0        DCD     MainWaveformTick            ; PWM Generator 1        DCD     MainMillisecondTick         ; PWM Generator 2        DCD     QEIIntHandler               ; Quadrature Encoder        DCD     ADC0IntHandler              ; ADC Sequence 0        DCD     ADC1IntHandler              ; ADC Sequence 1        DCD     ADC2IntHandler              ; ADC Sequence 2        DCD     ADC3IntHandler              ; ADC Sequence 3        DCD     WatchdogIntHandler          ; Watchdog        DCD     Timer0AIntHandler           ; Timer 0A        DCD     IntDefaultHandler           ; Timer 0B        DCD     Timer1AIntHandler           ; Timer 1A        DCD     IntDefaultHandler           ; Timer 1B        DCD     IntDefaultHandler           ; Timer 2A        DCD     IntDefaultHandler           ; Timer 2B        DCD     IntDefaultHandler           ; Comp 0        DCD     IntDefaultHandler           ; Comp 1        DCD     IntDefaultHandler           ; Comp 2        DCD     IntDefaultHandler           ; System Control        DCD     IntDefaultHandler           ; Flash Control        DCD     IntDefaultHandler           ; GPIO Port F        DCD     IntDefaultHandler           ; GPIO Port G        DCD     IntDefaultHandler           ; GPIO Port H        DCD     IntDefaultHandler           ; UART2 Rx and Tx        DCD     IntDefaultHandler           ; SSI1 Rx and Tx        DCD     IntDefaultHandler           ; Timer 3 subtimer A        DCD     IntDefaultHandler           ; Timer 3 subtimer B        DCD     IntDefaultHandler           ; I2C1 Master and Slave        DCD     IntDefaultHandler           ; Quadrature Encoder 1        DCD     CANIntHandler               ; CAN0        DCD     IntDefaultHandler           ; CAN1        DCD     IntDefaultHandler           ; CAN2        DCD     EthernetIntHandler          ; Ethernet        DCD     IntDefaultHandler           ; Hibernate;******************************************************************************;; This is the code that gets called when the processor first starts execution; following a reset event.;;******************************************************************************        EXPORT  Reset_HandlerReset_Handler        ;        ; Call the C library enty point that handles startup.  This will copy        ; the .data section initializers from flash to SRAM and zero fill the        ; .bss section.        ;        IMPORT  __main        B       __main;******************************************************************************;; Make sure the end of this section is aligned.;;******************************************************************************        ALIGN;******************************************************************************;; Some code in the normal code section for initializing the heap and stack.;;******************************************************************************        AREA    |.text|, CODE, READONLY;******************************************************************************;; The function expected of the C library startup code for defining the stack; and heap memory locations.  For the C library version of the startup code,; provide this function so that the C library initialization code can find out; the location of the stack and heap.;;******************************************************************************    IF :DEF: __MICROLIB        EXPORT  __initial_sp        EXPORT  __heap_base        EXPORT  __heap_limit    ELSE        IMPORT  __use_two_region_memory        EXPORT  __user_initial_stackheap__user_initial_stackheap        LDR     R0, =HeapMem        LDR     R1, =(StackMem + Stack)        LDR     R2, =(HeapMem + Heap)        LDR     R3, =StackMem        BX      LR    ENDIF;******************************************************************************;; Make sure the end of this section is aligned.;;******************************************************************************        ALIGN;******************************************************************************;; Tell the assembler that we're done.;;******************************************************************************        END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -