Since our company does not allow the use of cracked versions of IAR and Keil, I use STM32CubeIDE for development. The following is an introduction to the construction of the development environment.
1. IDE download link: https://www.st.com/en/development-tools/stm32cubeide.html , I used the Linux general version.
2. The installation is very simple, just execute the installation script directly. During the installation, you will be prompted to install the J-Link driver, etc. Select "Y" all the way.
3. SDK download link (that is, STM32Cube): I downloaded STM32CubeL4, STM32CubeL4 - STM32Cube MCU Package for STM32L4 series and STM32L4 Plus series (HAL, Low-Layer APIs and CMSIS, USB, TouchSensing, File system, RTOS, Graphic - and examples running on ST boards) - STMicroelectronics
4. Open the project: I chose to directly open the example downloaded in 3 (it is recommended to create a new STM32 project for real development), File—> New—> STM32 Project and then select the corresponding chip. This is very similar to STM32CubeMX.
5. Compile the project: You can click the hammer symbol, or click the project in the email and select "Build project"
6. How to compile and generate Bin or Hex files.
Right click on the project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU Post built outputs, check "Convert to binary file" and "Convert to Inter Hex file"