
原先工程配置C/C++ Define定义芯片型号是STM32G070xx,后修改成STM32G030xx,结果编译后仍然是stm32g070xx.h头文件生效,而不是stm32g030xx.h #if defined(STM32G071xx) #include "stm32g071xx.h" #elif defined(STM32G081xx) #include "stm32g081xx.h" #elif defined(STM32G070xx) #include "stm32g070xx.h" #elif defined(STM32G031xx) #include "stm32g031xx.h" #elif defined(STM32G041xx) #include "stm32g041xx.h" #elif defined(STM32G030xx) #include "stm32g030xx.h" #else #error "Please select first the target STM32G0xx device used in your application (in stm32g0xx.h file)" #endif 有人遇到过吗?求解答!!!!!!!! |
建议您不要用那么多的判断来包含,删除其余的包含判断试试。
我这里是KEIL的查看方法,其他工具类似,可能在其他的地方。