Page 1 of 3

Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 2:24 pm
by RKP
David,

Here is a screenshot of the error I receive when using the Microchip 16 compiler in the Firewing IDE.

Firewing version 1.0.0.3 (B6), MPLAB version 8.92 and compiler XC16 version 1.20.

MC16.jpg
MC16.jpg (148.98 KiB) Viewed 65314 times


It is probably on my end but I will try with MPLAB X

keith

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 2:32 pm
by David John Barker
RCOUNT is a core 24 series register (SFR) and the Firewing delay() routines use it extensively. Is it building correctly with Firewing 16? If it is, there is more than likely something wrong with you XC16 installation, as the file passed to Firewing 16 and Microchip 16 are exactly the same. I'm using XC16 1.11.

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 3:00 pm
by David John Barker
I've just installed XC16 1.20 and get the same error as you - looks like Microchip have either made a mistake or renamed their SFR asm names. I'll try and take a look later...

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 6:04 pm
by RKP
Yes David, it appears that Firewing has been Microchipped.

I was finally able to find the older version of XC16 V1.11 and it works as expected.

Thanks, for looking into this MC "feature" not sure I would call it an insect.
No need to look into it further, unless of course you want to.
Using XC16 version 1.11 is a suitable work around.

Keith

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 6:29 pm
by David John Barker
Yes, 1.20 is definitely different. However, I'm hoping to have a fix later today...

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 8:58 pm
by Jerry Messina
The changes to the toolsuite and XC16 v1.20 worked ok for me with larger settings of delayus() and delayms(),
but I still get the GCC error "unknown register name '_RCOUNT' in 'asm' when I use a small immediate value
as the parameter, such as

Code: Select all
delayus(1)

I guess this might be because the code is generated inline vs using the _Delay32() macro found in macros_delay.h ?

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 9:09 pm
by David John Barker
I've uploaded a new toolsuite which you can download from here

http://www.firewing.info/pmwiki.php?n=FirewingUser.XC16Toolsuite

You should also download the latest Firewing BETA from here:

http://www.firewing.info/pmwiki.php?n=Firewing.Download

which should enable you to use XC16 1.20. Please let me know if this fixes the problem for you.

TIP

You can install multiple versions of XC16 (I have 1.0, 1.11 and now 1.20) on a PC. You can get the Microchip 16 toolsuite to point to any installed version, rather than just using the most recently installed. To do this, create an *.ini file in your "Microchip16" toolsuite folder and call it "tsMicrochip16.ini". Then have the following entries:

Code: Select all
[application]
Name=Microchip XC16 1.20
Path=C:\Program Files\Microchip\xc16\v1.20\bin
GCC=xc16-gcc.exe
GCCBinToHex=xc16-bin2hex.exe


the path setting can be used to point to different installations - don't forget to update the "Name" attribute to reflect a different version number.

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 9:16 pm
by David John Barker
Sorry about this, I'm still seeing the same problem with some code - it's the clobber list with some other macros - I will look into it in more detail tomorrow, it's getting late here - time for a drink I think ;)

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 9:35 pm
by Jerry Messina
Not a bad idea... think I might also.

One other thing I noticed w/1003 B7 is that the IDE toolsuite and target selections don't seem to be saved,
and always revert to the default.

I don't think it used to do this, but I could be wrong.

Re: Error when using Microchip 16 compiler

PostPosted: Sat Dec 14, 2013 9:45 pm
by David John Barker
I'll check it out also...