- 论坛徽章:
- 0
|
本帖最后由 cheng_bingyuan 于 2013-05-31 18:36 编辑
我用的是CodeSourcery的交叉编译工具arm-none-eabi-gcc编译一个汇编文件(官方的Stm32的启动文件)startup_stm32f10x_hd.S,错误信息表明它连汇编中的注释都不认识,不知道是怎么回事,我是在makefile中编译的.错误信息如下,makefile的相关部分在后面列出,startup_stm32f10x_hd.S也在后面列出,请求各位帮助,谢谢
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
编译信息:
make[1]: Entering directory `/home/abing/Yunio/GROUND/GProj/stm32lib/CMSIS/DeviceSupport'
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m3 -mthumb-interwork -I. -x assembler-with-cpp -Wa,-adhlns=startup_stm32f10x_hd.lst,-ggdb startup_stm32f10x_hd.S -o startup_stm32f10x_hd.o
startup_stm32f10x_hd.S: Assembler messages:
startup_stm32f10x_hd.S:1: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:2: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:3: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:4: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:5: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:6: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:7: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:8: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:9: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:10: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:11: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:12: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:13: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:14: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:15: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:16: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:17: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:18: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:19: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:20: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:21: Error: bad instruction `the PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS'
startup_stm32f10x_hd.S:22: Error: bad instruction `with CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.'
startup_stm32f10x_hd.S:23: Error: bad instruction `as A RESULT,STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,'
startup_stm32f10x_hd.S:24: Error: bad instruction `indirect OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE'
startup_stm32f10x_hd.S:25: Error: bad instruction `content OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING'
startup_stm32f10x_hd.S:26: Error: bad instruction `information CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.'
startup_stm32f10x_hd.S:27: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:29: Error: bad instruction `amount of memory(in bytes)allocated for Stack'
startup_stm32f10x_hd.S:30: Error: bad instruction `tailor this value to your application needs'
startup_stm32f10x_hd.S:31: Error: junk at end of line, first unrecognized character is `<'
startup_stm32f10x_hd.S:32: Error: junk at end of line, first unrecognized character is `<'
startup_stm32f10x_hd.S:33: Error: junk at end of line, first unrecognized character is `<'
startup_stm32f10x_hd.S:35: Error: bad instruction `stack_size EQU 0x00001000'
startup_stm32f10x_hd.S:37: Error: bad instruction `area STACK,NOINIT,READWRITE,ALIGN=3'
startup_stm32f10x_hd.S:38: Error: bad instruction `stack_mem SPACE Stack_Size'
startup_stm32f10x_hd.S:39: Error: bad instruction `__initial_sp'
startup_stm32f10x_hd.S:41: Error: bad instruction `__initial_sp EQU 0x20000000+Stack_Size'
startup_stm32f10x_hd.S:41: Error: bad instruction `stack used for SystemInit&SystemInit_ExtMemCtl'
startup_stm32f10x_hd.S:43: Error: junk at end of line, first unrecognized character is `<'
startup_stm32f10x_hd.S:44: Error: junk at end of line, first unrecognized character is `<'
startup_stm32f10x_hd.S:45: Error: junk at end of line, first unrecognized character is `<'
startup_stm32f10x_hd.S:47: Error: bad instruction `heap_size EQU 0x00000200'
startup_stm32f10x_hd.S:49: Error: bad instruction `area HEAP,NOINIT,READWRITE,ALIGN=3'
startup_stm32f10x_hd.S:50: Error: bad instruction `__heap_base'
startup_stm32f10x_hd.S:51: Error: bad instruction `heap_mem SPACE Heap_Size'
startup_stm32f10x_hd.S:52: Error: bad instruction `__heap_limit'
startup_stm32f10x_hd.S:54: Error: bad instruction `preserve8'
startup_stm32f10x_hd.S:55: Error: bad instruction `thumb'
startup_stm32f10x_hd.S:57: Error: bad instruction `import OS_CPU_SysTickHandler'
startup_stm32f10x_hd.S:58: Error: bad instruction `import OS_CPU_PendSVHandler'
startup_stm32f10x_hd.S:60: Error: bad instruction `vector Table Mapped to Address 0 at Reset'
startup_stm32f10x_hd.S:61: Error: bad instruction `area RESET,DATA,READONLY'
startup_stm32f10x_hd.S:62: Error: bad instruction `export __Vectors'
startup_stm32f10x_hd.S:63: Error: bad instruction `export __Vectors_End'
startup_stm32f10x_hd.S:64: Error: bad instruction `export __Vectors_Size'
startup_stm32f10x_hd.S:66: Error: bad instruction `__vectors DCD __initial_sp'
startup_stm32f10x_hd.S:66: Error: bad instruction `use internal RAM for stack for calling SystemInit'
startup_stm32f10x_hd.S:67: Error: bad instruction `dcd Reset_Handler'
startup_stm32f10x_hd.S:67: Error: bad instruction `reset Handler'
startup_stm32f10x_hd.S:68: Error: bad instruction `dcd NMI_Handler'
startup_stm32f10x_hd.S:68: Error: bad instruction `nmi Handler'
startup_stm32f10x_hd.S:69: Error: bad instruction `dcd HardFault_Handler'
startup_stm32f10x_hd.S:69: Error: bad instruction `hard Fault Handler'
startup_stm32f10x_hd.S:70: Error: bad instruction `dcd MemManage_Handler'
startup_stm32f10x_hd.S:70: Error: bad instruction `mpu Fault Handler'
startup_stm32f10x_hd.S:71: Error: bad instruction `dcd BusFault_Handler'
startup_stm32f10x_hd.S:71: Error: bad instruction `bus Fault Handler'
startup_stm32f10x_hd.S:72: Error: bad instruction `dcd UsageFault_Handler'
startup_stm32f10x_hd.S:72: Error: bad instruction `usage Fault Handler'
startup_stm32f10x_hd.S:73: Error: bad instruction `dcd 0'
startup_stm32f10x_hd.S:73: Error: bad instruction `reserved'
startup_stm32f10x_hd.S:74: Error: bad instruction `dcd 0'
startup_stm32f10x_hd.S:74: Error: bad instruction `reserved'
startup_stm32f10x_hd.S:75: Error: bad instruction `dcd 0'
startup_stm32f10x_hd.S:75: Error: bad instruction `reserved'
startup_stm32f10x_hd.S:76: Error: bad instruction `dcd 0'
startup_stm32f10x_hd.S:76: Error: bad instruction `reserved'
startup_stm32f10x_hd.S:77: Error: bad instruction `dcd SVC_Handler'
startup_stm32f10x_hd.S:77: Error: bad instruction `svcall Handler'
startup_stm32f10x_hd.S:78: Error: bad instruction `dcd DebugMon_Handler'
startup_stm32f10x_hd.S:78: Error: bad instruction `debug Monitor Handler'
startup_stm32f10x_hd.S:79: Error: bad instruction `dcd 0'
startup_stm32f10x_hd.S:79: Error: bad instruction `reserved'
startup_stm32f10x_hd.S:80: Error: bad instruction `dcd OS_CPU_PendSVHandler'
startup_stm32f10x_hd.S:81: Error: bad instruction `dcd OS_CPU_SysTickHandler'
startup_stm32f10x_hd.S:83: Error: bad instruction `external Interrupts'
startup_stm32f10x_hd.S:84: Error: bad instruction `dcd WWDG_IRQHandler'
startup_stm32f10x_hd.S:84: Error: bad instruction `window Watchdog'
startup_stm32f10x_hd.S:85: Error: bad instruction `dcd PVD_IRQHandler'
startup_stm32f10x_hd.S:85: Error: bad instruction `pvd through EXTI Line detect'
startup_stm32f10x_hd.S:86: Error: bad instruction `dcd TAMPER_IRQHandler'
startup_stm32f10x_hd.S:86: Error: bad instruction `tamper'
startup_stm32f10x_hd.S:87: Error: bad instruction `dcd RTC_IRQHandler'
startup_stm32f10x_hd.S:87: Error: bad instruction `rtc'
startup_stm32f10x_hd.S:88: Error: bad instruction `dcd FLASH_IRQHandler'
startup_stm32f10x_hd.S:88: Error: bad instruction `flash'
startup_stm32f10x_hd.S:89: Error: bad instruction `dcd RCC_IRQHandler'
startup_stm32f10x_hd.S:89: Error: bad instruction `rcc'
startup_stm32f10x_hd.S:90: Error: bad instruction `dcd EXTI0_IRQHandler'
startup_stm32f10x_hd.S:90: Error: bad instruction `exti Line 0'
startup_stm32f10x_hd.S:91: Error: bad instruction `dcd EXTI1_IRQHandler'
startup_stm32f10x_hd.S:91: Error: bad instruction `exti Line 1'
startup_stm32f10x_hd.S:92: Error: bad instruction `dcd EXTI2_IRQHandler'
startup_stm32f10x_hd.S:92: Error: bad instruction `exti Line 2'
startup_stm32f10x_hd.S:93: Error: bad instruction `dcd EXTI3_IRQHandler'
startup_stm32f10x_hd.S:93: Error: bad instruction `exti Line 3'
startup_stm32f10x_hd.S:94: Error: bad instruction `dcd EXTI4_IRQHandler'
startup_stm32f10x_hd.S:94: Error: bad instruction `exti Line 4'
startup_stm32f10x_hd.S:95: Error: bad instruction `dcd DMA1_Channel1_IRQHandler'
startup_stm32f10x_hd.S:95: Error: bad instruction `dma1 Channel 1'
startup_stm32f10x_hd.S:96: Error: bad instruction `dcd DMA1_Channel2_IRQHandler'
startup_stm32f10x_hd.S:96: Error: bad instruction `dma1 Channel 2'
startup_stm32f10x_hd.S:97: Error: bad instruction `dcd DMA1_Channel3_IRQHandler'
startup_stm32f10x_hd.S:97: Error: bad instruction `dma1 Channel 3'
startup_stm32f10x_hd.S:98: Error: bad instruction `dcd DMA1_Channel4_IRQHandler'
startup_stm32f10x_hd.S:98: Error: bad instruction `dma1 Channel 4'
startup_stm32f10x_hd.S:99: Error: bad instruction `dcd DMA1_Channel5_IRQHandler'
startup_stm32f10x_hd.S:99: Error: bad instruction `dma1 Channel 5'
startup_stm32f10x_hd.S:100: Error: bad instruction `dcd DMA1_Channel6_IRQHandler'
startup_stm32f10x_hd.S:100: Error: bad instruction `dma1 Channel 6'
startup_stm32f10x_hd.S:101: Error: bad instruction `dcd DMA1_Channel7_IRQHandler'
startup_stm32f10x_hd.S:101: Error: bad instruction `dma1 Channel 7'
startup_stm32f10x_hd.S:102: Error: bad instruction `dcd ADC1_2_IRQHandler'
startup_stm32f10x_hd.S:102: Error: bad instruction `adc1 &ADC2'
startup_stm32f10x_hd.S:103: Error: bad instruction `dcd USB_HP_CAN1_TX_IRQHandler'
startup_stm32f10x_hd.S:103: Error: bad instruction `usb High Priority or CAN1 TX'
startup_stm32f10x_hd.S:104: Error: bad instruction `dcd USB_LP_CAN1_RX0_IRQHandler'
startup_stm32f10x_hd.S:104: Error: bad instruction `usb Low Priority or CAN1 RX0'
startup_stm32f10x_hd.S:105: Error: bad instruction `dcd CAN1_RX1_IRQHandler'
startup_stm32f10x_hd.S:105: Error: bad instruction `can1 RX1'
startup_stm32f10x_hd.S:106: Error: bad instruction `dcd CAN1_SCE_IRQHandler'
startup_stm32f10x_hd.S:106: Error: bad instruction `can1 SCE'
startup_stm32f10x_hd.S:107: Error: bad instruction `dcd EXTI9_5_IRQHandler'
startup_stm32f10x_hd.S:107: Error: bad instruction `exti Line 9..5'
startup_stm32f10x_hd.S:108: Error: bad instruction `dcd TIM1_BRK_IRQHandler'
startup_stm32f10x_hd.S:108: Error: bad instruction `tim1 Break'
startup_stm32f10x_hd.S:109: Error: bad instruction `dcd TIM1_UP_IRQHandler'
startup_stm32f10x_hd.S:109: Error: bad instruction `tim1 Update'
startup_stm32f10x_hd.S:110: Error: bad instruction `dcd TIM1_TRG_COM_IRQHandler'
startup_stm32f10x_hd.S:110: Error: bad instruction `tim1 Trigger and Commutation'
startup_stm32f10x_hd.S:111: Error: bad instruction `dcd TIM1_CC_IRQHandler'
startup_stm32f10x_hd.S:111: Error: bad instruction `tim1 Capture Compare'
startup_stm32f10x_hd.S:112: Error: bad instruction `dcd TIM2_IRQHandler'
startup_stm32f10x_hd.S:112: Error: bad instruction `tim2'
startup_stm32f10x_hd.S:113: Error: bad instruction `dcd TIM3_IRQHandler'
startup_stm32f10x_hd.S:113: Error: bad instruction `tim3'
startup_stm32f10x_hd.S:114: Error: bad instruction `dcd TIM4_IRQHandler'
startup_stm32f10x_hd.S:114: Error: bad instruction `tim4'
startup_stm32f10x_hd.S:115: Error: bad instruction `dcd I2C1_EV_IRQHandler'
startup_stm32f10x_hd.S:115: Error: bad instruction `i2c1 Event'
startup_stm32f10x_hd.S:116: Error: bad instruction `dcd I2C1_ER_IRQHandler'
startup_stm32f10x_hd.S:116: Error: bad instruction `i2c1 Error'
startup_stm32f10x_hd.S:117: Error: bad instruction `dcd I2C2_EV_IRQHandler'
startup_stm32f10x_hd.S:117: Error: bad instruction `i2c2 Event'
startup_stm32f10x_hd.S:118: Error: bad instruction `dcd I2C2_ER_IRQHandler'
startup_stm32f10x_hd.S:118: Error: bad instruction `i2c2 Error'
startup_stm32f10x_hd.S:119: Error: bad instruction `dcd SPI1_IRQHandler'
startup_stm32f10x_hd.S:119: Error: bad instruction `spi1'
startup_stm32f10x_hd.S:120: Error: bad instruction `dcd SPI2_IRQHandler'
...(因发贴有字数限制,我删除了一部分信息)
startup_stm32f10x_hd.S:315: Error: bad instruction `tim8_trg_com_irqhandler'
startup_stm32f10x_hd.S:316: Error: bad instruction `tim8_cc_irqhandler'
startup_stm32f10x_hd.S:317: Error: bad instruction `adc3_irqhandler'
startup_stm32f10x_hd.S:318: Error: bad instruction `fsmc_irqhandler'
startup_stm32f10x_hd.S:319: Error: bad instruction `sdio_irqhandler'
startup_stm32f10x_hd.S:320: Error: bad instruction `tim5_irqhandler'
startup_stm32f10x_hd.S:321: Error: bad instruction `spi3_irqhandler'
startup_stm32f10x_hd.S:322: Error: bad instruction `uart4_irqhandler'
startup_stm32f10x_hd.S:323: Error: bad instruction `uart5_irqhandler'
startup_stm32f10x_hd.S:324: Error: bad instruction `tim6_irqhandler'
startup_stm32f10x_hd.S:325: Error: bad instruction `tim7_irqhandler'
startup_stm32f10x_hd.S:326: Error: bad instruction `dma2_channel1_irqhandler'
startup_stm32f10x_hd.S:327: Error: bad instruction `dma2_channel2_irqhandler'
startup_stm32f10x_hd.S:328: Error: bad instruction `dma2_channel3_irqhandler'
startup_stm32f10x_hd.S:329: Error: bad instruction `dma2_channel4_5_irqhandler'
startup_stm32f10x_hd.S:332: Error: bad instruction `endp'
startup_stm32f10x_hd.S:334: Error: bad instruction `align'
startup_stm32f10x_hd.S:336: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:337: Error: bad instruction `user Stack and Heap initialization'
startup_stm32f10x_hd.S:338: Error: junk at end of line, first unrecognized character is `*'
startup_stm32f10x_hd.S:339: Error: bad instruction `__microlib'
startup_stm32f10x_hd.S:341: Error: bad instruction `export __initial_sp'
startup_stm32f10x_hd.S:342: Error: bad instruction `export __heap_base'
startup_stm32f10x_hd.S:343: Error: bad instruction `export __heap_limit'
startup_stm32f10x_hd.S:345: Error: bad instruction `else'
startup_stm32f10x_hd.S:347: Error: bad instruction `import __use_two_region_memory'
startup_stm32f10x_hd.S:348: Error: bad instruction `export __user_initial_stackheap'
startup_stm32f10x_hd.S:350: Error: bad instruction `__user_initial_stackheap'
startup_stm32f10x_hd.S:353: Error: constant expression expected -- `ldr R1,=(Stack_Mem+Stack_Size)'
startup_stm32f10x_hd.S:354: Error: constant expression expected -- `ldr R2,=(Heap_Mem+Heap_Size)'
startup_stm32f10x_hd.S:358: Error: bad instruction `align'
startup_stm32f10x_hd.S:360: Error: bad instruction `endif'
startup_stm32f10x_hd.S:362: Error: bad instruction `end'
startup_stm32f10x_hd.S:364: Error: junk at end of line, first unrecognized character is `*'
make[1]: *** [startup_stm32f10x_hd.o] Error 1
make[1]: Leaving directory `/home/abing/Yunio/GROUND/GProj/stm32lib/CMSIS/DeviceSupport'
make: *** [stm32lib/CMSIS/DeviceSupport] Error 2
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
makefile中相关部分:
CROSS_COMPILE = arm-none-eabi-
CC = $(CROSS_COMPILE)gcc
DEBUG= gdb
# Assembler flags
ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
ALL_ASFLAGS = -mcpu=cortex-m3 -mthumb-interwork -I. -x assembler-with-cpp $(ASFLAGS)
$(obj)%.o: %.S
$(CC) -c -mthumb $(ALL_ASFLAGS) $< -o $@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
startup_stm32f10x_hd.S中的一部分内容:
1;******************** (C) COPYRIGHT 2010 STMicroelectronics ********************
2;* File Name : startup_stm32f10x_hd.s
3;* Author : MCD Application Team
4;* Version : V3.4.0
5;* Date : 10/15/2010
6;* Description : STM32F10x High Density Devices vector table for MDK-ARM
7;* toolchain.
8;* This module performs:
9;* - Set the initial SP
10;* - Set the initial PC == Reset_Handler
11;* - Set the vector table entries with the exceptions ISR address
12;* - Configure the clock system and also configure the external
13;* SRAM mounted on STM3210E-EVAL board to be used as data
14;* memory (optional, to be enabled by user)
15;* - Branches to __main in the C library (which eventually
16;* calls main()).
17;* After Reset the CortexM3 processor is in Thread mode,
18;* priority is Privileged, and the Stack is set to Main.
19;* <<< Use Configuration Wizard in Context Menu >>>
20;*******************************************************************************
21; THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
22; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
23; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
24; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
25; CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
26; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
27;*******************************************************************************
28
29; Amount of memory (in bytes) allocated for Stack
30; Tailor this value to your application needs
31; <h> Stack Configuration
32; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
33; </h>
34
35Stack_Size EQU 0x00001000
36
37 AREA STACK, NOINIT, READWRITE, ALIGN=3
38Stack_Mem SPACE Stack_Size
39;__initial_sp
40
41__initial_sp EQU 0x20000000 +Stack_Size ; stack used for SystemInit & SystemInit_ExtMemCtl
|
|