2013年9月3日星期二

Cross compiler arm-none-eabi-gcc compiler assembler file(startup_stm32f10x_hd.S) problems encountered

I use CodeSourcery cross compiler tool arm-none-eabi-gcc compile an assembly file (the official Stm32 startup files) startup_stm32f10x_hd.S, an error message indicating that it even compile the comments do not know, do not know how to go back , and I was in the makefile compiled. Error message is as follows, makefile relevant parts listed in the back, startup_stm32f10x_hd.S are listed later, asking you to help, thank you
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
compile information:
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 '
. . . (Word limit because there are posts, I deleted some of this information)
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 in relevant part:

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 part of the contents:

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; Stack Configuration
32; Stack Size (in Bytes) <0x0-0xFFFFFFFF: 8>
33;

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
------ Solution ----------------- ---------------------------
gcc_ride7 folder you want to use the startup_stm32f10x_xx.s, arm / iar folder is not enough
------ For reference only ------------------------------ ---------
how you copy all the code, the code is a semicolon, is not is not English, is the Chinese semicolon.
------ For reference only -------------------------------------- -
how copy your code, the code inside the semicolon is not is not English, is the Chinese semicolon.
------ For reference only ------------------------------------ ---
you this is not a GNU ARM assembler style bar, is not compiled with gcc
------ For reference only -------------- -------------------------
you put the assembly file name suffix from *. s changed to *. S try, I was so by the compiler.
------ For reference only -------------------------------------- -
same question, I tangled this problem for a long time, and this time it bent to make things right, and then not to write their own startup files, source code is not long anyway, haha. I read a lot of information, did not seem to use the official startup files.
------ For reference only -------------------------------------- -
STM32F10x High Density Devices vector table for MDK-ARM

you this is within the folder, right arm
------ For reference only ---------------------- -----------------
Hello everyone, I recently fiddle STM32, GPIOD> CRL & = 0XFFFFF0FF; GPIOD-> CRL | = 0X00000300; such say that this is a two PD2 some settings, but if I want to set PD3 it? How to write ah? That I do not understand these two 0XFFFFF0FF, 0X00000300 meaning. Hope you can help me solve this puzzle Thank you! ! ! Look forward to your reply.

没有评论:

发表评论