探索者的例程搬到STM32F756,将启动文件替换(startup_stm32f756xx.s)编译不成功!原子兄麻烦帮我看看!

2019-07-20 07:26发布

编译错误如下:

..COREstartup_stm32f756xx.s(56): error: A1163E: Unknown opcode MODULE , expecting opcode or Macro
..COREstartup_stm32f756xx.s(59): error: A1163E: Unknown opcode SECTION , expecting opcode or Macro
..COREstartup_stm32f756xx.s(61): error: A1163E: Unknown opcode SECTION , expecting opcode or Macro
..COREstartup_stm32f756xx.s(65): error: A1163E: Unknown opcode PUBLIC , expecting opcode or Macro
..COREstartup_stm32f756xx.s(67): error: A1159E: Label missing from line start
..COREstartup_stm32f756xx.s(68): error: A1355U: A Label was found which was in no AREA


..HALLIBSTM32F7xx_HAL_DriverSrcstm32f7xx_hal_usart.c(1968): error:  #20: identifier "USART_ISR_REACK" is undefined
      if(USART_WaitOnFlagUntilTimeout(husart, USART_ISR_REACK, RESET, tickstart, TEACK_REACK_TIMEOUT) != HAL_OK)  
..HALLIBSTM32F7xx_HAL_DriverSrcstm32f7xx_hal_usart.c: 0 warnings, 1 error
compiling stm32f7xx_hal_pwr_ex.c...
compiling stm32f7xx_hal_uart.c...
..HALLIBSTM32F7xx_HAL_DriverSrcstm32f7xx_hal_uart.c(2044): error:  #20: identifier "USART_ISR_REACK" is undefined
      if(UART_WaitOnFlagUntilTimeout(huart, USART_ISR_REACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK)
..HALLIBSTM32F7xx_HAL_DriverSrcstm32f7xx_hal_uart.c: 0 warnings, 1 error


..HALLIBSTM32F7xx_HAL_DriverSrcstm32f7xx_hal_tim_ex.c(1911): error:  #20: identifier "TIM_SMCR_OCCS" is undefined
        tmpsmcr &= ~TIM_SMCR_OCCS;
..HALLIBSTM32F7xx_HAL_DriverSrcstm32f7xx_hal_tim_ex.c(1924): error:  #20: identifier "TIM_SMCR_OCCS" is undefined
        htim->Instance->SMCR &= ~TIM_SMCR_OCCS;
..HALLIBSTM32F7xx_HAL_DriverSrcstm32f7xx_hal_tim_ex.c(1941): error:  #20: identifier "TIM_SMCR_OCCS" is undefined
        htim->Instance->SMCR |= TIM_SMCR_OCCS;
..HALLIBSTM32F7xx_HAL_DriverSrcstm32f7xx_hal_tim_ex.c: 0 warnings, 3 errors


我对比了一下,探索者的启动文件和我在官方下载的启动文件不一样!烦请原子兄指导一下!

这是官方下载的启动文件如下:
        MODULE  ?cstartup

        ;; Forward declaration of sections.
        SECTION CSTACKATA:NOROOT(3)

        SECTION .intvec:CODE:NOROOT(2)

        EXTERN  __iar_program_start
        EXTERN  SystemInit
        PUBLIC  __vector_table

        DATA
__vector_table
        DCD     sfe(CSTACK)
        DCD     Reset_Handler             ; Reset Handler


这是探索者的启动文件如下:
Stack_Size      EQU     0x00000800

                AREA    STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem       SPACE   Stack_Size
__initial_sp


; <h> Heap Configuration
;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>

Heap_Size       EQU     0x00000200

                AREA    HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem        SPACE   Heap_Size
__heap_limit

                PRESERVE8
                THUMB


; Vector Table Mapped to Address 0 at Reset
                AREA    RESET, DATA, READONLY
                EXPORT  __Vectors
                EXPORT  __Vectors_End
                EXPORT  __Vectors_Size

__Vectors       DCD     __initial_sp               ; Top of Stack
                DCD     Reset_Handler              ; Reset Handler


请问有什么区别?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
2条回答
taizonglai
1楼-- · 2019-07-20 08:07
 精彩回答 2  元偷偷看……
chaifuwu
2楼-- · 2019-07-20 08:48
遇到同样的问题,以太网调不通