1. 程式人生 > >error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.

error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.

編譯環境:RVMDK

CPU :STM32F103VC

錯誤:.\obj\movSERVO.sct(7): error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.

原因:專案中同時包含以下啟動檔案,

   startup_stm32f10x_hd.s

        startup_stm32f10x_md.s

        startup_stm32f10x_ld.s

     ......

        應該針對不同的CPU選擇不同的啟動檔案。

解決辦法1:從專案中刪除不相關的啟動檔案

解決辦法2:右擊不相關的啟動檔案,點選 options for file 'startup_stm32f10x_md.s'...

                在彈出的對話方塊中的properties頁,勾去灰化的'Include in Target Build'和‘Always Build’兩項。