STM32F413 HAL固件库(一)-CMSIS与ST官方pack

ARM架构。细琢磨有一种很奇妙的感觉。

在前面,我系统介绍过STM32F413。在此基础上一起系统学习一下ST HAL固件库。由于HAL库的编写需要遵照CMSIS标准,所以最先接触到的概念就是CMSIS,组件就是ST官方pack。

下面的论述参考:https://arm-software.github.io/CMSIS_5/General/html/index.html

CMSIS最初是一个独立于供应商(vendor)的硬件抽象层(hardware abstraction layer),支持基于Arm® Cortex®-M的处理器(processor),后来扩展到(extend to)支持基于Arm Cortex-A的入门级(entry-level)处理器。CMSIS定义了通用工具接口(generic tool interfaces),并通过向处理器和外围设备(the peripherals)提供简单的软件接口来实现一致的设备支持(enables consistent device support)。

CMSIS具有如下组件:

  • Core(M)Cortex-M处理器内核和外设的标准化API(Standardized API)。包括Cortex-M4/M7/M33/M35P SIMD指令的内联函数(intrinsic functions)。适用于All Cortex-M,SecurCore;
  • Core(A)用于Cortex-A5/A7/A9处理器内核和外围设备的标准化API和基本运行时系统(basic run-time system)
  • Driver中间件的通用外设驱动接口(Generic peripheral driver interfaces)。将微控制器外围设备与实现(implements)通信堆栈、文件系统或图形用户界面等的中间件连接起来;
  • DSPDSP库的集合,包含60多种适用于各种数据类型的函数:定点(fixed-point)(小数q7、q15、q31)和单精度浮点(single precision floating-point)(32 位)。适用于All Cortex-M。针对 SIMD指令集优化(optimized)的实现可用于Cortex-M4/M7/M33/M35P
  • NN高效神经网络内核的集合,旨在(developed to)最大限度(maximize)地提高性能并最大限度地减少Cortex-M处理器内核上的内存占用(memory footprint),适用于All Cortex-M;
  • RTOS v1:实时操作系统的通用API以及(along with)基于RTX的参考实现(reference implementation)。 它支持可以跨越多个RTOS系统工作的软件组件。适用于Cortex-M0/M0+/M3/M4/M7;
  • RTOS v2:具备Armv8-M支持、动态对象创建(dynamic object creation)、多核系统配置(provisions for multi-core systems)、二进制兼容(compatible)接口的扩展CMSIS-RTOS v1。适用于All Cortex-M,Cortex-A5/A7/A9;
  • Pack:描述软件组件、设备参数(device parameters)和评估板支持(evaluation board support)的交付机制(delivery mechanism)。它简化了软件重用和产品生命周期管理(PLM)。适用于All Cortex-M,SecurCore,Cortex-A5/A7/A9;
  • Build:一组提高生产力(productivity)的工具、软件框架和工作流程,例如持续集成(CI);
  • SVD:可用于在调试器或CMSIS-Core头文件中创建外围设备感知;
  • DAP:调试单元固件;
  • Zone:定义了关于描述系统资源(system resources)并将这些资源划分为多个项目和执行区域的方法。

4.png

如上图,CMSIS标准最重要的是CMSIS核心层:

  • 内核函数层:其中包含用于访问内核寄存器的名称、地址定义,主要由ARM公司提供;
  • 设备外设访问层:提供了片上的核外外设的地址和中断定义,主要由芯片生产商提供。

本系列沿着CMSIS标准的脉络分析一下STM32F4的HAL库。(”STM32Cube_FW_F4_V1.26.0”)。该固件库就是函数的集合,作用是向下负责与寄存器打交道,向上提供用户函数调用的接口。下载过程略过,解压缩后打开文件夹。

一级目录如下:

.
├── Documentation
├── Drivers
├── License.md
├── Middlewares
├── Projects
├── README.md
├── Release_Notes.html
├── Utilities
├── _htmresc
└── package.xml

6 directories, 4 files

