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

📄 main.lst

📁 Cortex-M4+example
💻 LST
字号:
###############################################################################
#                                                                             #
# IAR ANSI C/C++ Compiler V6.40.1.53790/W32 for ARM     09/Aug/2012  09:36:30 #
# Copyright 1999-2012 IAR Systems AB.                                         #
#                                                                             #
#    Cpu mode     =  thumb                                                    #
#    Endian       =  little                                                   #
#    Source file  =  C:\Users\305030973\Desktop\M4                            #
#                    example\03_uart_int\src\Sources\C\main.c                 #
#    Command line =  "C:\Users\305030973\Desktop\M4                           #
#                    example\03_uart_int\src\Sources\C\main.c" -D IAR -D      #
#                    TWR_K60N512 -lCN "C:\Users\305030973\Desktop\M4          #
#                    example\03_uart_int\bin\Flash\List\" -lB                 #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\03_uart_int\bin\Flash\List\" -o                  #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\03_uart_int\bin\Flash\Obj\" --no_cse             #
#                    --no_unroll --no_inline --no_code_motion --no_tbaa       #
#                    --no_clustering --no_scheduling --debug --endian=little  #
#                    --cpu=Cortex-M4 -e --fpu=None --dlib_config "C:\Program  #
#                    Files\IAR Systems\Embedded Workbench                     #
#                    6.4_2\arm\INC\c\DLib_Config_Normal.h" -I                 #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\03_uart_int\src\Sources\H\" -I                   #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\03_uart_int\src\Sources\H\Component_H\" -I       #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\03_uart_int\src\Sources\H\Frame_H\" -Ol          #
#                    --use_c++_inline                                         #
#    List file    =  C:\Users\305030973\Desktop\M4                            #
#                    example\03_uart_int\bin\Flash\List\main.lst              #
#    Object file  =  C:\Users\305030973\Desktop\M4                            #
#                    example\03_uart_int\bin\Flash\Obj\main.o                 #
#                                                                             #
#                                                                             #
###############################################################################

C:\Users\305030973\Desktop\M4 example\03_uart_int\src\Sources\C\main.c
      1          //-------------------------------------------------------------------------*
      2          // 工 程 名: uart_int                                                      *
      3          // 硬件连接: 将K60核心板与扩展板连接                                       *
      4          // 程序描述: 启动后发送"Hello World!",之后等待接收一个字节数据,收到后回发*
      5          // 目    的: 初步掌握利用中断方式进行串行通信的基本知识                    *
      6          // 说    明: 波特率为9600,使用UART3口                                      *
      7          //---------------苏州大学飞思卡尔嵌入式系统实验室2011年--------------------*
      8          
      9          //头文件
     10          #include "includes.h"
     11          
     12          //全局变量声明
     13          extern int periph_clk_khz;
     14          
     15          //主函数

   \                                 In section .text, align 4, keep-with-next
     16          void main(void)
     17          {
     18              //1 主程序使用的变量定义
     19              uint32 runcount;		//运行计数器
     20              
     21              //2 关中断
     22              DisableInterrupts;      //禁止总中断
   \                     main:
   \   00000000   0xB672             CPSID i
     23              
     24              //3 模块初始化
     25              light_init(Light_Run_PORT,Light_Run1,Light_OFF); //指示灯初始化
   \   00000002   0x2201             MOVS     R2,#+1
   \   00000004   0x210D             MOVS     R1,#+13
   \   00000006   0x480F             LDR.N    R0,??main_0      ;; 0x400ff080
   \   00000008   0x.... 0x....      BL       light_init
     26              uart_init (UART3,periph_clk_khz,9600);			 //串口初始化
   \   0000000C   0xF44F 0x5216      MOV      R2,#+9600
   \   00000010   0x480D             LDR.N    R0,??main_0+0x4
   \   00000012   0x6801             LDR      R1,[R0, #+0]
   \   00000014   0x480D             LDR.N    R0,??main_0+0x8  ;; 0x4006d000
   \   00000016   0x.... 0x....      BL       uart_init
     27          
     28              //4 开中断
     29              enableuartreint(UART3,UART3irq);		//开串口3接收中断
   \   0000001A   0x2133             MOVS     R1,#+51
   \   0000001C   0x480B             LDR.N    R0,??main_0+0x8  ;; 0x4006d000
   \   0000001E   0x.... 0x....      BL       enableuartreint
     30              EnableInterrupts;			        //开总中断
   \   00000022   0xB662             CPSIE i
     31              
     32              uart_sendN(UART3,(uint8*)"Hello World!",12);
   \   00000024   0x220C             MOVS     R2,#+12
   \   00000026   0x490A             LDR.N    R1,??main_0+0xC
   \   00000028   0x4808             LDR.N    R0,??main_0+0x8  ;; 0x4006d000
   \   0000002A   0x.... 0x....      BL       uart_sendN
     33              //主循环
     34              while(1)
     35              {
     36                  //1 主循环计数到一定的值,使小灯的亮、暗状态切换
     37                  runcount++;
   \                     ??main_1:
   \   0000002E   0x1C64             ADDS     R4,R4,#+1
     38                  if(runcount>=5000000)
   \   00000030   0x4808             LDR.N    R0,??main_0+0x10  ;; 0x4c4b40
   \   00000032   0x4284             CMP      R4,R0
   \   00000034   0xD3FB             BCC.N    ??main_1
     39                  {
     40                      light_change(Light_Run_PORT,Light_Run1);//指示灯的亮、暗状态切换
   \   00000036   0x210D             MOVS     R1,#+13
   \   00000038   0x4802             LDR.N    R0,??main_0      ;; 0x400ff080
   \   0000003A   0x.... 0x....      BL       light_change
     41                      runcount=0;
   \   0000003E   0x2400             MOVS     R4,#+0
   \   00000040   0xE7F5             B.N      ??main_1
   \   00000042   0xBF00             Nop      
   \                     ??main_0:
   \   00000044   0x400FF080         DC32     0x400ff080
   \   00000048   0x........         DC32     periph_clk_khz
   \   0000004C   0x4006D000         DC32     0x4006d000
   \   00000050   0x........         DC32     `?<Constant "Hello World!">`
   \   00000054   0x004C4B40         DC32     0x4c4b40
     42                  }			
     43              }
     44          }

   \                                 In section .rodata, align 4
   \                     `?<Constant "Hello World!">`:
   \   00000000   0x48 0x65          DC8 "Hello World!"
   \              0x6C 0x6C    
   \              0x6F 0x20    
   \              0x57 0x6F    
   \              0x72 0x6C    
   \              0x64 0x21    
   \              0x00         
   \   0000000D   0x00 0x00          DC8 0, 0, 0
   \              0x00         
     45          
     46          
     47          
     48          

   Maximum stack usage in bytes:

   .cstack Function
   ------- --------
        0  main
             0 -> enableuartreint
             0 -> light_change
             0 -> light_init
             0 -> uart_init
             0 -> uart_sendN


   Section sizes:

   Bytes  Function/Label
   -----  --------------
      16  ?<Constant "Hello World!">
      88  main

 
 16 bytes in section .rodata
 88 bytes in section .text
 
 88 bytes of CODE  memory
 16 bytes of CONST memory

Errors: none
Warnings: none

⌨️ 快捷键说明

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