KEIL MDK 使用配置工具和STM32CUBEMX工具新建项目(一)

Keil MDK 工具提供的配置工具可以方便的STM32CUBEMX结合起来使用,完成新建项目的初始化配置。

MCU  -- STM32F373RC

keil MDK 5.25

STM32CubeMX 4.26

1. 新建项目,选择对应的MCU型号

2. 在配置工具里选择STM32CubeMX,配置如下:

3. 点击OK,会询问是否运行STM32CubeMX,点击运行STM32CubeMX:

4. 在CubeMX中配置了外部晶振,USART1,PC13输出口(LED指示灯)

时钟配置:

USART1和PC13都按默认配置,不去修改。

点击生成代码:

生成代码后,不要打开项目,选择取消,并关闭CubeMX:

5. 在MDK下导入更新:

编译项目,应该没有警告和错误:

如果要使用LL库,在C/C++编译选项里添加 USE_FULL_LL_DRIVER 定义。

6. 后面需要修改或增加MCU的IO分配和初始化,在MDK配置工具里点击三角形的按钮就可调用CubeMX来配置。

  • 0
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Version: 2.2.0 (2021-07-22) Keil.STM32F3xx_DFP.2.2.0.pack Updated Pack to STM32Cube_FW_F3 Firmware Package version V1.11.2: Updated HAL to version V1.5.5. External interrupts and events (EXTI) HAL Universal serial bus full-speed device interface (USB) LL Added global define USE_HAL_DRIVER and USE_FULL_LL_DRIVER to the component ::Device:STM32Cube Framework:STM32CubeMX. Added global define USE_HAL_DRIVER and USE_FULL_LL_DRIVER to the component ::Device:STM32Cube HAL:COMMON. STM32CubeMX integration: MX_Device_h.ftl: Updated parsing of USART virtual mode. Updated generation of macros: Added handling for '(' and ')' symbols. FrameworkCubeMX_gpdsc.ftl: Added support for Timebase Source TIMx. Board Examples: Terminating app_main thread with osThreadExit() to avoid endless loop. Updated RTX configuration (CMSIS 5.8.0). Updated template based files (MDK-Middleware 7.13.0). Configured MDK projects to use Arm Compiler 6. Changed Assembler option to armclang (Auto Select). Updated all USB Host/Device examples with user templates from MDK-Middleware v7.11.1. FileSystem, USB: Changed variant selection to "MDK-Plus". Updated Graphics examples to use Segger emWin version 5.50. CMSIS Driver: CAN: Corrected SetBitrate function to leave Silent and Loopback mode as they were. Corrected SetMode function to clear Silent and Loopback mode when NORMAL mode is activated. Corrected MessageSend function to only access required data for sending. Corrected abort message send functionality. I2C: Corrected pin configuration: MX_I2Cx_SMBA_GPIO_PuPdOD replaced with MX_I2Cx_yyy_GPIO_PuPdOD. Corrected usage function name USB Device: Corrected transmitted count for non-control IN endpoints. Updated USBD_EndpointConfigure function to check that maximum packet size requested fits into configured FIFO (compile time configured). Removed include of stm32f3xx_hal_pcd.h header.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值