各部分各司其职:

  • Documentation:文件夹下是HAL库帮助文档,主要讲述如何使用驱动库来编写自己的应用程序;
  • Drivers:文件夹下是官方的CMSIS库,HAL库和板载外设驱动(BSP);

      .
      ├── BSP
      ├── CMSIS
      └── STM32F4xx_HAL_Driver
        
      3 directories, 0 files
    
  • Middlewares:中间件,包含ST官方的STemWin、STM32_Audio、STM32_USB_Device_Library、STM32_USB_Host_Library;也有第三方的fatfs文件系统等等;

      .
      ├── ST
      │   ├── STM32_Audio
      │   ├── STM32_USB_Device_Library
      │   ├── STM32_USB_Host_Library
      │   ├── STemWin
      │   └── TouchGFX
      └── Third_Party
          ├── FatFs
          ├── FreeRTOS
          ├── LibJPEG
          ├── LwIP
          └── mbedTLS
        
      12 directories, 0 files
    
  • Project:文件夹下是用驱动库写的针对官方发行demo板的例子和工程模板;

      .
      ├── Release_Notes.html
      ├── STM32446E-Nucleo
      ├── STM32446E_EVAL
      ├── STM32469I-Discovery
      ├── STM32469I_EVAL
      ├── STM324x9I_EVAL
      ├── STM324xG_EVAL
      ├── STM32CubeProjectsList.html
      ├── STM32F4-Discovery
      ├── STM32F401-Discovery
      ├── STM32F401RE-Nucleo
      ├── STM32F410xx-Nucleo
      ├── STM32F411E-Discovery
      ├── STM32F411RE-Nucleo
      ├── STM32F412G-Discovery
      ├── STM32F412ZG-Nucleo
      ├── STM32F413H-Discovery
      ├── STM32F413ZH-Nucleo
      ├── STM32F429I-Discovery
      ├── STM32F429ZI-Nucleo
      ├── STM32F446ZE-Nucleo
      └── WIN32
        
      20 directories, 2 files
    
  • Utilities:实用的公用组件。比如LCD_LOG实用液晶打印调试信息。

      .
      ├── CPU
      ├── Fonts
      ├── Log
      ├── Media
      └── PC_Software
        
      5 directories, 0 files
    

STM32Cube_FW_F4_V1.26.0的核心就是Drivers。在开发时,我们就需要把Drivers目录下的CMSIS、STM32F4xx_HAL_Driver内核与外设的库文件添加到工程中。

CMSIS

在Drivers/CMSIS中,一级目录如下:

.
├── ARM.CMSIS.pdsc
├── Core
├── Core_A
├── DSP
├── Device
├── Include
├── LICENSE.txt
├── Lib
├── NN
├── README.md
├── RTOS
├── RTOS2
└── docs

10 directories, 3 files
  • ARM.CMSIS.pdsc是包描述文件;
  • Core文件夹包含CMSIS-Core(Cortex-M)相关文件的用户代码模板,它包含Include文件夹内的所有头文件,并在ARM.CMSIS.pdsc中得以引用,提供了一条进入内核的途径;
  • Core_A是CMSIS-Core(Cortex-A)相关文件的用户代码模板,暂时不在分析范围内;
  • DSP是DSP库;
  • Device是芯片厂商给出的芯片外设寄存器的定义、启动文件等等;
  • Lib:相关库函数
  • NN:神经网络单元库函数;

后略。

Core内部层级结构比较简单:

.
├── .DS_Store
├── Include
│   ├── cmsis_armcc.h
│   ├── cmsis_armclang.h
│   ├── cmsis_compiler.h
│   ├── cmsis_gcc.h
│   ├── cmsis_iccarm.h
│   ├── cmsis_version.h
│   ├── core_armv8mbl.h
│   ├── core_armv8mml.h
│   ├── core_cm0.h
│   ├── core_cm0plus.h
│   ├── core_cm1.h
│   ├── core_cm23.h
│   ├── core_cm3.h
│   ├── core_cm33.h
│   ├── core_cm4.h
│   ├── core_cm7.h
│   ├── core_sc000.h
│   ├── core_sc300.h
│   ├── mpu_armv7.h
│   ├── mpu_armv8.h
│   └── tz_context.h
└── Template
    ├── .DS_Store
    └── ARMv8-M
        ├── main_s.c
        └── tz_context.c

