STM32 F302R8 STM32 Nucleo Pack + Keil 5第一次调试

本文记录了使用STM32 Nucleo F302R8开发板在Keil 5环境下进行首次调试的过程。遇到的问题包括项目转换、目标设备选择、头文件路径设置、Debugger选项选择以及JP5跳线设置。通过调整,最终成功实现程序的编译、下载与运行。
摘要由CSDN通过智能技术生成

昨天从一个学弟那里借来一个ST的板子玩,搞了一天终于能编译和下载程序了。使用的IDE是keil5。期间参考了网上一些教程,但是发现很多教程里有一些不是很明确的地方。通过摸索一一修正了不太恰当的地方,这里做一个记录。


是一个Pack,STM32 Nucleo Pack,开发FOC和6-step电机的。板子型号是STM Nucleo-64, CPU是STM32F302R8。这里以STM32Cube_FW_F3_V1.3.0固件为例。使用固件中的\Projects\STM32F302R8-Nucleo\Examples\GPIO\GPIO_EXTI 例程。当然也要在keil里面更新好,如图



Pack Installer里面没有正好对应的Board,就只能呵呵了。


(0)关于打开项目时的选项

在keil里面打开\Projects\STM32F302R8-Nucleo\Examples\GPIO\GPIO_EXTI\MDK-ARM下的项目文件。提示有序keil版本高于项目生成时的版本,需要转换为当前版本,选择了转换。但是没有测试不转换是否有影响。


(1)关于默认target

查看项目的options,Device选项卡里并不是STM32F302R8,而是一款别的型号。我直接改成了STM32F302R8,没有测试不修改直接编译是

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值