This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TDA3XEVM:第一个项目-计时器中断

Guru**** 2587365 points
Other Parts Discussed in Thread: TDA3XEVM

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1049797/tda3xevm-first-project---timer-interrupt

器件型号:TDA3XEVM

首次发布在这里、是 TI 全球的全新产品。  我正在使用 TDA3XEVM、并且使用最新的 CCS 版本为其中一个 ARM Cortex M4创建测试项目。  首先、我想让 Timer1中断工作。  

我使用的链接器命令文件如下所示:

    .if __TI_EABI_ASSEMBLER
    .asg c_intIRQ, C_INTIRQ
    .else
    .asg _c_intIRQ, C_INTIRQ
    .endif

    .global _c_int00
    .global _int_handler
    ;.global C_INTIRQ
    ;.global tim1_int

    .sect ".intvecs"

    B _c_int00 ; reset interrupt
    .word 0 ; undefined instruction interrupt
    .word 0 ; software interrupt
    .word 0 ; abort (prefetch) interrupt
    .word 0 ; abort (data) interrupt
    .word 0 ; reserved
    B _int_handler ; IRQ interrupt
    ;B tim1_int ; FIQ interrupt

以下是处理程序 FWiw:

__interrupt void int_handler(void)
{
    int i = 0;

    i = 9;
    if(i == 10)
    {
        i = 9;
    }
}

我在*。map 文件中生成了此文件:

******************************************************************************
                  TI ARM Linker PC v20.2.5                     
******************************************************************************
>> Linked Mon Nov  1 11:44:22 2021

OUTPUT FILE NAME:   <test-cortex-m-arm.out>
ENTRY POINT SYMBOL: "_c_int00"  address: 00002915


MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill
----------------------  --------  ---------  --------  --------  ----  --------
  P_MEM                 00000020   20000000  00003bf5  1fffc40b  RWIX
  D_MEM                 20000020   20000000  0000a3b0  1fff5c50  RWIX


SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
00000020    00000020    00002b65   00002b65    r-x
  00000020    00000020    00002a64   00002a64    r-x .text
  00002a84    00002a84    00000101   00000101    r-- .const
00002b88    00002b88    00001000   00001000    rw-
  00002b88    00002b88    00001000   00001000    rw- .args
00003b88    00003b88    00000090   00000090    r--
  00003b88    00003b88    00000090   00000090    r-- .cinit
20000020    20000020    0000a3b0   00000000    rw-
  20000020    20000020    00008000   00000000    rw- .stack
  20008020    20008020    00002000   00000000    rw- .sysmem
  2000a020    2000a020    000001e8   00000000    rw- .data
  2000a208    2000a208    000001c8   00000000    rw- .bss


SECTION ALLOCATION MAP

 output                                  attributes/