3 directories, 25 files

其中Include内部包含的Cortex-M核通用的头文件,它们的作用是为那些采用Cortex-M核设计SOC的芯片商设计的芯片外设提供一个进入内核的接口,并定义了一些内核相关的寄存器。

其中:

  • cmsis_armcc.h、cmsis_armclang.h、cmsis_compiler.h、cmsis_iccarm.h和cmsis_gcc.h:内核编译相关文件。兼容不同的编译器,为内核文件提供编译接口;
  • core开头的文件:核内外设访问层头文件,内部含有核内外设寄存器的定义和编译器的兼容选择;
  • 还有两个MPU相关文件。

Device文件夹下是具体芯片的相关文件,包含启动文件、芯片外设寄存器定义、系统时钟初始化功能等文件。这个是由芯片厂商给出的。

.
├── .DS_Store
├── Include
│   ├── stm32f401xc.h
│   ├── stm32f401xe.h
│   ├── stm32f405xx.h
│   ├── stm32f407xx.h
│   ├── stm32f410cx.h
│   ├── stm32f410rx.h
│   ├── stm32f410tx.h
│   ├── stm32f411xe.h
│   ├── stm32f412cx.h
│   ├── stm32f412rx.h
│   ├── stm32f412vx.h
│   ├── stm32f412zx.h
│   ├── stm32f413xx.h
│   ├── stm32f415xx.h
│   ├── stm32f417xx.h
│   ├── stm32f423xx.h
│   ├── stm32f427xx.h
│   ├── stm32f429xx.h
│   ├── stm32f437xx.h
│   ├── stm32f439xx.h
│   ├── stm32f446xx.h
│   ├── stm32f469xx.h
│   ├── stm32f479xx.h
│   ├── stm32f4xx.h
│   └── system_stm32f4xx.h
├── License.md
├── README.md
├── Release_Notes.html
├── Source
│   ├── .DS_Store
│   └── Templates
│       ├── .DS_Store
│       ├── arm
│       │   ├── startup_stm32f401xc.s
│       │   ├── startup_stm32f401xe.s
│       │   ├── startup_stm32f405xx.s
│       │   ├── startup_stm32f407xx.s
│       │   ├── startup_stm32f410cx.s
│       │   ├── startup_stm32f410rx.s
│       │   ├── startup_stm32f410tx.s
│       │   ├── startup_stm32f411xe.s
│       │   ├── startup_stm32f412cx.s
│       │   ├── startup_stm32f412rx.s
│       │   ├── startup_stm32f412vx.s
│       │   ├── startup_stm32f412zx.s
│       │   ├── startup_stm32f413xx.s
│       │   ├── startup_stm32f415xx.s
│       │   ├── startup_stm32f417xx.s
│       │   ├── startup_stm32f423xx.s
│       │   ├── startup_stm32f427xx.s
│       │   ├── startup_stm32f429xx.s
│       │   ├── startup_stm32f437xx.s
│       │   ├── startup_stm32f439xx.s
│       │   ├── startup_stm32f446xx.s
│       │   ├── startup_stm32f469xx.s
│       │   └── startup_stm32f479xx.s
│       ├── gcc
│       │   ├── startup_stm32f401xc.s
│       │   ├── startup_stm32f401xe.s
│       │   ├── startup_stm32f405xx.s
│       │   ├── startup_stm32f407xx.s
│       │   ├── startup_stm32f410cx.s
│       │   ├── startup_stm32f410rx.s
│       │   ├── startup_stm32f410tx.s
│       │   ├── startup_stm32f411xe.s
│       │   ├── startup_stm32f412cx.s
│       │   ├── startup_stm32f412rx.s
│       │   ├── startup_stm32f412vx.s
│       │   ├── startup_stm32f412zx.s
│       │   ├── startup_stm32f413xx.s
│       │   ├── startup_stm32f415xx.s
│       │   ├── startup_stm32f417xx.s
│       │   ├── startup_stm32f423xx.s
│       │   ├── startup_stm32f427xx.s
│       │   ├── startup_stm32f429xx.s
│       │   ├── startup_stm32f437xx.s
│       │   ├── startup_stm32f439xx.s
│       │   ├── startup_stm32f446xx.s
│       │   ├── startup_stm32f469xx.s
│       │   └── startup_stm32f479xx.s
│       ├── iar
│       │   ├── linker
│       │   │   ├── stm32f401xc_flash.icf
│       │   │   ├── stm32f401xc_sram.icf
│       │   │   ├── stm32f401xe_flash.icf
│       │   │   ├── stm32f401xe_sram.icf
│       │   │   ├── stm32f405xx_flash.icf
│       │   │   ├── stm32f405xx_sram.icf
│       │   │   ├── stm32f407xx_flash.icf
│       │   │   ├── stm32f407xx_sram.icf
│       │   │   ├── stm32f410cx_flash.icf
│       │   │   ├── stm32f410cx_sram.icf
│       │   │   ├── stm32f410rx_flash.icf
│       │   │   ├── stm32f410rx_sram.icf
│       │   │   ├── stm32f410tx_flash.icf
│       │   │   ├── stm32f410tx_sram.icf
│       │   │   ├── stm32f411xe_flash.icf
│       │   │   ├── stm32f411xe_sram.icf
│       │   │   ├── stm32f412cx_flash.icf
│       │   │   ├── stm32f412cx_sram.icf
│       │   │   ├── stm32f412rx_flash.icf
│       │   │   ├── stm32f412rx_sram.icf
│       │   │   ├── stm32f412vx_flash.icf
│       │   │   ├── stm32f412vx_sram.icf
│       │   │   ├── stm32f412zx_flash.icf
│       │   │   ├── stm32f412zx_sram.icf
│       │   │   ├── stm32f413xx_flash.icf
│       │   │   ├── stm32f413xx_sram.icf
│       │   │   ├── stm32f415xx_flash.icf
│       │   │   ├── stm32f415xx_sram.icf
│       │   │   ├── stm32f417xx_flash.icf
│       │   │   ├── stm32f417xx_sram.icf
│       │   │   ├── stm32f423xx_flash.icf
│       │   │   ├── stm32f423xx_sram.icf
│       │   │   ├── stm32f427xx_flash.icf
│       │   │   ├── stm32f427xx_sram.icf
│       │   │   ├── stm32f429xx_flash.icf
│       │   │   ├── stm32f429xx_sram.icf
│       │   │   ├── stm32f437xx_flash.icf
│       │   │   ├── stm32f437xx_sram.icf
│       │   │   ├── stm32f439xx_flash.icf
│       │   │   ├── stm32f439xx_sram.icf
│       │   │   ├── stm32f446xx_flash.icf
│       │   │   ├── stm32f446xx_sram.icf
│       │   │   ├── stm32f469xx_flash.icf
│       │   │   ├── stm32f469xx_sram.icf
│       │   │   ├── stm32f479xx_flash.icf
│       │   │   └── stm32f479xx_sram.icf
│       │   ├── startup_stm32f401xc.s
│       │   ├── startup_stm32f401xe.s
│       │   ├── startup_stm32f405xx.s
│       │   ├── startup_stm32f407xx.s
│       │   ├── startup_stm32f410cx.s
│       │   ├── startup_stm32f410rx.s
│       │   ├── startup_stm32f410tx.s
│       │   ├── startup_stm32f411xe.s
│       │   ├── startup_stm32f412cx.s
│       │   ├── startup_stm32f412rx.s
│       │   ├── startup_stm32f412vx.s
│       │   ├── startup_stm32f412zx.s
│       │   ├── startup_stm32f413xx.s
│       │   ├── startup_stm32f415xx.s
│       │   ├── startup_stm32f417xx.s
│       │   ├── startup_stm32f423xx.s
│       │   ├── startup_stm32f427xx.s
│       │   ├── startup_stm32f429xx.s
│       │   ├── startup_stm32f437xx.s
│       │   ├── startup_stm32f439xx.s
│       │   ├── startup_stm32f446xx.s
│       │   ├── startup_stm32f469xx.s
│       │   └── startup_stm32f479xx.s
│       └── system_stm32f4xx.c
└── _htmresc
    ├── mini-st.css
    └── st_logo.png

