📄 main.lst
字号:
##############################################################################
# #
# IAR ARM ANSI C/C++ Compiler V4.31A/W32 EVALUATION 28/Feb/2007 15:38:31 #
# Copyright 1999-2005 IAR Systems. All rights reserved. #
# #
# Cpu mode = interwork #
# Endian = little #
# Stack alignment = 4 #
# Source file = D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\src\main.c #
# Command line = "D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\src\main.c" -lC #
# "D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\Compil\Binary\List\" #
# -o "D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\Compil\Binary\Obj\" #
# -z9 --debug --cpu_mode thumb --endian little --cpu #
# ARM7TDMI --stack_align 4 --interwork -e --fpu None #
# --dlib_config "C:\Program Files\IAR #
# Systems\Embedded Workbench 4.0 #
# Evaluation\arm\LIB\dl4tptinl8n.h" -I #
# "D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\Compil\srcIAR\" -I #
# "D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\Compil\..\src\" -I #
# "D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\Compil\..\..\" -I #
# "C:\Program Files\IAR Systems\Embedded Workbench #
# 4.0 Evaluation\arm\INC\" #
# List file = D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\Compil\Binary\List\mai #
# n.lst #
# Object file = D:\work\AC-530\software\my #
# usb\AT91SAM7S-USART_USB_SAM7S\Compil\Binary\Obj\main #
# .r79 #
# #
# #
##############################################################################
D:\work\AC-530\software\my usb\AT91SAM7S-USART_USB_SAM7S\src\main.c
1 //*--------------------------------------------------------------------------------------
2 //* ATMEL Microcontroller Software Support - ROUSSET -
3 //*--------------------------------------------------------------------------------------
4 //* The software is delivered "AS IS" without warranty or condition of any
5 //* kind, either express, implied or statutory. This includes without
6 //* limitation any warranty or condition with respect to merchantability or
7 //* fitness for any particular purpose, or against the infringements of
8 //* intellectual property rights of others.
9 //*--------------------------------------------------------------------------------------
10 //* File Name : main file
11 //* Object :
12 //* Translator :
13 //* 1.0 02/Mar/05 JPP : Creation
14 //*--------------------------------------------------------------------------------------
15
16 #include "Project.h"
17 #include "cdc_enumerate.h"
18
19 #define MSG_SIZE 1000
20
21
22 //* external function
23
24 extern void Usart_init ( void );
25 extern void AT91F_US_Put( char *buffer); // \arg pointer to a string ending by \0
26 extern void Trace_Toggel_LED( unsigned int led) ;
27
\ In segment DATA_Z, align 4, align-sorted
28 struct _AT91S_CDC pCDC;
\ pCDC:
\ 00000000 DS8 24
29
30 //*----------------------------------------------------------------------------
31 //* \fn AT91F_USB_Open
32 //* \brief This function Open the USB device
33 //*----------------------------------------------------------------------------
\ In segment CODE, align 4, keep-with-next
34 void AT91F_USB_Open(void)
35 {
\ AT91F_USB_Open:
\ 00000000 00B5 PUSH {LR}
36 // Set the PLL USB Divider
37 AT91C_BASE_CKGR->CKGR_PLLR |= AT91C_CKGR_USBDIV_1 ;
\ 00000002 0C48 LDR R0,??AT91F_USB_Open_0 ;; 0xfffffc2c
\ 00000004 0168 LDR R1,[R0, #+0]
\ 00000006 8022 MOV R2,#+128
\ 00000008 5205 LSL R2,R2,#+21 ;; #+268435456
\ 0000000A 0A43 ORR R2,R1
\ 0000000C 0260 STR R2,[R0, #+0]
38
39 // Specific Chip USB Initialisation
40 // Enables the 48MHz USB clock UDPCK and System Peripheral USB Clock
41 AT91C_BASE_PMC->PMC_SCER = AT91C_PMC_UDP;
\ 0000000E 0A48 LDR R0,??AT91F_USB_Open_0+0x4 ;; 0xfffffc00
\ 00000010 8021 MOV R1,#+128
\ 00000012 0160 STR R1,[R0, #+0]
42 AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_UDP);
\ 00000014 .... LDR R0,??DataTable5 ;; 0xfffffc10
\ 00000016 0901 LSL R1,R1,#+4
\ 00000018 0160 STR R1,[R0, #+0]
43
44 // Enable UDP PullUp (USB_DP_PUP) : enable & Clear of the corresponding PIO
45 // Set in PIO mode and Configure in Output
46 AT91F_PIO_CfgOutput(AT91C_BASE_PIOA,AT91C_PIO_PA16);
\ 0000001A 4801 LSL R0,R1,#+5
\ 0000001C .... LDR R1,??DataTable6 ;; 0xfffff400
\ 0000001E 0860 STR R0,[R1, #+0]
\ 00000020 .... LDR R1,??DataTable7 ;; 0xfffff410
\ 00000022 0860 STR R0,[R1, #+0]
47 // Clear for set the Pul up resistor
48 AT91F_PIO_ClearOutput(AT91C_BASE_PIOA,AT91C_PIO_PA16);
\ 00000024 .... LDR R1,??DataTable8 ;; 0xfffff434
\ 00000026 0860 STR R0,[R1, #+0]
49
50 // CDC Open by structure initialization
51 AT91F_CDC_Open(&pCDC, AT91C_BASE_UDP);
\ 00000028 0449 LDR R1,??AT91F_USB_Open_0+0x8 ;; 0xfffb0000
\ 0000002A .... LDR R0,??DataTable9 ;; pCDC
\ 0000002C ........ _BLF AT91F_CDC_Open,??AT91F_CDC_Open??rT
52 }
\ 00000030 01BC POP {R0}
\ 00000032 0047 BX R0 ;; return
\ ??AT91F_USB_Open_0:
\ 00000034 2CFCFFFF DC32 0xfffffc2c
\ 00000038 00FCFFFF DC32 0xfffffc00
\ 0000003C 0000FBFF DC32 0xfffb0000
53
54 //*--------------------------------------------------------------------------------------
55 //* Function Name : main
56 //* Object :
57 //*--------------------------------------------------------------------------------------
\ In segment CODE, align 4, keep-with-next
58 int main ( void )
59 {
\ main:
\ 00000000 F0B5 PUSH {R4-R7,LR}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -