本帖最后由 donkey89 于 2011-5-24 17:58 编辑
如下代码:- void main(void)
- {
- /* Infinite loop */
- pwm_cn_init();
- // GPIO_Init(GPIOB,GPIO_PIN_5,GPIO_MODE_OUT_OD_LOW_SLOW);
- while (1)
- {
- }
- }
第5行 GPIO_Init(GPIOB,GPIO_PIN_5,GPIO_MODE_OUT_OD_LOW_SLOW);
如果不注释掉,编译以后无法上传到芯片,提示
"Failed to write chunk with size 1024 at address 0x811E: SWIM PROG error [42010]: File open error "
.注释掉以后就可以了
也可能是官方库的错误.不知道用其他编译器的朋友有没有出现这个情况
|