8 directories, 149 files

概括来说内部主要包含几种非常重要的文件:

  • system_stm32f4xx.c

    目录:\Drivers\CMSIS\Device\ST\stm32f4xx\Source\Templates。

    这个文件包含了STM32芯片上电后初始化系统时钟、扩展外部存储器用的函数;

  • 启动文件

    目录:\Drivers\CMSIS\Device\ST\stm32f4xx\Source\Templates。

    在这个目录下,还有很多文件夹,如“ARM”、“gcc”、“iar”等。这些文件夹下包含了对应编译平台的汇编启动文件,在实际使用时要根据编译平台来进行选择。经常使用的MDK,它的启动文件在“ARM”文件夹中。

  • STM32芯片底层相关头文件

    目录:Drivers\CMSIS\Device\ST\stm32f4xx\Include。

    内部包含了STM32中所有的外设寄存器地址和结构体类型定义,非常重要。

STM32F4xx_HAL_Driver

.
├── Inc
├── License.md
├── README.md
├── Release_Notes.html
├── STM32F410Rx_User_Manual.chm
├── STM32F411xE_User_Manual.chm
├── STM32F412Zx_User_Manual.chm
├── STM32F417xx_User_Manual.chm
├── STM32F423xx_User_Manual.chm
├── STM32F439xx_User_Manual.chm
├── STM32F446xx_User_Manual.chm
├── STM32F479xx_User_Manual.chm
├── Src
└── _htmresc

