1) ..\OBJ\(文件名).sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.
解决:
错误定位到文件 (文件名).sct:
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00080000 { ; load region size_region
ER_IROM1 0x08000000 0x00080000 { ; load address = execution address
*.o (RESET, +First) ;====================>错误定位
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20000000 0x0000C000 { ; RW data
.ANY (+RW +ZI)
}
}
分析:
(文件名).sct:文件对程序存储在rom的位置做了指定.在开发环境Keil uVision3中,可以在这里选择位置:
解决:
没有添加startup_stm32f10x_md.s 文件,或者该文件选择错误
在keil中 添加文件时,默认的是*.C文件 ,这样.s的文件就添加不上,所以会报错。 应该将文件类型选为*.* 就能全部添加了
startup_stm32f10x_md.s文件的作用:
* Description : STM32F10x High Density Devices vector table for MDK-ARM
;* toolchain.
;* This module performs:
;* - Set the initial SP
;* - Set the initial PC == Reset_Handler
;* - Set the vector table entries with the exceptions ISR address
;* - Configure the clock system and also configure the external
;* SRAM mounted on STM3210E-EVAL board to be used as data
;* memory (optional, to be enabled by user)
;* - Branches to __main in the C library (which eventually
;* calls main()).
;* After Reset the CortexM3 processor is in Thread mode,
;* priority is Privileged, and the Stack is set to Main.