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

📄 start.lst

📁 Cortex-M4+example
💻 LST
📖 第 1 页 / 共 2 页
字号:
###############################################################################
#                                                                             #
# IAR ANSI C/C++ Compiler V6.40.1.53790/W32 for ARM     09/Aug/2012  09:28:54 #
# Copyright 1999-2012 IAR Systems AB.                                         #
#                                                                             #
#    Cpu mode     =  thumb                                                    #
#    Endian       =  little                                                   #
#    Source file  =  C:\Users\305030973\Desktop\M4                            #
#                    example\02_uart_loop\src\Project_Settings\Startup_Code\s #
#                    tart.c                                                   #
#    Command line =  "C:\Users\305030973\Desktop\M4                           #
#                    example\02_uart_loop\src\Project_Settings\Startup_Code\s #
#                    tart.c" -D IAR -D TWR_K60N512 -lCN                       #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\02_uart_loop\bin\Flash\List\" -lB                #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\02_uart_loop\bin\Flash\List\" -o                 #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\02_uart_loop\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\02_uart_loop\src\Sources\H\" -I                  #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\02_uart_loop\src\Sources\H\Component_H\" -I      #
#                    "C:\Users\305030973\Desktop\M4                           #
#                    example\02_uart_loop\src\Sources\H\Frame_H\" -Ol         #
#                    --use_c++_inline                                         #
#    List file    =  C:\Users\305030973\Desktop\M4                            #
#                    example\02_uart_loop\bin\Flash\List\start.lst            #
#    Object file  =  C:\Users\305030973\Desktop\M4                            #
#                    example\02_uart_loop\bin\Flash\Obj\start.o               #
#                                                                             #
#                                                                             #
###############################################################################

C:\Users\305030973\Desktop\M4 example\02_uart_loop\src\Project_Settings\Startup_Code\start.c
      1          //-------------------------------------------------------------------------*
      2          // 文件名:start.c                                                          *
      3          // 说  明: CPU启动后进行系统配置                                           *
      4          //-------------------------------------------------------------------------*
      5          
      6          //头文件
      7          #include "common.h"
      8          #include "wdog.h"
      9          #include "sysinit.h"
     10          
     11          #pragma section = ".data"
     12          #pragma section = ".data_init"
     13          #pragma section = ".bss"
     14          #pragma section = "CodeRelocate"
     15          #pragma section = "CodeRelocateRam" 
     16          
     17          //内部函数声明
     18          //-------------------------------------------------------------------------*
     19          //函数名: common_startup                                                   *
     20          //功  能: 复制中断向量表到RAM中                                            * 
     21          //参  数: 无								   *	
     22          //说  明: 将ROM中的初始化数据拷贝到RAM中                                   *
     23          //-------------------------------------------------------------------------*
     24          void common_startup(void);
     25          
     26          //-------------------------------------------------------------------------*
     27          //函数名: start                                                            *
     28          //功  能: 系统启动                                                         * 
     29          //参  数: 无								   *	
     30          //说  明: 无                                                               *
     31          //-------------------------------------------------------------------------*

   \                                 In section .text, align 2, keep-with-next
     32          void start(void)
     33          {
   \                     start:
   \   00000000   0xB580             PUSH     {R7,LR}
     34              //关闭看门狗
     35              wdog_disable();		
   \   00000002   0x.... 0x....      BL       wdog_disable
     36              //复制中断向量表到RAM中
     37              common_startup();	
   \   00000006   0x.... 0x....      BL       common_startup
     38              //系统设置
     39              sysinit();			
   \   0000000A   0x.... 0x....      BL       sysinit
     40              //进入主函数
     41              main();				
   \   0000000E   0x.... 0x....      BL       main
     42          }
   \   00000012   0xBD01             POP      {R0,PC}          ;; return
     43          
     44          
     45          //-------------------------------------------------------------------------*
     46          //函数名: common_startup                                                   *
     47          //功  能: 复制中断向量表到RAM中                                            * 
     48          //参  数: 无								   *	
     49          //说  明: 将ROM中的初始化数据拷贝到RAM中                                   *
     50          //-------------------------------------------------------------------------*

   \                                 In section .text, align 2, keep-with-next
     51          void common_startup(void)
     52          {
   \                     common_startup:
   \   00000000   0xB580             PUSH     {R7,LR}
     53              /* Declare a counter we'll use in all of the copy loops */
     54              uint32 n;
     55           
     56           
     57              /* Addresses for VECTOR_TABLE and VECTOR_RAM come from the linker file */  
     58              extern uint32 __VECTOR_TABLE[];
     59              extern uint32 __VECTOR_RAM[];
     60          
     61              /* Copy the vector table to RAM */
     62              if (__VECTOR_RAM != __VECTOR_TABLE)
   \   00000002   0x....             LDR.N    R0,??DataTable0
   \   00000004   0x....             LDR.N    R1,??DataTable0_1
   \   00000006   0x4288             CMP      R0,R1
   \   00000008   0xD00B             BEQ.N    ??common_startup_0
     63              {
     64                  for (n = 0; n < 0x410; n++)
   \   0000000A   0x2000             MOVS     R0,#+0
   \   0000000C   0xE006             B.N      ??common_startup_1
     65                      __VECTOR_RAM[n] = __VECTOR_TABLE[n];
   \                     ??common_startup_2:
   \   0000000E   0x....             LDR.N    R1,??DataTable0
   \   00000010   0x....             LDR.N    R2,??DataTable0_1
   \   00000012   0xF852 0x2020      LDR      R2,[R2, R0, LSL #+2]
   \   00000016   0xF841 0x2020      STR      R2,[R1, R0, LSL #+2]
   \   0000001A   0x1C40             ADDS     R0,R0,#+1
   \                     ??common_startup_1:
   \   0000001C   0xF5B0 0x6F82      CMP      R0,#+1040
   \   00000020   0xD3F5             BCC.N    ??common_startup_2
     66              }
     67              /* Point the VTOR to the new copy of the vector table */
     68              write_vtor((uint32)__VECTOR_RAM);    
   \                     ??common_startup_0:
   \   00000022   0x....             LDR.N    R0,??DataTable0
   \   00000024   0x.... 0x....      BL       write_vtor
     69              
     70              /* Get the addresses for the .data section (initialized data section) */
     71              uint8* data_ram = __section_begin(".data");
   \   00000028   0x....             LDR.N    R1,??DataTable0_2
     72              uint8* data_rom = __section_begin(".data_init");
   \   0000002A   0x....             LDR.N    R2,??DataTable0_3
     73              uint8* data_rom_end = __section_end(".data_init");
   \   0000002C   0x....             LDR.N    R0,??DataTable0_4
     74              
     75              /* Copy initialized data from ROM to RAM */

⌨️ 快捷键说明

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