build project using makefile
1 #include <Windows.h> 2 #include <iostream> 3 #include <string> 4 5 using namespace std; 6 int main() 7 { 8 std::cout << "-----------select action------------" << std::endl; 9 std::cout << "1.make bin file" << std::endl; 10 std::cout << "2.flash bin" << std::endl; 11 std::cout << "3.com log capture" << std::endl; 12 std::cout << "------------------------------------" << std::endl; 13 //system("dir"); 14 //system("arm-none-eabi-gcc -v"); 15 //system("cmake --version"); 16 system("cd /d d:\\stm32\\teststm32 && make && arm-none-eabi-size build/teststm32.elf"); 17 //arm-none-eabi-objcopy -O ihex build/teststm32.elf build/teststm32.hex 18 //arm-none-eabi-objcopy -O binary -S build/teststm32.elf build/teststm32.bin 19 20 system("pause"); 21 return 0; 22 }