MDK编译时出现.\Objects\TIM_TEST.sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.的错误,就说明工程中缺少系统的启动文件。
说明:
STM32L1XX_MD ————> Ultra Low Power Medium-density devices: STM32L151x6xx, STM32L151x8xx, STM32L151xBxx,STM32L152x6xx,STM32L152x8xx, STM32L152xBxx, STM32L151x6xxA,STM32L151x8xxA,STM32L151xBxxA, STM32L152x6xxA, STM32L152x8xxA,STM32L152xBxxA.STM32L100x6xx,STM32L100x8xx and STM32L100xBxx.
STM32L1XX_MDP ————>Ultra Low Power Medium-density Plus devices: STM32L151xCxx, STM32L152xCxx and STM32L162xCxx ,STM32L100xCxx
STM32L1XX_HD ————> Ultra Low Power High-density devices: STM32L151xDxx, STM32L152xDxx and STM32L162xDxx
STM32L1XX_XL ————>Ultra Low Power XL-density devices: STM32L151xExx, STM32L152xExx and STM32L162xExx
根据自己的芯片选择
startup_stm32l1xx_hd.s
startup_stm32l1xx_md.s
startup_stm32l1xx_mdp.s
startup_stm32l1xx_xl.s
我用的是STM32L151C8T6A所以选的是startup_stm32l1xx_md.s。