
走起----- 之前使用KIEL,一直都是5.00版本,使用起来STM32F系列的都妥妥的,都不知道为什么,在F072上面,遇到了各式各样的问题,先开始也没多想,觉得ST公司提供的文件非常非常的正确,可是在重新安装了KEIL5.10,KEIL5.12时,问题还是不停的出现 毫不犹豫,把遇到的其中几个分享一下-----首先是STM32PACK文件的问题,KEIL在安装的时候不知道抽了什么风,老是PACKINSTALLER无响应,在IMPORT之后好长时间没反应,一点击就无响应,使用器件就没有保障,遂选择一个类似的,唯一是把其中的固件库文件要修改其中一部分 好比来说,选择FLASH有不同,那就改变FLASH文件,ADC位数不同,那就该调整STM32F0XX_ADC.H /** ****************************************************************************** * @file stm32f0xx_flash.h * @author MCD Application Team * @version V1.3.0 * @date 16-January-2014 * @brief This file contains all the functions prototypes for the FLASH * firmware library. ****************************************************************************** * @attention * * <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2> * * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); * You may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.st.com/software_license_agreement_liberty_v2 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F0XX_FLASH_H #define __STM32F0XX_FLASH_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32f0xx.h" /** @addtogroup STM32F0xx_StdPeriph_Driver * @{ */ /** @addtogroup FLASH * @{ */ /* Exported types ------------------------------------------------------------*/ /** * @brief FLASH Status */ typedef enum { FLASH_BUSY = 1, FLASH_ERROR_WRP, FLASH_ERROR_PROGRAM, FLASH_COMPLETE, FLASH_TIMEOUT }FLASH_Status; /* Exported constants --------------------------------------------------------*/ /** @defgroup FLASH_Exported_Constants * @{ */ /** @defgroup FLASH_Latency * @{ */ #define FLASH_Latency_0 ((uint32_t)0x00000000) /*!< FLASH Zero Latency cycle */ #define FLASH_Latency_1 FLASH_ACR_LATENCY /*!< FLASH One Latency cycle */ #define IS_FLASH_LATENCY(LATENCY) (((LATENCY) == FLASH_Latency_0) || \ ((LATENCY) == FLASH_Latency_1)) /** * @} */ /** @defgroup FLASH_Interrupts * @{ */ #define FLASH_IT_EOP FLASH_CR_EOPIE /*!< End of programming interrupt source */ #define FLASH_IT_ERR FLASH_CR_ERRIE /*!< Error interrupt source */ #define IS_FLASH_IT(IT) ((((IT) & (uint32_t)0xFFFFEBFF) == 0x00000000) && (((IT) != 0x00000000))) /** * @} */ #define OB_STOP_NoRST ((uint8_t)0x02) /*!< No reset generated when entering in STOP */ #define OB_STOP_RST ((uint8_t)0x00) /*!< Reset generated when entering in STOP */ #define IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NoRST) || ((SOURCE) == OB_STOP_RST)) 。。。 /** @defgroup FLASH_Option_Bytes_BOOT0SW * @{ */ #define OB_BOOT0_SW ((uint8_t)0x00) /*!< BOOT0 pin disabled */ #define OB_BOOT0_HW ((uint8_t)0x80) /*!< BOOT0 pin bonded with GPIO */ #define IS_OB_BOOT0SW(BOOT0) (((BOOT0) == OB_BOOT0_SW) || ((BOOT0) == OB_BOOT0_HW)) /** * @} */ /** @defgroup FLASH_Option_Bytes_VDDA_Analog_Monitoring * @{ */ #define OB_VDDA_ANALOG_ON ((uint8_t)0x20) /*!< Analog monitoring on VDDA Power source ON */ #define OB_VDDA_ANALOG_OFF ((uint8_t)0x00) /*!< Analog monitoring on VDDA Power source OFF */ #define IS_OB_VDDA_ANALOG(ANALOG) (((ANALOG) == OB_VDDA_ANALOG_ON) || ((ANALOG) == OB_VDDA_ANALOG_OFF)) /** * @} */ /** @defgroup FLASH_Option_Bytes_SRAM_Parity_Enable * @{ */ #define OB_SRAM_PARITY_SET ((uint8_t)0x00) /*!< SRAM parity enable Set */ #define OB_SRAM_PARITY_RESET ((uint8_t)0x40) /*!< SRAM parity enable reset */ #define IS_OB_SRAM_PARITY(PARITY) (((PARITY) == OB_SRAM_PARITY_SET) || ((PARITY) == OB_SRAM_PARITY_RESET)) /** * @} */ /** @defgroup FLASH_Flags * @{ */ #define FLASH_FLAG_BSY FLASH_SR_BSY /*!< FLASH Busy flag */ #define FLASH_FLAG_PGERR FLASH_SR_PGERR /*!< FLASH Programming error flag */ #define FLASH_FLAG_WRPERR FLASH_SR_WRPERR /*!< FLASH Write protected error flag */ #define FLASH_FLAG_EOP FLASH_SR_EOP /*!< FLASH End of Programming flag */ #define IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFFCB) == 0x00000000) && ((FLAG) != 0x00000000)) #define IS_FLASH_GET_FLAG(FLAG) (((FLAG) == FLASH_FLAG_BSY) || ((FLAG) == FLASH_FLAG_PGERR) || \ ((FLAG) == FLASH_FLAG_WRPERR) || ((FLAG) == FLASH_FLAG_EOP)) #ifdef __cplusplus } #endif #endif 就是这个方法,就可以了 KEIL,IAR使用非常多,虽然见识了mbed的许多优点,但是我觉得还是喜欢使用KEIL,不知道大家觉得怎么样,欢迎讨论 |
不错哦,谢谢楼主 |