MDK5.14软件的安装和破解都是按照原子的文档进行的 ,编译光盘中的跑马灯实验成功,可以运行和下载. 所以KEIL的问题的可能性比较小.
综合实验59项目工程是从光盘拷贝过来,没有修改,编译出现以下错误,有人碰到过吗,帮忙看看.
Build target 'Test'
compiling usart3.c...
..HARDWAREUSART3usart3.c(124): error: #928: incorrect use of va_start
va_start(ap,fmt);
..HARDWAREUSART3usart3.c(124): error: #253: expected a ","
va_start(ap,fmt);
..HARDWAREUSART3usart3.c(124): error: #29: expected an expression
va_start(ap,fmt);
..HARDWAREUSART3usart3.c: 0 warnings, 3 errors
compiling ff.c...
..FATFSsrcff.c(4513): error: #928: incorrect use of va_start
va_start(arp, fmt);
..FATFSsrcff.c(4513): error: #253: expected a ","
va_start(arp, fmt);
..FATFSsrcff.c(4513): error: #29: expected an expression
va_start(arp, fmt);
..FATFSsrcff.c(4543): error: #929: incorrect use of va_arg
p = va_arg(arp, TCHAR*);
..FATFSsrcff.c(4552): error: #929: incorrect use of va_arg
putc_bfd(&pb, (TCHAR)va_arg(arp, int)); continue;
..FATFSsrcff.c(4567): error: #929: incorrect use of va_arg
v = (f & 4) ? (DWORD)va_arg(arp, long) : ((d == 'D') ? (DWORD)(long)va_arg(arp, int) : (DWORD)va_arg(arp, unsigned int));
..FATFSsrcff.c(4567): error: #929: incorrect use of va_arg
v = (f & 4) ? (DWORD)va_arg(arp, long) : ((d == 'D') ? (DWORD)(long)va_arg(arp, int) : (DWORD)va_arg(arp, unsigned int));
..FATFSsrcff.c(4567): error: #929: incorrect use of va_arg
v = (f & 4) ? (DWORD)va_arg(arp, long) : ((d == 'D') ? (DWORD)(long)va_arg(arp, int) : (DWORD)va_arg(arp, unsigned int));
..FATFSsrcff.c: 0 warnings, 8 errors
compiling bitstreamf.c...
..AUDIOCODECflacflacdecitstreamf.c(31): error: #5: cannot open source input file "stdbool.h": No such file or directory
#include <stdbool.h>
..AUDIOCODECflacflacdecitstreamf.c: 0 warnings, 1 error
compiling flacdecoder.c...
..AUDIOCODECflacflacdecflacdecoder.c(35): error: #5: cannot open source input file "stdbool.h": No such file or directory
#include <stdbool.h>
..AUDIOCODECflacflacdecflacdecoder.c: 0 warnings, 1 error
"..OBJTEST.axf" - 13 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:09
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
1.是有个头文件找不到导致,
..AUDIOCODECflacflacdecitstreamf.c(31): error: #5: cannot open source input file "stdbool.h": No such file or directory
#include <stdbool.h>
2.usart3.c 这个文件用了可变参数类型导致。
我再研究看看一下吧。
是否你的MDK软件有问题,我能正常编译。
原因应该是ADS1.2和MDK的冲突导致。
由于其他项目开发,本机有装ADS1.2, 刚开始按照网上的方法,设置一个环境变量,没有删除ADS1.2,然后编译了跑马灯的程序,成功,没有问题,下载测试也成功。
但是,编译此综合实验,老是出现上面的错误。看大家的回复,程序应该是编译通过的,所以没有办法,把ADS1.2删除,重启,再编译,通过。以下是编译信息:
Build target 'Test'
compiling main.c...
compiling system_stm32f4xx.c...
compiling delay.c...
compiling sys.c...
compiling usart.c...
compiling led.c...
compiling key.c...
compiling lcd.c...
compiling sram.c...
compiling spi.c...
compiling w25qxx.c...
compiling sdio_sdcard.c...
compiling dcmi.c...
compiling ov2640.c...
compiling sccb.c...
compiling beep.c...
compiling timer.c...
compiling spblcd.c...
compiling 24cxx.c...
compiling myiic.c...
compiling ctiic.c...
compiling ott2001a.c...
compiling ft5206.c...
compiling gt9147.c...
compiling touch.c...
compiling tpad.c...
compiling rtc.c...
compiling adc.c...
compiling i2s.c...
compiling wm8978.c...
compiling ds18b20.c...
compiling lsens.c...
compiling mpu6050.c...
compiling inv_mpu.c...
compiling inv_mpu_dmp_motion_driver.c...
compiling 24l01.c...
compiling remote.c...
compiling usart3.c...
compiling sim900a.c...
compiling lan8720.c...
compiling stm32f4x7_eth.c...
compiling usmart.c...
compiling usmart_config.c...
compiling usmart_str.c...
compiling malloc.c...
compiling diskio.c...
compiling ff.c...
compiling exfuns.c...
compiling fattester.c...
compiling mycc936.c...
compiling fontupd.c...
compiling text.c...
compiling bmp.c...
compiling gif.c...
compiling piclib.c...
compiling tjpgd.c...
compiling spb.c...
compiling common.c...
compiling ebook.c...
compiling picviewer.c...
compiling audioplay.c...
compiling lyric.c...
compiling videoplay.c...
compiling calendar.c...
compiling settings.c...
compiling nesplay.c...
compiling notepad.c...
compiling exeplay.c...
compiling paint.c...
compiling camera.c...
compiling recorder.c...
compiling usbplay.c...
compiling netplay.c...
compiling wirelessplay.c...
compiling calculator.c...
compiling phoneplay.c...
compiling appplay.c...
compiling appplay_remote.c...
compiling appplay_gyro.c...
compiling appplay_wlvideo.c...
compiling smsplay.c...
compiling button.c...
compiling edit.c...
compiling filelistbox.c...
compiling gui.c...
compiling listbox.c...
compiling memo.c...
compiling progressbar.c...
compiling scrollbar.c...
compiling window.c...
compiling os_core.c...
compiling os_flag.c...
compiling os_mbox.c...
compiling os_mem.c...
compiling os_mutex.c...
compiling os_q.c...
compiling os_sem.c...
compiling os_task.c...
compiling os_time.c...
compiling os_tmr.c...
compiling os_cpu_c.c...
compiling wavplay.c...
compiling mp3play.c...
compiling buffers.c...
compiling mp3dec.c...
compiling flacplay.c...
compiling bitstreamf.c...
compiling flacdecoder.c...
compiling tables.c...
compiling apeplay.c...
compiling apedecoder.c...
compiling entropy.c...
compiling filter_16_11.c...
compiling filter_32_10.c...
compiling filter_64_11.c...
compiling parser.c...
compiling predictor.c...
compiling usb_dcd.c...
compiling usb_core.c...
compiling usb_hcd.c...
compiling usb_dcd_int.c...
compiling usb_hcd_int.c...
compiling usbh_core.c...
compiling usbh_hcs.c...
compiling usbh_ioreq.c...
compiling usbh_stdreq.c...
compiling usbh_hid_core.c...
compiling usbh_hid_gamepad.c...
compiling usbh_hid_keybd.c...
compiling usbh_hid_mouse.c...
compiling usbh_msc_bot.c...
compiling usbh_msc_core.c...
compiling usbh_msc_scsi.c...
compiling usbd_core.c...
compiling usbd_ioreq.c...
compiling usbd_req.c...
compiling usbd_msc_bot.c...
compiling usbd_msc_core.c...
compiling usbd_msc_data.c...
compiling usbd_msc_scsi.c...
compiling usb_bsp.c...
compiling usbd_storage_msd.c...
compiling usbd_desc.c...
compiling usbd_usr.c...
compiling usbh_usr.c...
compiling usb_app.c...
compiling avi.c...
compiling mjpeg.c...
compiling jaricom.c...
compiling jcomapi.c...
compiling jutils.c...
compiling jerror.c...
compiling jmemmgr.c...
compiling jdapimin.c...
compiling jdapistd.c...
compiling jdarith.c...
compiling jdmaster.c...
compiling jdinput.c...
compiling jdmarker.c...
compiling jdhuff.c...
compiling jdmainct.c...
compiling jdcoefct.c...
compiling jdpostct.c...
compiling jddctmgr.c...
compiling jidctfst.c...
compiling jidctflt.c...
compiling jidctint.c...
compiling jdsample.c...
compiling jdcolor.c...
compiling jquant2.c...
compiling jquant1.c...
compiling jdmerge.c...
compiling jmemnobs.c...
compiling wrppm.c...
compiling nes_main.c...
compiling nes_ppu.c...
compiling nes_apu.c...
compiling nes_mapper.c...
compiling t9input.c...
compiling pyinput.c...
compiling atk_ncr.c...
compiling lwip_comm.c...
compiling fs.c...
compiling httpd.c...
compiling httpd_cgi_ssi.c...
compiling etharp.c...
compiling ethernetif.c...
compiling autoip.c...
compiling icmp.c...
compiling igmp.c...
compiling inet.c...
compiling inet_chksum.c...
compiling ip.c...
compiling ip_addr.c...
compiling ip_frag.c...
compiling def.c...
compiling dhcp.c...
compiling dns.c...
compiling init.c...
compiling mem.c...
compiling memp.c...
compiling netif.c...
compiling pbuf.c...
compiling raw.c...
compiling stats.c...
compiling tcp.c...
compiling tcp_in.c...
compiling tcp_out.c...
compiling timers.c...
compiling udp.c...
compiling sys_arch.c...
compiling api_lib.c...
compiling api_msg.c...
compiling err.c...
compiling netbuf.c...
compiling netdb.c...
compiling netifapi.c...
compiling sockets.c...
compiling tcpip.c...
compiling misc.c...
compiling stm32f4xx_adc.c...
compiling stm32f4xx_can.c...
compiling stm32f4xx_crc.c...
compiling stm32f4xx_cryp.c...
compiling stm32f4xx_cryp_aes.c...
compiling stm32f4xx_cryp_des.c...
compiling stm32f4xx_cryp_tdes.c...
compiling stm32f4xx_dac.c...
compiling stm32f4xx_dbgmcu.c...
compiling stm32f4xx_dcmi.c...
compiling stm32f4xx_dma2d.c...
compiling stm32f4xx_dma.c...
compiling stm32f4xx_exti.c...
compiling stm32f4xx_flash.c...
compiling stm32f4xx_flash_ramfunc.c...
compiling stm32f4xx_fsmc.c...
compiling stm32f4xx_gpio.c...
compiling stm32f4xx_hash.c...
compiling stm32f4xx_hash_md5.c...
compiling stm32f4xx_hash_sha1.c...
compiling stm32f4xx_i2c.c...
compiling stm32f4xx_iwdg.c...
compiling stm32f4xx_ltdc.c...
compiling stm32f4xx_pwr.c...
compiling stm32f4xx_rcc.c...
compiling stm32f4xx_rng.c...
compiling stm32f4xx_rtc.c...
compiling stm32f4xx_sai.c...
compiling stm32f4xx_sdio.c...
compiling stm32f4xx_spi.c...
compiling stm32f4xx_syscfg.c...
compiling stm32f4xx_tim.c...
compiling stm32f4xx_usart.c...
compiling stm32f4xx_wwdg.c...
linking...
Program Size: Code=442696 RO-data=145616 RW-data=2392 ZI-data=1236832
FromELF: creating hex file...
"..OBJTEST.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:10:09
Load "..\OBJ\TEST.axf"
Error: Flash Download failed - Target DLL has been cancelled
Flash Load finished at 08:02:44
Load "..\OBJ\TEST.axf"
Erase Done.
Programming Done.
Verify OK.
Application running ...
Flash Load finished at 08:04:48
谢谢大家帮助!
一周热门 更多>