3 directories, 11 files

一级目录下两个很重要的文件夹是inc(include)和src(source)。这里的文件描述了属于CMSIS Core核外,芯片片上外设的部分。src内是各外设的驱动源程序,inc是src对应的头文件。src及inc文件夹就是ST的HAL库主要内容。

外设驱动的命名是比较统一的:stm32f4xx_hal_xxx.c和stm32f4xx_hal_xxx.h。

src:

.
├── Legacy
│   └── stm32f4xx_hal_can.c
├── stm32f4xx_hal.c
├── stm32f4xx_hal_adc.c
├── stm32f4xx_hal_adc_ex.c
├── stm32f4xx_hal_can.c
├── stm32f4xx_hal_cec.c
├── stm32f4xx_hal_cortex.c
├── stm32f4xx_hal_crc.c
├── stm32f4xx_hal_cryp.c
├── stm32f4xx_hal_cryp_ex.c
├── stm32f4xx_hal_dac.c
├── stm32f4xx_hal_dac_ex.c
├── stm32f4xx_hal_dcmi.c
├── stm32f4xx_hal_dcmi_ex.c
├── stm32f4xx_hal_dfsdm.c
├── stm32f4xx_hal_dma.c
├── stm32f4xx_hal_dma2d.c
├── stm32f4xx_hal_dma_ex.c
├── stm32f4xx_hal_dsi.c
├── stm32f4xx_hal_eth.c
├── stm32f4xx_hal_exti.c
├── stm32f4xx_hal_flash.c
├── stm32f4xx_hal_flash_ex.c
├── stm32f4xx_hal_flash_ramfunc.c
├── stm32f4xx_hal_fmpi2c.c
├── stm32f4xx_hal_fmpi2c_ex.c
├── stm32f4xx_hal_fmpsmbus.c
├── stm32f4xx_hal_fmpsmbus_ex.c
├── stm32f4xx_hal_gpio.c
├── stm32f4xx_hal_hash.c
├── stm32f4xx_hal_hash_ex.c
├── stm32f4xx_hal_hcd.c
├── stm32f4xx_hal_i2c.c
├── stm32f4xx_hal_i2c_ex.c
├── stm32f4xx_hal_i2s.c
├── stm32f4xx_hal_i2s_ex.c
├── stm32f4xx_hal_irda.c
├── stm32f4xx_hal_iwdg.c
├── stm32f4xx_hal_lptim.c
├── stm32f4xx_hal_ltdc.c
├── stm32f4xx_hal_ltdc_ex.c
├── stm32f4xx_hal_mmc.c
├── stm32f4xx_hal_msp_template.c
├── stm32f4xx_hal_nand.c
├── stm32f4xx_hal_nor.c
├── stm32f4xx_hal_pccard.c
├── stm32f4xx_hal_pcd.c
├── stm32f4xx_hal_pcd_ex.c
├── stm32f4xx_hal_pwr.c
├── stm32f4xx_hal_pwr_ex.c
├── stm32f4xx_hal_qspi.c
├── stm32f4xx_hal_rcc.c
├── stm32f4xx_hal_rcc_ex.c
├── stm32f4xx_hal_rng.c
├── stm32f4xx_hal_rtc.c
├── stm32f4xx_hal_rtc_ex.c
├── stm32f4xx_hal_sai.c
├── stm32f4xx_hal_sai_ex.c
├── stm32f4xx_hal_sd.c
├── stm32f4xx_hal_sdram.c
├── stm32f4xx_hal_smartcard.c
├── stm32f4xx_hal_smbus.c
├── stm32f4xx_hal_spdifrx.c
├── stm32f4xx_hal_spi.c
├── stm32f4xx_hal_sram.c
├── stm32f4xx_hal_tim.c
├── stm32f4xx_hal_tim_ex.c
├── stm32f4xx_hal_timebase_rtc_alarm_template.c
├── stm32f4xx_hal_timebase_rtc_wakeup_template.c
├── stm32f4xx_hal_timebase_tim_template.c
├── stm32f4xx_hal_uart.c
├── stm32f4xx_hal_usart.c
├── stm32f4xx_hal_wwdg.c
├── stm32f4xx_ll_adc.c
├── stm32f4xx_ll_crc.c
├── stm32f4xx_ll_dac.c
├── stm32f4xx_ll_dma.c
├── stm32f4xx_ll_dma2d.c
├── stm32f4xx_ll_exti.c
├── stm32f4xx_ll_fmc.c
├── stm32f4xx_ll_fmpi2c.c
├── stm32f4xx_ll_fsmc.c
├── stm32f4xx_ll_gpio.c
├── stm32f4xx_ll_i2c.c
├── stm32f4xx_ll_lptim.c
├── stm32f4xx_ll_pwr.c
├── stm32f4xx_ll_rcc.c
├── stm32f4xx_ll_rng.c
├── stm32f4xx_ll_rtc.c
├── stm32f4xx_ll_sdmmc.c
├── stm32f4xx_ll_spi.c
├── stm32f4xx_ll_tim.c
├── stm32f4xx_ll_usart.c
├── stm32f4xx_ll_usb.c
└── stm32f4xx_ll_utils.c