section   page    origin      length       input sections
--------  ----  ----------  ----------   ----------------
.text      0    00000020    00002a64     
                  00000020    00000a4e     rtsv7M4_T_le_eabi.lib : _printfi.c.obj (.text:__TI_printfi)
                  00000a6e    00000002                           : _lock.c.obj (.text:_nop)
                  00000a70    00000268                           : _printfi.c.obj (.text:_pconv_a)
                  00000cd8    000001cc                           : _printfi.c.obj (.text:_pconv_g)
                  00000ea4    000001b6                           : fd_add_t2.asm.obj (.text)
                  0000105a    00000002                           : div0.asm.obj (.text)
                  0000105c    0000013c                           : _printfi.c.obj (.text:_pconv_e)
                  00001198    00000136                           : fd_div_t2.asm.obj (.text)
                  000012ce    00000002     --HOLE-- [fill = 0]
                  000012d0    00000120                           : _printfi.c.obj (.text:fcvt)
                  000013f0    00000114                           : fputs.c.obj (.text:fputs)
                  00001504    00000100                           : memory.c.obj (.text:aligned_alloc)
                  00001604    000000fc                           : fd_mul_t2.asm.obj (.text)
                  00001700    000000e4                           : memory.c.obj (.text:free)
                  000017e4    000000dc                           : setvbuf.c.obj (.text:setvbuf)
                  000018c0    000000d0                           : s_scalbn.c.obj (.text:scalbn)
                  00001990    000000b4     hello.obj (.text)
                  00001a44    000000b1     rtsv7M4_T_le_eabi.lib : _printfi.c.obj (.text:_ltostr)
                  00001af5    00000001     --HOLE-- [fill = 0]
                  00001af6    0000009c                           : memcpy_t2.asm.obj (.text)
                  00001b92    00000096                           : ull_div_t2.asm.obj (.text)
                  00001c28    0000008c                           : fputc.c.obj (.text:fputc)
                  00001cb4    00000086                           : fd_cmp_t2.asm.obj (.text:__aeabi_cdcmple)
                  00001d3a    00000086                           : fd_cmp_t2.asm.obj (.text:__aeabi_cdrcmple)
                  00001dc0    0000007a                           : memset_t2.asm.obj (.text)
                  00001e3a    00000002     --HOLE-- [fill = 0]
                  00001e3c    00000074                           : fclose.c.obj (.text:__TI_closefile)
                  00001eb0    00000070                           : memory.c.obj (.text:split)
                  00001f20    0000006e                           : _printfi.c.obj (.text:_mcpy)
                  00001f8e    00000002     --HOLE-- [fill = 0]
                  00001f90    0000006c                           : hostrename.c.obj (.text:HOSTrename)
                  00001ffc    00000068                           : hostlseek.c.obj (.text:HOSTlseek)
                  00002064    00000068                           : copy_decompress_lzss.c.obj (.text:decompress:lzss:__TI_decompress_lzss)
                  000020cc    00000068                           : printf.c.obj (.text:printf)
                  00002134    00000064                           : fseek.c.obj (.text:fseek)
                  00002198    00000062                           : _io_perm.c.obj (.text:__TI_wrt_ok)
                  000021fa    00000002     --HOLE-- [fill = 0]
                  000021fc    00000060                           : hostopen.c.obj (.text:HOSTopen)
                  0000225c    0000005c                           : close.c.obj (.text:close)
                  000022b8    0000005c                           : s_frexp.c.obj (.text:frexp)
                  00002314    00000058                           : hostread.c.obj (.text:HOSTread)
                  0000236c    00000058                           : hostwrite.c.obj (.text:HOSTwrite)
                  000023c4    00000056                           : _printfi.c.obj (.text:_pconv_f)
                  0000241a    00000054                           : _ltoa.c.obj (.text:__TI_ltoa)
                  0000246e    00000052                           : _printfi.c.obj (.text:_ecpy)
                  000024c0    0000004c                           : fflush.c.obj (.text:__TI_doflush)
                  0000250c    0000004c                           : atoi.c.obj (.text:atoi)
                  00002558    00000048                           : exit.c.obj (.text:exit)
                  000025a0    00000048                           : fd_toi_t2.asm.obj (.text)
                  000025e8    00000044                           : hostclose.c.obj (.text:HOSTclose)
                  0000262c    00000044                           : hostunlink.c.obj (.text:HOSTunlink)
                  00002670    00000044                           : autoinit.c.obj (.text:__TI_auto_init_nobinit_nopinit:__TI_auto_init_nobinit_nopinit)
                  000026b4    00000044                           : getdevice.c.obj (.text:getdevice)
                  000026f8    0000003e                           : _printfi.c.obj (.text:_fcpy)
                  00002736    00000002     --HOLE-- [fill = 0]
                  00002738    00000038                           : trgmsg.c.obj (.text:__TI_writemsg)
                  00002770    00000036                           : strncpy.c.obj (.text:strncpy)
                  000027a6    00000002     --HOLE-- [fill = 0]
                  000027a8    00000034                           : fopen.c.obj (.text:__TI_cleanup)
                  000027dc    00000034                           : trgmsg.c.obj (.text:__TI_readmsg)
                  00002810    00000030                           : getdevice.c.obj (.text:finddevice)
                  00002840    0000002e                           : i_tofd_t2.asm.obj (.text)
                  0000286e    00000002     --HOLE-- [fill = 0]
                  00002870    0000002c                           : unlink.c.obj (.text:unlink)
                  0000289c    00000028                           : memory.c.obj (.text:free_list_insert)
                  000028c4    00000028                           : lseek.c.obj (.text:lseek)
                  000028ec    00000028                           : write.c.obj (.text:write)
                  00002914    00000024                           : boot_cortex_m.c.obj (.text:_c_int00:_c_int00)
                  00002938    00000020                           : memchr.c.obj (.text:memchr)
                  00002958    0000001c                           : copy_zero_init.c.obj (.text:decompress:ZI:__TI_zero_init_nomemset:__TI_zero_init_nomemset)
                  00002974    0000001c                           : memory.c.obj (.text:free_list_remove)
                  00002990    0000001c                           : memccpy.c.obj (.text:memccpy)
                  000029ac    0000001a     hello.obj (.text:retain)
                  000029c6    00000002     --HOLE-- [fill = 0]
                  000029c8    00000018     rtsv7M4_T_le_eabi.lib : args_main.c.obj (.text:_args_main)
                  000029e0    00000018                           : strcmp.c.obj (.text:strcmp)
                  000029f8    00000016                           : strchr.c.obj (.text:strchr)
                  00002a0e    00000014                           : strcpy.c.obj (.text:strcpy)
                  00002a22    00000014                           : strlen.c.obj (.text:strlen)
                  00002a36    00000012                           : wcslen.c.obj (.text:wcslen)
                  00002a48    0000000e                           : copy_decompress_none.c.obj (.text:decompress:none:__TI_decompress_none)
                  00002a56    0000000c                           : s_copysign.c.obj (.text:copysign)
                  00002a62    00000002     --HOLE-- [fill = 0]
                  00002a64    00000008                           : errno.c.obj (.text:__aeabi_errno_addr)
                  00002a6c    00000008                           : memory.c.obj (.text:malloc)
                  00002a74    00000004                           : printf.c.obj (.text:_outc)
                  00002a78    00000004                           : printf.c.obj (.text:_outs)
                  00002a7c    00000004                           : pre_init.c.obj (.text:_system_pre_init)
                  00002a80    00000004                           : exit.c.obj (.text:abort:abort)

