编译问题

[复制链接]
2491|4
 楼主| ljm041128 发表于 2011-10-10 12:18 | 显示全部楼层 |阅读模式
MPLINK 4.38, Linker
Copyright (c) 1998-2010 Microchip Technology Inc.
Error - Device not specified. Use /p option to specify a device.
Errors    : 1

什么原因?
yewuyi 发表于 2011-10-10 12:45 | 显示全部楼层
用的ASM吗?

应该是没有指定芯片型号或者是没有包含该型号的头文件造成的吧。
Ryanhsiung 发表于 2011-12-9 18:09 | 显示全部楼层
今天升级版本后也遇到这个问题,你是不是也换版本了!或者是其他人得程序考过来的?
找了好久找到解决办法了!
  列一下我知道的原因和解决办法
  1、目录不对,选择正确的目录
  2、器件不对,选择正确的器件
  3、以下是我从microchip官方论坛COPY,我是这么解决的!
   
mplink.exe should be selected in the IDE (It will in turn call _mplink.exe). IDE should be supplying the device name to the linker (with /p option) when it invokes the linker. In your case it is not happening for some reason.  

Try using 'Restore Defaults' in 'MPLINK Linker' tab  of Project Build Options (Project>Build Options> Project).

If that doesn't help, then check the 'Use alternate setting' check-box and add  /p18F458 to the option string below the check-box.

Regards.

In case this problem has not yet been solved, or if it has then perhaps this will just serve as reference. The work around is as follows:

In MPLAB IDE go to Project->Build Options->Project. Under MPLINK Linker, tick Use Alternate Settings then add the linker option /pxxxxx (device type). See the script below:
/m"$(BINDIR_)$(TARGETBASE).map" /w /p18F67j60 /o"$(BINDIR_)$(TARGETBASE).cof"

Cheers...



  3、
369794732 发表于 2011-12-9 20:16 | 显示全部楼层
浙江好玩吗?你帮人家升级完了?
Ryanhsiung 发表于 2011-12-9 23:01 | 显示全部楼层
4# 369794732
.....还没,不是很顺利!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

130

主题

454

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部