Helpful ReplyHot!MPLABX v4.20 + XC8 v2.00: -mcpu option doesn't seem to be recognized by the compiler

Author
aschen0866
Super Member
  • Total Posts : 4356
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
2018/07/07 12:46:18 (permalink)
0

MPLABX v4.20 + XC8 v2.00: -mcpu option doesn't seem to be recognized by the compiler

The generated make file uses -mcpu=$(MP_PROCESSOR_OPTION) to specify the processor type. However, XC8 v2.00 doesn't seem to recognize this option, hence giving error

(902) no chip name specified; use "PICC --CHIPINFO" to see available chip names

If the same project  built within MPLABX v4.15, which still uses the old --chip=$(MP_PROCESSOR_OPTION), then the project builds successfully with v2.00.
 
Is this a IDE/compiler bug or am I missing anything in the project settings?
 
#1
davekw7x
Entropy++
  • Total Posts : 1572
  • Reward points : 0
  • Joined: 2012/01/16 12:01:07
  • Location: Left Coast, USA
  • Status: offline
Re: MPLABX v4.20 + XC8 v2.00: -mcpu option doesn't seem to be recognized by the compiler 2018/07/08 00:43:47 (permalink) ☄ Helpfulby wheresbicki 2018/11/01 07:29:28
+7 (7)
aschen0866
...error
 
(902) no chip name specified; use "PICC --CHIPINFO" to see available chip names
 
 



I get this error when it is using xc8 rather than xc8-cc.  (That's xc8.exe, xc8-cc.exe for Windows users)
Go to Tools->Options->Embedded->Build Tools and look at the Compiler and Assembler settings for XC8 (v2.00).  If they are for xc8, change them to xc8-cc.  (You might try clicking the "Remove" button for XC8 (v2.00) and then clicking the "Scan for Build Tools" to see if it will come up with xc8-cc on its own.  If not, make the changes manually.)
 
You may have to change the Standard setting in the Project->XC8 Global Options box to C90 and back to c99 to see the effect of the new setting when you re-compile.  (Maybe even exit the IDE and restart.)
 
Bottom line: Once I got it to use xc8-cc, things went smoothly.
 
Regards,

Dave
post edited by davekw7x - 2018/07/08 01:02:52

Sometimes I just can't help myself...
#2
aschen0866
Super Member
  • Total Posts : 4356
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: MPLABX v4.20 + XC8 v2.00: -mcpu option doesn't seem to be recognized by the compiler 2018/07/08 06:49:58 (permalink)
0
davekw7x
 
Go to Tools->Options->Embedded->Build Tools and look at the Compiler and Assembler settings for XC8 (v2.00).  If they are for xc8, change them to xc8-cc.  ...


Thanks. That fixes the problem.
#3
Antonio_2706
Starting Member
  • Total Posts : 72
  • Reward points : 0
  • Joined: 2016/07/07 06:45:37
  • Location: 0
  • Status: offline
Re: MPLABX v4.20 + XC8 v2.00: -mcpu option doesn't seem to be recognized by the compiler 2018/08/15 09:14:46 (permalink) ☄ Helpfulby wheresbicki 2018/11/01 07:29:25
+1 (1)
Hello Guys, 
I have the same problem 
 
I manage to change the XC8 with XC8-cc. I have also closed and restart. I still have the problem
 
However i can not do this  Project->XC8 Global Options box to C90 and back to c99 to see the effect of the new setting when you re-compile.  (Maybe even exit the IDE and restart.)
 
Thank you for your help 
Cordially 
Antonio 
#4
mbrowning
Just a Member
  • Total Posts : 1126
  • Reward points : 0
  • Joined: 2005/03/16 14:32:56
  • Location: Melbourne, FL
  • Status: online
Re: MPLABX v4.20 + XC8 v2.00: -mcpu option doesn't seem to be recognized by the compiler 2018/08/15 10:48:17 (permalink)
+2 (2)
Antonio_2706
However i can not do this  Project->XC8 Global Options box to C90 and back to c99 to see the effect of the new setting when you re-compile.  (Maybe even exit the IDE and restart.)

Which version of MPLAB-X are you using? Prior to 4.20 this option box isn't available.
 

Go Navy! Beat Army!
#5
Antonio_2706
Starting Member
  • Total Posts : 72
  • Reward points : 0
  • Joined: 2016/07/07 06:45:37
  • Location: 0
  • Status: offline
Re: MPLABX v4.20 + XC8 v2.00: -mcpu option doesn't seem to be recognized by the compiler 2018/08/16 01:42:43 (permalink)
0
Hello I am using 5.0 too and It works now I changed from 99 to 90. 
 
Thanks 
Antonio 
#6
COSMOTRON
electronic engineer
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2018/02/23 18:21:07
  • Location: 0
  • Status: offline
Re: MPLABX v4.20 + XC8 v2.00: -mcpu option doesn't seem to be recognized by the compiler 2018/10/21 05:40:08 (permalink)
0
Hi, I had the same problem too, but I solved it uninstalling compilers all versions and installing again only last version.
#7
Jump to:
© 2018 APG vNext Commercial Version 4.5