.const     0    00002a84    00000101     
                  00002a84    00000101     rtsv7M4_T_le_eabi.lib : ctype.c.obj (.const:.string:_ctypes_)

.cinit     0    00003b88    00000090     
                  00003b88    0000006c     (.cinit..data.load) [load image, compression = lzss]
                  00003bf4    0000000c     (__TI_handler_table)
                  00003c00    00000008     (.cinit..bss.load) [load image, compression = zero_init]
                  00003c08    00000010     (__TI_cinit_table)

.stack     0    20000020    00008000     UNINITIALIZED
                  20000020    00000004     rtsv7M4_T_le_eabi.lib : boot_cortex_m.c.obj (.stack)
                  20000024    00007ffc     --HOLE--

.sysmem    0    20008020    00002000     UNINITIALIZED
                  20008020    00000010     rtsv7M4_T_le_eabi.lib : memory.c.obj (.sysmem)
                  20008030    00001ff0     --HOLE--

.data      0    2000a020    000001e8     UNINITIALIZED
                  2000a020    000000f0     rtsv7M4_T_le_eabi.lib : defs.c.obj (.data:_ftable)
                  2000a110    00000078                           : host_device.c.obj (.data:_device)
                  2000a188    00000050                           : host_device.c.obj (.data:_stream)
                  2000a1d8    00000010                           : defs.c.obj (.data)
                  2000a1e8    0000000c                           : exit.c.obj (.data:$O1$$)
                  2000a1f4    00000008                           : _lock.c.obj (.data:$O1$$)
                  2000a1fc    00000008                           : memory.c.obj (.data:$O1$$)
                  2000a204    00000004                           : errno.c.obj (.data)

