STM32 HAL library development notes + sample program Part 1: Introduction to HAL library

1. Introduction to HAL library: HAL library is a set of API library developed by ST company to enable users to develop products efficiently. This HAL library can be used in conjunction with STM32CubeMux graphical component software tools. STM32CubeMux can develop product requirements according to users Make a tailoring selection to make a dedicated package, which is automatically generated after being configured by the STM32CubeMux tool.

2. The difference and connection between HAL library and lib library

(1) contact

@1. The HAL library and the lib library are both a set of API software interfaces. The same user functions are realized through different API interfaces. In essence, they are all a set of software developed by ST for the efficient development of users.

(2) difference

@1. The HAL library is relatively more compatible. It can be transplanted on different platforms only by modifying the bottom hardware configuration under different ST platforms. The compatibility of the lib library is not so strong, the difference between the F1 and F4 platforms is relatively large, and the compatibility is not very strong

@2. The HAL library and the STM32CubeMux graphical cutting tool software have joined forces. Through the STM32CubeMux software, the software package in the form of a HAL library can be automatically generated after configuration and cutting. Users who are not very familiar with the underlying layer can also achieve rapid development, which is a bit more Layered development of a higher-level language, the driver layer and the application layer are separated

@3. The configuration of third-party components, such as USB driver library, Freertos, FATS, Lwip and other third-party configurations are more convenient and more compatible. Some third-party libraries developed by the lib library that need to be transplanted by users can be used during the development of the HAL library. Omit it entirely.

@4. From the perspective of software execution efficiency, the software execution efficiency of the lib library is superior to the simplification of the code, while the API interface of the HAL library is richer, and the execution efficiency is worse than that of the lib library.

@5. From the perspective of future development: the HAL library will gradually replace the lib library, so it is very necessary to master the overall architecture of the HAL library, including

The entire software development process based on the HAL library, the overall software architecture of the HAL library. How can the user grasp the HAL library as a whole + combine the underlying peripheral drivers + layered implementation of the logic layer + use and transplant third-party libraries? Only by mastering the above points can we make stable products and improve the professional skills of engineers

 

Guess you like

Origin blog.csdn.net/qq_27568125/article/details/97797524