以SW4STM32爲例
1.File->New->C Project,
2.Executable->Ac6 STM32 MCU Project 填寫工程名字
3.選擇MCU型號或者Create a new custom board
4.next選擇固件Standard Peripheral Library,並下安裝Download target firmware
5.保持默認"Add low level drivers in the project" "As sources in the application project"
6,Project裏面Properties->C/C++ Build->Settings->MCU GCC Compiler->Includes添加自己的頭文件的編譯路徑
7.完成