.bss       0    2000a208    000001c8     UNINITIALIZED
                  2000a208    00000120     rtsv7M4_T_le_eabi.lib : trgmsg.c.obj (.bss:_CIOBUF_)
                  2000a328    000000a0     (.common:__TI_tmpnams)
                  2000a3c8    00000008     (.common:parmbuf)

__llvm_prf_cnts 
*          0    20000020    00000000     UNINITIALIZED

.binit     0    00000020    00000000     

.args      0    00002b88    00001000     
                  00002b88    00001000     --HOLE-- [fill = 0]

MODULE SUMMARY

       Module                       code    ro data   rw data
       ------                       ----    -------   -------
    .\
       hello.obj                    206     0         0      
    +--+----------------------------+-------+---------+---------+
       Total:                       206     0         0      
                                                             
    C:\ti\ccs1040\ccs\tools\compiler\ti-cgt-arm_20.2.5.LTS\lib\rtsv7M4_T_le_eabi.lib
       _printfi.c.obj               4835    0         0      
       memory.c.obj                 672     0         8      
       fd_add_t2.asm.obj            438     0         0      
       defs.c.obj                   0       0         416    
       trgmsg.c.obj                 108     0         288    
       fd_div_t2.asm.obj            310     0         0      
       fputs.c.obj                  276     0         0      
       fd_cmp_t2.asm.obj            268     0         0      
       ctype.c.obj                  0       257       0      
       fd_mul_t2.asm.obj            252     0         0      
       setvbuf.c.obj                220     0         0      
       s_scalbn.c.obj               208     0         0      
       host_device.c.obj            0       0         200    
       memcpy_t2.asm.obj            156     0         0      
       ull_div_t2.asm.obj           150     0         0      
       fputc.c.obj                  140     0         0      
       memset_t2.asm.obj            122     0         0      
       fclose.c.obj                 116     0         0      
       getdevice.c.obj              116     0         0      
       printf.c.obj                 112     0         0      
       hostrename.c.obj             108     0         0      
       copy_decompress_lzss.c.obj   104     0         0      
       hostlseek.c.obj              104     0         0      
       hostopen.c.obj               96      0         8      
       fseek.c.obj                  100     0         0      
       _io_perm.c.obj               98      0         0      
       close.c.obj                  92      0         0      
       s_frexp.c.obj                92      0         0      
       exit.c.obj                   76      0         12     
       hostread.c.obj               88      0         0      
       hostwrite.c.obj              88      0         0      
       _ltoa.c.obj                  84      0         0      
       atoi.c.obj                   76      0         0      
       fflush.c.obj                 76      0         0      
       fd_toi_t2.asm.obj            72      0         0      
       autoinit.c.obj               68      0         0      
       hostclose.c.obj              68      0         0      
       hostunlink.c.obj             68      0         0      
       strncpy.c.obj                54      0         0      
       fopen.c.obj                  52      0         0      
       i_tofd_t2.asm.obj            46      0         0      
       unlink.c.obj                 44      0         0      
       lseek.c.obj                  40      0         0      
       write.c.obj                  40      0         0      
       boot_cortex_m.c.obj          36      0         0      
       memchr.c.obj                 32      0         0      
       copy_zero_init.c.obj         28      0         0      
       memccpy.c.obj                28      0         0      
       args_main.c.obj              24      0         0      
       strcmp.c.obj                 24      0         0      
       strchr.c.obj                 22      0         0      
       strcpy.c.obj                 20      0         0      
       strlen.c.obj                 20      0         0      
       wcslen.c.obj                 18      0         0      
       copy_decompress_none.c.obj   14      0         0      
       errno.c.obj                  8       0         4      
       s_copysign.c.obj             12      0         0      
       _lock.c.obj                  2       0         8      
       pre_init.c.obj               4       0         0      
       div0.asm.obj                 2       0         0      
    +--+----------------------------+-------+---------+---------+
       Total:                       10627   257       944    
                                                             
       Heap:                        0       0         8192   
       Stack:                       0       0         32768  
       Linker Generated:            0       144       0      
    +--+----------------------------+-------+---------+---------+
       Grand Total:                 10833   401       41904  


