学习日志之STM32固件库

对固件库结构的理解

stm32固件库分为4层:

  • 应用层(application layer)
  • 板级支持包BSP(BSP(board specific package)
  • 硬件抽象层HAL(hardware abstraction layer)
  • 硬件层(hardware)
  1. 应用层:包含有函数使用的工程模板(和相应的开发工具对应)
  2. BSP:这个给外设用的比如led、lcd之类的东西的功能函数库(对应的设备是官方的STMicroelectronics evaluation boards)
  3. HAL:这个是用来控制寄存器的函数库
    • CMSIS:内核外设访问接口,STM32F4xx外设接口,Cortex-M系列的信号处理函数
    • STM32F4xx 标准外设驱动:给所有的外设提供头函数和驱动函数,通过CMSIS访问STM32F4的寄存器

固件库头文件之间的包含关系

在这里插入图片描述

  • stm32f4xx_conf.h
    Peripheral’s drivers configuration file
    The user can enable or disable peripheral header file inclusion by using the template
    This file can also be used to enable or disable the Library run-time failure detection before compiling the firmware library drivers, through the preprocessor define USE_FULL_ASSERT

  • stm32f4xx_ppp.h
    Header file of PPP peripheral
    This file includes the PPP peripheral function and variable definitions used within these functions.

  • stm32f4xx_ppp.c
    Driver source code file of PPP peripheral written in C language

  • stm32f4xx_it.h
    Header file including all interrupt handlers prototypes

  • stm32f4xx_it.c
    Template source file containing the interrupt service routine (ISR) for Cortex-M4F exceptions.
    User can add additional ISR(s) for the used peripheral(s) (for the available peripheral interrupt handler’s name, please refer to the startup file startup_stm32f4xx.s).

  • stm32f4xx.h
    CMSIS Cortex-M4F STM32F4xx device peripheral access layer header file.
    The file is the unique include file that the application programmer is using in the C source code, usually in main.c.

  • system_stm32f4xx.h
    CMSIS Cortex-M4F STM32F4xx devices peripheral access layer system header file

  • system_stm32f4xx.c
    CMSIS Cortex-M4F STM32F4xx devices peripheral access layer system source file.

  • startup_stm32f4xx.s
    STM32F4xx devices startup file, one file per compiler…

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值