1 directory, 95 files

inc:

.
├── Legacy
│   ├── stm32_hal_legacy.h
│   └── stm32f4xx_hal_can_legacy.h
├── stm32_assert_template.h
├── stm32f4xx_hal.h
├── stm32f4xx_hal_adc.h
├── stm32f4xx_hal_adc_ex.h
├── stm32f4xx_hal_can.h
├── stm32f4xx_hal_cec.h
├── stm32f4xx_hal_conf_template.h
├── stm32f4xx_hal_cortex.h
├── stm32f4xx_hal_crc.h
├── stm32f4xx_hal_cryp.h
├── stm32f4xx_hal_cryp_ex.h
├── stm32f4xx_hal_dac.h
├── stm32f4xx_hal_dac_ex.h
├── stm32f4xx_hal_dcmi.h
├── stm32f4xx_hal_dcmi_ex.h
├── stm32f4xx_hal_def.h
├── stm32f4xx_hal_dfsdm.h
├── stm32f4xx_hal_dma.h
├── stm32f4xx_hal_dma2d.h
├── stm32f4xx_hal_dma_ex.h
├── stm32f4xx_hal_dsi.h
├── stm32f4xx_hal_eth.h
├── stm32f4xx_hal_exti.h
├── stm32f4xx_hal_flash.h
├── stm32f4xx_hal_flash_ex.h
├── stm32f4xx_hal_flash_ramfunc.h
├── stm32f4xx_hal_fmpi2c.h
├── stm32f4xx_hal_fmpi2c_ex.h
├── stm32f4xx_hal_fmpsmbus.h
├── stm32f4xx_hal_fmpsmbus_ex.h
├── stm32f4xx_hal_gpio.h
├── stm32f4xx_hal_gpio_ex.h
├── stm32f4xx_hal_hash.h
├── stm32f4xx_hal_hash_ex.h
├── stm32f4xx_hal_hcd.h
├── stm32f4xx_hal_i2c.h
├── stm32f4xx_hal_i2c_ex.h
├── stm32f4xx_hal_i2s.h
├── stm32f4xx_hal_i2s_ex.h
├── stm32f4xx_hal_irda.h
├── stm32f4xx_hal_iwdg.h
├── stm32f4xx_hal_lptim.h
├── stm32f4xx_hal_ltdc.h
├── stm32f4xx_hal_ltdc_ex.h
├── stm32f4xx_hal_mmc.h
├── stm32f4xx_hal_nand.h
├── stm32f4xx_hal_nor.h
├── stm32f4xx_hal_pccard.h
├── stm32f4xx_hal_pcd.h
├── stm32f4xx_hal_pcd_ex.h
├── stm32f4xx_hal_pwr.h
├── stm32f4xx_hal_pwr_ex.h
├── stm32f4xx_hal_qspi.h
├── stm32f4xx_hal_rcc.h
├── stm32f4xx_hal_rcc_ex.h
├── stm32f4xx_hal_rng.h
├── stm32f4xx_hal_rtc.h
├── stm32f4xx_hal_rtc_ex.h
├── stm32f4xx_hal_sai.h
├── stm32f4xx_hal_sai_ex.h
├── stm32f4xx_hal_sd.h
├── stm32f4xx_hal_sdram.h
├── stm32f4xx_hal_smartcard.h
├── stm32f4xx_hal_smbus.h
├── stm32f4xx_hal_spdifrx.h
├── stm32f4xx_hal_spi.h
├── stm32f4xx_hal_sram.h
├── stm32f4xx_hal_tim.h
├── stm32f4xx_hal_tim_ex.h
├── stm32f4xx_hal_uart.h
├── stm32f4xx_hal_usart.h
├── stm32f4xx_hal_wwdg.h
├── stm32f4xx_ll_adc.h
├── stm32f4xx_ll_bus.h
├── stm32f4xx_ll_cortex.h
├── stm32f4xx_ll_crc.h
├── stm32f4xx_ll_dac.h
├── stm32f4xx_ll_dma.h
├── stm32f4xx_ll_dma2d.h
├── stm32f4xx_ll_exti.h
├── stm32f4xx_ll_fmc.h
├── stm32f4xx_ll_fmpi2c.h
├── stm32f4xx_ll_fsmc.h
├── stm32f4xx_ll_gpio.h
├── stm32f4xx_ll_i2c.h
├── stm32f4xx_ll_iwdg.h
├── stm32f4xx_ll_lptim.h
├── stm32f4xx_ll_pwr.h
├── stm32f4xx_ll_rcc.h
├── stm32f4xx_ll_rng.h
├── stm32f4xx_ll_rtc.h
├── stm32f4xx_ll_sdmmc.h
├── stm32f4xx_ll_spi.h
├── stm32f4xx_ll_system.h
├── stm32f4xx_ll_tim.h
├── stm32f4xx_ll_usart.h
├── stm32f4xx_ll_usb.h
├── stm32f4xx_ll_utils.h
└── stm32f4xx_ll_wwdg.h

1 directory, 101 files

pack的基本介绍就到这里。下一节是STM32硬件相关的叙述。