LINKER GENERATED COPY TABLES

__TI_cinit_table @ 00003c08 records: 2, size/record: 8, table size: 16
	.data: load addr=00003b88, load size=0000006c bytes, run addr=2000a020, run size=000001e8 bytes, compression=lzss
	.bss: load addr=00003c00, load size=00000008 bytes, run addr=2000a208, run size=000001c8 bytes, compression=zero_init


LINKER GENERATED HANDLER TABLE

__TI_handler_table @ 00003bf4 records: 3, size/record: 4, table size: 12
	index: 0, handler: __TI_zero_init
	index: 1, handler: __TI_decompress_lzss
	index: 2, handler: __TI_decompress_none


GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name 

address   name                           
-------   ----                           
00002a81  C$$EXIT                        
00002767  C$$IO$$                        
000025e9  HOSTclose                      
00001ffd  HOSTlseek                      
000021fd  HOSTopen                       
00002315  HOSTread                       
00001f91  HOSTrename                     
0000262d  HOSTunlink                     
0000236d  HOSTwrite                      
2000a208  __CIOBUF_                      
20008020  __STACK_END                    
00008000  __STACK_SIZE                   
00002000  __SYSMEM_SIZE                  
00003c08  __TI_CINIT_Base                
00003c18  __TI_CINIT_Limit               
00003bf4  __TI_Handler_Table_Base        
00003c00  __TI_Handler_Table_Limit       
00002671  __TI_auto_init_nobinit_nopinit 
000027a9  __TI_cleanup                   
2000a1e8  __TI_cleanup_ptr               
00001e3d  __TI_closefile                 
00002065  __TI_decompress_lzss           
00002a49  __TI_decompress_none           
000024c1  __TI_doflush                   
2000a1ec  __TI_dtors_ptr                 
2000a1f0  __TI_enable_exit_profile_output
2000a1d8  __TI_ft_end                    
0000241b  __TI_ltoa                      
ffffffff  __TI_pprof_out_hndl            
00000021  __TI_printfi                   
ffffffff  __TI_prof_data_size            
ffffffff  __TI_prof_data_start           
000027dd  __TI_readmsg                   
00003b88  __TI_static_base__             
2000a328  __TI_tmpnams                   
00002739  __TI_writemsg                  
00002199  __TI_wrt_ok                    
00002959  __TI_zero_init_nomemset        
00001cb5  __aeabi_cdcmpeq                
00001cb5  __aeabi_cdcmple                
00001d3b  __aeabi_cdrcmple               
000025a1  __aeabi_d2iz                   
00000eaf  __aeabi_dadd                   
00001199  __aeabi_ddiv                   
00001605  __aeabi_dmul                   
00000ea5  __aeabi_dsub                   
00002a65  __aeabi_errno_addr             
00002841  __aeabi_i2d                    
0000105b  __aeabi_idiv0                  
0000105b  __aeabi_ldiv0                  
00001dc1  __aeabi_memclr                 
00001dc1  __aeabi_memclr4                
00001dc1  __aeabi_memclr8                
00001af7  __aeabi_memcpy                 
00001af7  __aeabi_memcpy4                
00001af7  __aeabi_memcpy8                
00001dc3  __aeabi_memset                 
00001dc3  __aeabi_memset4                
00001dc3  __aeabi_memset8                
2000a1e4  __aeabi_stderr                 
2000a1dc  __aeabi_stdin                  
2000a1e0  __aeabi_stdout                 
00001b93  __aeabi_uldivmod               
ffffffff  __binit__                      
00002b88  __c_args__                     
UNDEFED   __mpu_init                     
20000020  __stack                        
20000020  __start___llvm_prf_cnts        
20000020  __stop___llvm_prf_cnts         
000029c9  _args_main                     
00002915  _c_int00                       
00002a84  _ctypes_                       
2000a110  _device                        
2000a020  _ftable                        
2000a1f4  _lock                          
00000a6f  _nop                           
2000a188  _stream                        
20008020  _sys_memory                    
UNDEFED   _system_post_cinit             
00002a7d  _system_pre_init               
2000a1f8  _unlock                        
00002a81  abort                          
00001505  aligned_alloc                  
0000250d  atoi                           
ffffffff  binit                          
0000225d  close                          
00002a57  copysign                       
00002a57  copysignl                      
2000a204  errno                          
00002559  exit                           
00002811  finddevice                     
00001c29  fputc                          
000013f1  fputs                          
00001701  free                           
000022b9  frexp                          
000022b9  frexpl                         
00002135  fseek                          
000026b5  getdevice                      
000029ad  int_handler                    
000018c1  ldexp                          
000018c1  ldexpl                         
000028c5  lseek                          
00001991  main                           
00002a6d  malloc                         
00001505  memalign                       
00002991  memccpy                        
00002939  memchr                         
00001af7  memcpy                         
00001dc9  memset                         
2000a3c8  parmbuf                        
000020cd  printf                         
00001c29  putc                           
00002871  remove                         
000018c1  scalbn                         
000018c1  scalbnl                        
000017e5  setvbuf                        
000029f9  strchr                         
000029e1  strcmp                         
00002a0f  strcpy                         
00002a23  strlen                         
00002771  strncpy                        
00002871  unlink                         
00002a37  wcslen                         
000028ed  write                          


