STM32CUBE IDE from 0 to Helloworld on macOS (New STM32 Project)

Step 1. File > New > STM32 Project.

Wait a minute.

Step 2. Use Part Number search your MCU, in there I use STM32F103C8T6.

you can see all information about STM32F103.

Step 3. Give your project a name.(my name is hello!)

And, Now you can see STM32F103C8T6 in your windows.

你可以透過圖形介面進行腳為配置.

在我的習慣下,針對Project Manager>Code Generator>Enabel “Generate peripheral initialization as a pair of ‘.c/,h’ files per peripheral.

Step 4. Project > Generate Code

every time change your config, you should generate again.

你可以看到Helloworld > Core > Src > main.c

與STM32CUBE所生成的Drivers.

Step 5. click Outline main(void) and you can see the same picture.

You can also use the keyboard shortcut option + / to complete the code. or use command + / to make a one-line comment.

Quickly format your layout with Source > Format

--

--