keil快速创建stm32工程

本文介绍了如何在Keil中,无需模板工程,直接根据芯片型号创建STM32项目,包括配置标准库、选择所需库文件,以及针对Keil高版本需安装arm5编译器的注意事项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

keil如果安装的有对应的标准库的话是可以不通过使用模板工程进行文件创建的。

具体操作如下:

1.跟51一样选择对应芯片型号,创建工程即可。

2.注意!!!这个窗口就是标准库的配置窗口,勾选上便可在工程内使用标准库。

在这里插入图片描述

3.一个基本的标准库工程至少应该包括以下勾选的文件

在这里插入图片描述

4.如果需要使用其他标准库,在StdPeriph Drivers (这个就是标准库 )下勾选对应的库即可。后续添加文件以及添加文件目录均与STM32正常工程一致。注意:如果使用的是高版本keil的话会导致编译出现多个错误,这是由于keil自5.38版本后不再自带arm 5 编译器的缘故,需要下载安装arm 5 编译器,具体方法请自行百度。将其编译换为arm5后报错就消失了

在这里插入图片描述

Version: 2.5.0 (2020-10-21) Keil.STM32L4xx_DFP.2.5.0.pack Updated Pack to STM32Cube_FW_L4 Firmware Package version V1.16.0 using HAL Drivers V1.12.0 Package Description (pdsc): Added global define USE_HAL_DRIVER to the component ::Device:STM32Cube HAL:Common. Device support: Aligned devices with CubeMX DB. CMSIS Flash Algorithm: Removed targets (STM32L4xx_512, STM32L4xx_256) from STM32L4Rx Flash Algorithm project. Added source code for: STM32L476G-Disco QSPI, STM32L4P5G-DK OSPI, STM32L4P5G-DK PSRAM STM32L4R9I-DK PSRAM, STM32L4R9I-DK OSPI1 and STM32L4R9I-EVAL OSPI. Added PSRAM external Loader support for STM32L4R9I-Disco. Fixed STM32L4P5 1M internal flash Loader sector erase with DBANK mode. Fixed STM32L4xx 512K and 128K internal flash Loader sector erase. CMSIS-Driver: MCI: Replaced empty delay loops with _NOP(). Added handling for separate SD and MMC HAL layers. Added busy signal handling after CMDREND interrupt. SPI: Corrected PowerControl function (to return error if Initialize was not called, to abort active transfer if power off was requested). Updated GetDataCount function to give accurate count. Corrected Uninitialize function (to power off the peripheral if it is powered). USART: Added Driver_USART6 (uses LPUART1). Corrected GetTxCount/GetRxCount implementation. USBD: Removed include of stm32l4xx_hal_pcd.h header. Corrected documentation of STM32CubeMx configuration. Updated Boards Examples: Migrated CubeMX projects to V6.0.1. Changed variant selection to "MDK-Plus" where possible. Updated all USB Host/Device examples with user templates from MDK-Middleware v7.11.1.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值