GLOBAL SYMBOLS: SORTED BY Symbol Address 

address   name                           
-------   ----                           
00000021  __TI_printfi                   
00000a6f  _nop                           
00000ea5  __aeabi_dsub                   
00000eaf  __aeabi_dadd                   
0000105b  __aeabi_idiv0                  
0000105b  __aeabi_ldiv0                  
00001199  __aeabi_ddiv                   
000013f1  fputs                          
00001505  aligned_alloc                  
00001505  memalign                       
00001605  __aeabi_dmul                   
00001701  free                           
000017e5  setvbuf                        
000018c1  ldexp                          
000018c1  ldexpl                         
000018c1  scalbn                         
000018c1  scalbnl                        
00001991  main                           
00001af7  __aeabi_memcpy                 
00001af7  __aeabi_memcpy4                
00001af7  __aeabi_memcpy8                
00001af7  memcpy                         
00001b93  __aeabi_uldivmod               
00001c29  fputc                          
00001c29  putc                           
00001cb5  __aeabi_cdcmpeq                
00001cb5  __aeabi_cdcmple                
00001d3b  __aeabi_cdrcmple               
00001dc1  __aeabi_memclr                 
00001dc1  __aeabi_memclr4                
00001dc1  __aeabi_memclr8                
00001dc3  __aeabi_memset                 
00001dc3  __aeabi_memset4                
00001dc3  __aeabi_memset8                
00001dc9  memset                         
00001e3d  __TI_closefile                 
00001f91  HOSTrename                     
00001ffd  HOSTlseek                      
00002000  __SYSMEM_SIZE                  
00002065  __TI_decompress_lzss           
000020cd  printf                         
00002135  fseek                          
00002199  __TI_wrt_ok                    
000021fd  HOSTopen                       
0000225d  close                          
000022b9  frexp                          
000022b9  frexpl                         
00002315  HOSTread                       
0000236d  HOSTwrite                      
0000241b  __TI_ltoa                      
000024c1  __TI_doflush                   
0000250d  atoi                           
00002559  exit                           
000025a1  __aeabi_d2iz                   
000025e9  HOSTclose                      
0000262d  HOSTunlink                     
00002671  __TI_auto_init_nobinit_nopinit 
000026b5  getdevice                      
00002739  __TI_writemsg                  
00002767  C$$IO$$                        
00002771  strncpy                        
000027a9  __TI_cleanup                   
000027dd  __TI_readmsg                   
00002811  finddevice                     
00002841  __aeabi_i2d                    
00002871  remove                         
00002871  unlink                         
000028c5  lseek                          
000028ed  write                          
00002915  _c_int00                       
00002939  memchr                         
00002959  __TI_zero_init_nomemset        
00002991  memccpy                        
000029ad  int_handler                    
000029c9  _args_main                     
000029e1  strcmp                         
000029f9  strchr                         
00002a0f  strcpy                         
00002a23  strlen                         
00002a37  wcslen                         
00002a49  __TI_decompress_none           
00002a57  copysign                       
00002a57  copysignl                      
00002a65  __aeabi_errno_addr             
00002a6d  malloc                         
00002a7d  _system_pre_init               
00002a81  C$$EXIT                        
00002a81  abort                          
00002a84  _ctypes_                       
00002b88  __c_args__                     
00003b88  __TI_static_base__             
00003bf4  __TI_Handler_Table_Base        
00003c00  __TI_Handler_Table_Limit       
00003c08  __TI_CINIT_Base                
00003c18  __TI_CINIT_Limit               
00008000  __STACK_SIZE                   
20000020  __stack                        
20000020  __start___llvm_prf_cnts        
20000020  __stop___llvm_prf_cnts         
20008020  __STACK_END                    
20008020  _sys_memory                    
2000a020  _ftable                        
2000a110  _device                        
2000a188  _stream                        
2000a1d8  __TI_ft_end                    
2000a1dc  __aeabi_stdin                  
2000a1e0  __aeabi_stdout                 
2000a1e4  __aeabi_stderr                 
2000a1e8  __TI_cleanup_ptr               
2000a1ec  __TI_dtors_ptr                 
2000a1f0  __TI_enable_exit_profile_output
2000a1f4  _lock                          
2000a1f8  _unlock                        
2000a204  errno                          
2000a208  __CIOBUF_                      
2000a328  __TI_tmpnams                   
2000a3c8  parmbuf                        
ffffffff  __TI_pprof_out_hndl            
ffffffff  __TI_prof_data_size            
ffffffff  __TI_prof_data_start           
ffffffff  __binit__                      
ffffffff  binit                          
UNDEFED   __mpu_init                     
UNDEFED   _system_post_cinit             

