我用的是IAR5.30版本,库用的是2.0.3,调试器用的是ST-LINK,芯片型号:stm32f103c86
新建之后编译通过,但是通过ST-LINK调试时报错如下:
Wed Nov 07 15:42:38 2012: User error: Base address of vector table has incorrect alignment. Vector base addr = 0x08000518
编译后的map文件如下:
"P2": place in [from mem:0x8000000 to mem:0x800ffff] { ro };
"P3": place in [from mem:0x20000000 to mem:0x20004fff] {
rw, block CSTACK, block HEAP };
Section Kind Address Size Object
------- ---- ------- ---- ------
"P2": 0xb7c
.text ro code 0x08000000 0x22c stm32f10x_rcc.o [1]
.text ro code 0x0800022c 0x1a0 main.o [1]
.text ro code 0x080003cc 0x14c stm32f10x_dma.o [1]
INTVEC const 0x08000518 0x130 stm32f10x_vector.o [1]
.text ro code 0x08000648 0xda stm32f10x_it.o [1]
.text ro code 0x08000724 0xcc stm32f10x_gpio.o [1]
.text ro code 0x080007f0 0xc0 stm32f10x_nvic.o [1]
.text ro code 0x080008b0 0xbc stm32f10x_usart.o [1]
CODE ro code 0x0800096c 0x7a cortexm3_macro.o [1]
.text ro code 0x080009e8 0x34 stm32f10x_flash.o [1]
.text ro code 0x08000a1c 0x24 copy_init2.o [4]
.iar.init_table const 0x08000a40 0x24 - Linker created -
.text ro code 0x08000a64 0x1c data_init2.o [4]
.text ro code 0x08000a80 0x1a zero_init2.o [4]
.text ro code 0x08000a9c 0x18 cmain.o [4]
.text ro code 0x08000ab4 0x18 iarwstd.o [5]
.text ro code 0x08000acc 0x14 exit.o [5]
.text ro code 0x08000ae0 0xa cexit.o [4]
.text ro code 0x08000aea 0x6 exit.o [3]
.text ro code 0x08000af0 0x4 low_level_init.o [3]
Initializer bytes ro data 0x08000af4 0x88 <for P3 s0> (used: 0x85)
- 0x08000b7c 0xb7c
"P3", part 1 of 3: 0x400
CSTACK 0x20000000 0x400 <Block>
CSTACK uninit 0x20000000 0x400 <Block tail>
- 0x20000400 0x400
"P3", part 2 of 3: 0x48
.bss zero 0x20000400 0x40 main.o [1]
.bss zero 0x20000440 0x4 iarwstd.o [5]
.bss zero 0x20000444 0x1 main.o [1]
.bss zero 0x20000445 0x1 stm32f10x_it.o [1]
- 0x20000446 0x46
"P3", part 3 of 3: 0x88
P3 s0 0x20000448 0x88 <Init block>
.data inited 0x20000448 0x44 main.o [1]
.data inited 0x2000048c 0x40 main.o [1]
.data inited 0x200004cc 0x1 main.o [1]
- 0x200004d0 0x88
*******************************************************************************
*** INIT TABLE
***
Address Size
------- ----
Zero (__iar_zero_init2)
1 destination range, total size 0x46:
0x20000400 0x46
Copy (__iar_copy_init2)
1 source range, total size 0x88 (102% of destination):
0x8000af4 0x88
1 destination range, total size 0x85:
0x20000448 0x85
*******************************************************************************
*** MODULE SUMMARY
***
Module ro code ro data rw data
------ ------- ------- -------
E:\caoyang\物联网\终端程序\InternetofThings2012-11-6\Debug\Obj: [1]
cortexm3_macro.o 122
main.o 416 133 198
stm32f10x_dma.o 332
stm32f10x_flash.o 52
stm32f10x_gpio.o 204
stm32f10x_it.o 218 1
stm32f10x_nvic.o 192
stm32f10x_rcc.o 556
stm32f10x_usart.o 188
stm32f10x_vector.o 304
---------------------------------------------
Total: 2 280 437 199
command line: [2]
---------------------------------------------
Total:
dl7M_tl_in.a: [3]
exit.o 6
low_level_init.o 4
---------------------------------------------
Total: 10
rt7M_tl.a: [4]
cexit.o 10
cmain.o 24
copy_init2.o 36
data_init2.o 28
zero_init2.o 26
---------------------------------------------
Total: 124
shb_l.a: [5]
exit.o 20
iarwstd.o 24 4
---------------------------------------------
Total: 44 4
Gaps 6 3
Linker created 39 1 024
-------------------------------------------------
Grand Total: 2 464 476 1 230
*******************************************************************************
*** ENTRY LIST
***
Entry Address Size Type Object
----- ------- ---- ---- ------
ADC1_2_IRQHandler 0x0800067f 0x2 Code Gb stm32f10x_it.o [1]
ADC3_IRQHandler 0x08000709 0x2 Code Gb stm32f10x_it.o [1]
BusFaultException 0x0800064f 0x2 Code Gb stm32f10x_it.o [1]
CAN_RX1_IRQHandler 0x08000685 0x2 Code Gb stm32f10x_it.o [1]
CAN_SCE_IRQHandler 0x08000687 0x2 Code Gb stm32f10x_it.o [1]
CSTACK$$Base 0x20000000 -- Gb - Linker created -
CSTACK$$Limit 0x20000400 -- Gb - Linker created -
DMA1_Channel1_IRQHandler
0x08000671 0x2 Code Gb stm32f10x_it.o [1]
DMA1_Channel2_IRQHandler
0x08000673 0x2 Code Gb stm32f10x_it.o [1]
DMA1_Channel3_IRQHandler
0x08000675 0x2 Code Gb stm32f10x_it.o [1]
DMA1_Channel4_IRQHandler
0x08000677 0x2 Code Gb stm32f10x_it.o [1]
DMA1_Channel5_IRQHandler
0x08000679 0x2 Code Gb stm32f10x_it.o [1]
DMA1_Channel6_IRQHandler
0x0800067b 0x2 Code Gb stm32f10x_it.o [1]
DMA1_Channel7_IRQHandler
0x0800067d 0x2 Code Gb stm32f10x_it.o [1]
DMA2_Channel1_IRQHandler
0x0800071b 0x2 Code Gb stm32f10x_it.o [1]
DMA2_Channel2_IRQHandler
0x0800071d 0x2 Code Gb stm32f10x_it.o [1]
DMA2_Channel3_IRQHandler
0x0800071f 0x2 Code Gb stm32f10x_it.o [1]
DMA2_Channel4_5_IRQHandler
0x08000721 0x2 Code Gb stm32f10x_it.o [1]
DMA_Configuration 0x08000351 0x6c Code Gb main.o [1]
DMA_DeInit 0x080003cd 0x100 Code Gb stm32f10x_dma.o [1]
DMA_Init 0x080004cd 0x44 Code Gb stm32f10x_dma.o [1]
DebugMonitor 0x08000653 0x2 Code Gb stm32f10x_it.o [1]
EXTI0_IRQHandler 0x08000667 0x2 Code Gb stm32f10x_it.o [1]
EXTI15_10_IRQHandler 0x080006fb 0x2 Code Gb stm32f10x_it.o [1]
EXTI1_IRQHandler 0x08000669 0x2 Code Gb stm32f10x_it.o [1]
EXTI2_IRQHandler 0x0800066b 0x2 Code Gb stm32f10x_it.o [1]
EXTI3_IRQHandler 0x0800066d 0x2 Code Gb stm32f10x_it.o [1]
EXTI4_IRQHandler 0x0800066f 0x2 Code Gb stm32f10x_it.o [1]
EXTI9_5_IRQHandler 0x08000689 0x2 Code Gb stm32f10x_it.o [1]
FLASH_IRQHandler 0x08000663 0x2 Code Gb stm32f10x_it.o [1]
FLASH_PrefetchBufferCmd
0x08000a01 0x18 Code Gb stm32f10x_flash.o [1]
FLASH_SetLatency 0x080009e9 0x18 Code Gb stm32f10x_flash.o [1]
FSMC_IRQHandler 0x0800070b 0x2 Code Gb stm32f10x_it.o [1]
GPIO_Configuration 0x080002cd 0x58 Code Gb main.o [1]
GPIO_Init 0x08000725 0xcc Code Gb stm32f10x_gpio.o [1]
HSEStartUpStatus 0x20000444 0x1 Data Gb main.o [1]
HardFaultException 0x0800064b 0x2 Code Gb stm32f10x_it.o [1]
I2C1_ER_IRQHandler 0x0800069b 0x2 Code Gb stm32f10x_it.o [1]
I2C1_EV_IRQHandler 0x08000699 0x2 Code Gb stm32f10x_it.o [1]
I2C2_ER_IRQHandler 0x0800069f 0x2 Code Gb stm32f10x_it.o [1]
I2C2_EV_IRQHandler 0x0800069d 0x2 Code Gb stm32f10x_it.o [1]
MemManageException 0x0800064d 0x2 Code Gb stm32f10x_it.o [1]
NMIException 0x08000649 0x2 Code Gb stm32f10x_it.o [1]
NVIC_Configuration 0x08000325 0x2c Code Gb main.o [1]
NVIC_Init 0x080007f1 0xa0 Code Gb stm32f10x_nvic.o [1]
NVIC_SetVectorTable 0x08000899 0x10 Code Gb stm32f10x_nvic.o [1]
NbrOfDataToRead 0x200004cc 0x1 Data Gb main.o [1]
PVD_IRQHandler 0x0800065d 0x2 Code Gb stm32f10x_it.o [1]
PendSVC 0x08000657 0x2 Code Gb stm32f10x_it.o [1]
RCC_AHBPeriphClockCmd 0x0800016d 0x24 Code Gb stm32f10x_rcc.o [1]
RCC_APB1PeriphClockCmd 0x080001b5 0x24 Code Gb stm32f10x_rcc.o [1]
RCC_APB2PeriphClockCmd 0x08000191 0x24 Code Gb stm32f10x_rcc.o [1]
RCC_Configuration 0x08000241 0x8c Code Gb main.o [1]
RCC_DeInit 0x08000001 0x5c Code Gb stm32f10x_rcc.o [1]
RCC_GetFlagStatus 0x080001d9 0x44 Code Gb stm32f10x_rcc.o [1]
RCC_GetSYSCLKSource 0x08000121 0xa Code Gb stm32f10x_rcc.o [1]
RCC_HCLKConfig 0x0800012b 0x14 Code Gb stm32f10x_rcc.o [1]
RCC_HSEConfig 0x0800005d 0x54 Code Gb stm32f10x_rcc.o [1]
RCC_IRQHandler 0x08000665 0x2 Code Gb stm32f10x_it.o [1]
RCC_PCLK1Config 0x0800013f 0x14 Code Gb stm32f10x_rcc.o [1]
RCC_PCLK2Config 0x08000153 0x16 Code Gb stm32f10x_rcc.o [1]
RCC_PLLCmd 0x08000101 0xc Code Gb stm32f10x_rcc.o [1]
RCC_PLLConfig 0x080000e9 0x16 Code Gb stm32f10x_rcc.o [1]
RCC_SYSCLKConfig 0x0800010d 0x14 Code Gb stm32f10x_rcc.o [1]
RCC_WaitForHSEStartUp 0x080000b1 0x38 Code Gb stm32f10x_rcc.o [1]
RTCAlarm_IRQHandler 0x080006fd 0x2 Code Gb stm32f10x_it.o [1]
RTC_IRQHandler 0x08000661 0x2 Code Gb stm32f10x_it.o [1]
Region$$Table$$Base 0x08000a40 -- Gb - Linker created -
Region$$Table$$Limit 0x08000a64 -- Gb - Linker created -
RxBuffer2 0x20000400 0x40 Data Gb main.o [1]
RxCounter 0x20000445 0x1 Data Gb stm32f10x_it.o [1]
SDIO_IRQHandler 0x0800070d 0x2 Code Gb stm32f10x_it.o [1]
SPI1_IRQHandler 0x080006a1 0x2 Code Gb stm32f10x_it.o [1]
SPI2_IRQHandler 0x080006a3 0x2 Code Gb stm32f10x_it.o [1]
SPI3_IRQHandler 0x08000711 0x2 Code Gb stm32f10x_it.o [1]
SVCHandler 0x08000655 0x2 Code Gb stm32f10x_it.o [1]
SysTickHandler 0x08000659 0x2 Code Gb stm32f10x_it.o [1]
TAMPER_IRQHandler 0x0800065f 0x2 Code Gb stm32f10x_it.o [1]
TIM1_BRK_IRQHandler 0x0800068b 0x2 Code Gb stm32f10x_it.o [1]
TIM1_CC_IRQHandler 0x08000691 0x2 Code Gb stm32f10x_it.o [1]
TIM1_TRG_COM_IRQHandler
0x0800068f 0x2 Code Gb stm32f10x_it.o [1]
TIM1_UP_IRQHandler 0x0800068d 0x2 Code Gb stm32f10x_it.o [1]
TIM2_IRQHandler 0x08000693 0x2 Code Gb stm32f10x_it.o [1]
TIM3_IRQHandler 0x08000695 0x2 Code Gb stm32f10x_it.o [1]
TIM4_IRQHandler 0x08000697 0x2 Code Gb stm32f10x_it.o [1]
TIM5_IRQHandler 0x0800070f 0x2 Code Gb stm32f10x_it.o [1]
TIM6_IRQHandler 0x08000717 0x2 Code Gb stm32f10x_it.o [1]
TIM7_IRQHandler 0x08000719 0x2 Code Gb stm32f10x_it.o [1]
TIM8_BRK_IRQHandler 0x08000701 0x2 Code Gb stm32f10x_it.o [1]
TIM8_CC_IRQHandler 0x08000707 0x2 Code Gb stm32f10x_it.o [1]
TIM8_TRG_COM_IRQHandler
0x08000705 0x2 Code Gb stm32f10x_it.o [1]
TIM8_UP_IRQHandler 0x08000703 0x2 Code Gb stm32f10x_it.o [1]
TxBuffer1 0x2000048c 0x40 Data Gb main.o [1]
TxBuffer2 0x20000448 0x44 Data Gb main.o [1]
UART4_IRQHandler 0x08000713 0x2 Code Gb stm32f10x_it.o [1]
UART5_IRQHandler 0x08000715 0x2 Code Gb stm32f10x_it.o [1]
USART1_IRQHandler 0x080006a5 0x2 Code Gb stm32f10x_it.o [1]
USART2_IRQHandler 0x080006a9 0x50 Code Gb stm32f10x_it.o [1]
USART3_IRQHandler 0x080006f9 0x2 Code Gb stm32f10x_it.o [1]
USART_GetITStatus 0x08000909 0x64 Code Gb stm32f10x_usart.o [1]
USART_ITConfig 0x080008b1 0x50 Code Gb stm32f10x_usart.o [1]
USART_ReceiveData 0x08000901 0x8 Code Gb stm32f10x_usart.o [1]
USBWakeUp_IRQHandler 0x080006ff 0x2 Code Gb stm32f10x_it.o [1]
USB_HP_CAN_TX_IRQHandler
0x08000681 0x2 Code Gb stm32f10x_it.o [1]
USB_LP_CAN_RX0_IRQHandler
0x08000683 0x2 Code Gb stm32f10x_it.o [1]
UsageFaultException 0x08000651 0x2 Code Gb stm32f10x_it.o [1]
WWDG_IRQHandler 0x0800065b 0x2 Code Gb stm32f10x_it.o [1]
__BASEPRICONFIG 0x080009d3 Code Gb cortexm3_macro.o [1]
__DMB 0x08000985 Code Gb cortexm3_macro.o [1]
__DSB 0x0800097f Code Gb cortexm3_macro.o [1]
__GetBASEPRI 0x080009d9 Code Gb cortexm3_macro.o [1]
__ISB 0x08000979 Code Gb cortexm3_macro.o [1]
__MRS_CONTROL 0x0800098f Code Gb cortexm3_macro.o [1]
__MRS_MSP 0x080009ab Code Gb cortexm3_macro.o [1]
__MRS_PSP 0x0800099f Code Gb cortexm3_macro.o [1]
__MSR_CONTROL 0x08000995 Code Gb cortexm3_macro.o [1]
__MSR_MSP 0x080009b1 Code Gb cortexm3_macro.o [1]
__MSR_PSP 0x080009a5 Code Gb cortexm3_macro.o [1]
__READ_FAULTMASK 0x080009cd Code Gb cortexm3_macro.o [1]
__READ_PRIMASK 0x080009bf Code Gb cortexm3_macro.o [1]
__RESETFAULTMASK 0x080009c5 Code Gb cortexm3_macro.o [1]
__RESETPRIMASK 0x080009b7 Code Gb cortexm3_macro.o [1]
__REV_HalfWord 0x080009df Code Gb cortexm3_macro.o [1]
__REV_Word 0x080009e3 Code Gb cortexm3_macro.o [1]
__SETFAULTMASK 0x080009c9 Code Gb cortexm3_macro.o [1]
__SETPRIMASK 0x080009bb Code Gb cortexm3_macro.o [1]
__SEV 0x08000975 Code Gb cortexm3_macro.o [1]
__SVC 0x0800098b Code Gb cortexm3_macro.o [1]
__WFE 0x08000971 Code Gb cortexm3_macro.o [1]
__WFI 0x0800096d Code Gb cortexm3_macro.o [1]
__exit 0x08000acd 0x14 Code Gb exit.o [5]
__iar_copy_init2 0x08000a1d 0x24 Code Gb copy_init2.o [4]
__iar_data_init2 0x08000a65 0x1c Code Gb data_init2.o [4]
__iar_program_start 0x08000a9d Code Gb cmain.o [4]
__iar_sh_stdout_close 0x08000ab5 0x14 Code Gb iarwstd.o [5]
__iar_sh_stdout_handle 0x20000440 0x4 Data Lc iarwstd.o [5]
__iar_zero_init2 0x08000a81 0x1a Code Gb zero_init2.o [4]
__low_level_init 0x08000af1 0x4 Code Gb low_level_init.o [3]
__vector_table 0x08000518 0x130 Data Gb stm32f10x_vector.o [1]
_exit 0x08000ae1 Code Gb cexit.o [4]
_main 0x08000aaf Code Gb cmain.o [4]
exit 0x08000aeb 0x6 Code Gb exit.o [3]
main 0x0800022d 0x14 Code Gb main.o [1]
[1] = E:\caoyang\物联网\终端程序\InternetofThings2012-11-6\Debug\Obj
[2] = command line
[3] = dl7M_tl_in.a
[4] = rt7M_tl.a
[5] = shb_l.a
2 464 bytes of readonly code memory
476 bytes of readonly data memory
1 230 bytes of readwrite data memory
Errors: none
Warnings: none
请高手指定一二,这到底是怎么回事,主函数里基本是空的,刚建好还没来的及添内容,求救啊!!!小弟先谢过了!!! |