Raimo I'm testing to add ASM within C by XC8 on MPLAB X but it gives Unable to resolve errors when ASM is included.
#Mplab xc8 c instruction set plus
Plus all the other messages - basically one per each of your assembly in-lines. Once you understand what you did wrong, you should also understand the message "Unable to resolve identifier BTFSS".
#Mplab xc8 c instruction set series
What in xc8.h led you to believe that "the device is not supported" ? You are right, XC8 UG says: It supports all 8-bit PIC microcontrollers: PIC10, PIC12, PIC16 and PIC18 series devices The reason was error message in MPLAB, it says "Unable to resolve identifier BTFSS" for example. Hint: risk an eye on ric's profile ! raimo 3# You were on the wrong track here, as your problem has nothing to do with the header file. The main problem is missing asm support, the system does not regonize asm commands listed in the part specification. I believe that you cant help if you do not have experience of similar setup with PIC16 series. raimo 2# Do you think it might help if you showed the exact errors generated? Sure, screenshots are added, errors are described below. " - just with you frivolously ignoring the requirements of the new XC8/AS package. ric was only slightly off: it's And no - it has absolutely nothing to do with ".is missing asm support. Actually the compiler does not give error about #asm or #endasm directives. See: "inline asm" at Couldn't find it on the document linked. Raimo Thank you for the comments, below answers for them: 1# You are using XC8 version 2.xx in C99 mode, which no longer supports the "#asm" syntax. 3# You were on the wrong track here, as your problem has nothing to do with the header file. 2# Do you think it might help if you showed the exact errors generated? Sure, screenshots are added, errors are described below.
Thank you for the comments, below answers for them: 1# You are using XC8 version 2.xx in C99 mode, which no longer supports the "#asm" syntax. * Initialize I/O and Peripherals for application */ OSCFRQbits.HFFRQ = 0b0011 // HFINTOSC = 4 MHzīTFSS OSCCON3,NOSCR // Wait until NOSCR is set * Configure the oscillator for the device */ What I'm doing wrong, MPLAB X IDE is 5.50 and XC8 v2.32, both fresh installations? From xc.h file I can see that the device is not supported but on other hand, including the device header file pic16f18345.h does not help either. I'm testing to add ASM within C by XC8 on MPLAB X but it gives Unable to resolve errors when ASM is included. ASM support for PIC16F18345 device missing on XC8