[124 symbols]

我无法看到".intvecs"段在*。map 文件中的位置。  我正在使用编译器目录中的默认链接器命令文件- lnk.cmd。  我可以在这里找到:

C:\ti\ccs1040\ccs\tools\compiler\ti-cgt-arm_20.2.5.LTS \lib

另外、不确定在哪里可以查找信息、以了解某些处理程序需要放置在矢量表中的哪个位置。  

因此、对于这种使用 CCS 及其工具的 TI 方案而言、这是一项非常新的工作。  希望通过创建一个简单的计时器中断例程(如微控制器类型的 C 应用)来更深入地了解这一点。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    因此、当我尝试调试 Cortex_M4_IPU1_C0 -甚至是 C1 -时、我会收到一个错误、并且我相信它来自使用上面列出的链接器脚本-即 lnk.cmd。  我在控制台中收到此错误:

    Cortex_M4_IPU1_C0: Can't Run Target CPU: (Error -1268 @ 0x1090001) Device is locked up in Hard Fault or in NMI. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.4.0.00129) 
    

    我进入 Project>Properties>>CCS General 并将'Linker command file:'字段留空,并且可以在连接到 C0时加载程序。  尽管如此、当我从编译中删除 lnk.cmd 文件时、我无法编译我尝试用于指定中断矢量表的汇编器文件...  

    因此、我需要找到一个合适的链接器文件、该文件允许我操作看起来似乎存在的.intvecs 段。  再说一次、这款 TI 器件的新特性、因此我可能不会以正确的方式进行设计。  如果能提供建议,将不胜感激。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    我建议您首先下载 Vision SDK。  https://www.ti.com/tool/PROCESSOR-SDK-TDAX

    安装后、您可以在 PDK 中找到计时器示例、请按照文件位置的用户指南操作、如下所示。

    ~/ti_componences/drivers/pdk_01_08_01_06/docs/userguide/html/pdk_tda_csl_User_Guide.html#Timer_example

    此致、
    斯坦利

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Stanley、

    我将尝试您的建议、让自己更熟悉此 TI 系统。  我将在获得一些结果后再报告。  感谢您的建议。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Stanley、

    我研究了这一点、并注意到 SDK 示例目录中的 M4的链接器命令文件。  我将该链接器带到了我的"dummy"项目、并在编译后成功链接它。  然后、我通过 CCS 调试接口将虚拟应用加载到 C0 M4内核中、并且能够进行分步调试。  因此、当我实际使用合法且有效的链接器脚本/命令文件时、前面文章中所述的错误会得到解决。  

    关于计时器中断内容、我认为您指向的示例非常有用。  如上所述、我有一个工作示例链接器命令文件和有关如何在此 SoC 上使用外设硬件的示例。  我相信我现在有个好地方可以开始讨论这个主题、因此我感谢您、并希望您能更熟悉这些 TI 解决方案。  再次感谢!  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Stanley、

    我下载了 Vision SDK、并按照 SDK 安装目录中包含的文档中的说明进行构建。  这是使用使用 GIT Bash 实用程序在 W10系统上的"Gmake"实现的-不适用于命令行或 PowerShell。  无论采用哪种方法、我都尝试在 CCS 中启动一个新项目(存储在我的工作区中)、在这里、我使用了'lnk_M4.cmd'文件以及您指向的计时器示例中的源代码。  我遇到的问题是链接失败。  我进入了工程的链接器设置、并为链接器的文件搜索路径包含了文件"ti.csl.aem4"、但仍然遇到 UART 错误。  

    **** Build of configuration Debug for project timer-test ****
    
    "C:\\ti\\ccs1040\\ccs\\utils\\bin\\gmake" -k -j 16 all -O 
     
    Building target: "timer-test.out"
    Invoking: Arm Linker
    "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=none -me --define=SOC_TDA3XX -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"timer-test.map" -i"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/lib" -i"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="timer-test_linkInfo.xml" --rom_model -o "timer-test.out" "./main.obj" "../lnk_m4.cmd"  -l"C:/PROCESSOR_SDK_VISION_03_08_00_00/ti_components/drivers/pdk_01_10_04_05/packages/ti/csl/lib/tda3xx/m4/release/ti.csl.aem4" -llibc.a 
    <Linking>
     
     undefined        first referenced
      symbol              in file     
     ---------        ----------------
     UARTConfigInit   ./main.obj      
     UARTConfigPutNum ./main.obj      
     UARTConfigPuts   ./main.obj      
     
    error #10234-D: unresolved symbols remain
     
    error #10010: errors encountered during linking; "timer-test.out" not built
    >> Compilation failure
    makefile:142: recipe for target 'timer-test.out' failed
    gmake[1]: *** [timer-test.out] Error 1
    gmake: *** [all] Error 2
    makefile:138: recipe for target 'all' failed
    
    **** Build Finished ****

    不确定我还需要做什么。  如何支持 CCS 工程以修改此计时器示例?  提前感谢!  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的、我解决了这个问题...  我在 SDK 安装目录中查看了 UART 示例、其中有一个库、其中包含在计时器测试应用中使用的 UART 函数。  我希望我的所有问题都能很快得到解决!