Hot!Why 32x32 multiply does not use HW Multiplier in XC8?

Author
imadak
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/22 20:45:43
  • Location: Sapporo, Japan
  • Status: offline
2018/04/16 09:32:53 (permalink)
0

Why 32x32 multiply does not use HW Multiplier in XC8?

I'm using PIC18LF67K40 and XC8 v1.45B.
I found that __wmul() in Umul16.c does not use HW multiplier.
Umul16.c does not detect "_PIC18" but main.c does.
Am I doing any wrong settings?
 
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I changed this title.
Previous title is "Why 16x16 multiply does not use HW Multiplier in XC8?"
post edited by imadak - 2018/04/16 18:41:55

Attached Image(s)

#1
jtemples
Super Member
  • Total Posts : 10689
  • Reward points : 0
  • Joined: 2004/02/13 12:31:19
  • Location: Southern California
  • Status: offline
Re: Why 16x16 multiply does not use HW Multiplier in XC8? 2018/04/16 10:05:03 (permalink)
+2 (2)
I found that __wmul() in Umul16.c does not use HW multiplier.

 
Why do you think that?
 
   188  007FDA                     ___wmul:
   189                              opt stack 30
   190
   191                           ;incstack = 0
   192  007FDA  5001                movf    ___wmul@multiplier,w,c
   193  007FDC  0203                mulwf   ___wmul@multiplicand,c
   194  007FDE  CFF3 F005           movff   prodl,___wmul@product
   195  007FE2  CFF4 F006           movff   prodh,___wmul@product+1
   196  007FE6  5001                movf    ___wmul@multiplier,w,c
   197  007FE8  0204                mulwf   ___wmul@multiplicand+1,c
   198  007FEA  50F3                movf    prodl,w,c
   199  007FEC  2606                addwf   ___wmul@product+1,f,c
   200  007FEE  5002                movf    ___wmul@multiplier+1,w,c
   201  007FF0  0203                mulwf   ___wmul@multiplicand,c
   202  007FF2  50F3                movf    prodl,w,c
   203  007FF4  2606                addwf   ___wmul@product+1,f,c
   204  007FF6  C005  F001          movff   ___wmul@product,?___wmul
   205  007FFA  C006  F002          movff   ___wmul@product+1,?___wmul+1
   206  007FFE  0012                return      ;funcret
   207  008000                     __end_of___wmul:

#2
imadak
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/22 20:45:43
  • Location: Sapporo, Japan
  • Status: offline
Re: Why 16x16 multiply does not use HW Multiplier in XC8? 2018/04/16 10:49:25 (permalink)
0
Thanks!
I checked again now and you are right.
It may my misunderstanding.
 
How about __lmul()?
 
14: unsigned long
15: __lmul(unsigned long multiplier, unsigned long multiplicand)
16: {
17: unsigned long product;
18:
19: #define LOWBYTE(x) (*(unsigned char *)(&x))
20: #define LMIDBYTE(x) (*(((unsigned char *)(&x))+1))
21: #define HMIDBYTE(x) (*(((unsigned char *)(&x))+2))
22: #define HIGHBYTE(x) (*(((unsigned char *)(&x))+3))
23:
24: #if (_Has_hardware_multiply || _Has_large_call_stack) && defined(__OPTIMIZE_SPEED__)
25: {
26:
27: #define USE_SHRINK
28:
29: /*
30: a 32-bit multiply can be decomposed into the sum of ten 8-bit multiplies
31: a b c d
32: * e f g h
33: -----------------------
34: | dh
35: | ch 0
36: | bh 0 0
37: |ah 0 0 0
38: | dg 0
39: | cg 0 0
40: |bg 0 0 0
41: ag| 0 0 0 0 (we ignore this intermediate product
42: because it does not affect the low 32 bits of the result)
43: | df 0 0
44: |cf 0 0 0
45: bf| 0 0 0 0 (ignore)
46: af 0| 0 0 0 0 (ignore)
47: |de 0 0 0
48: ce| 0 0 0 0 (ignore)
49: be 0| 0 0 0 0 (ignore)
50: + ae 0 0| 0 0 0 0 (ignore)
51: =======================
52: */
53: product = (unsigned int)LOWBYTE(multiplier) * LOWBYTE(multiplicand);
54:
55: #if defined(USE_MASKS)
56: product += ((unsigned long)
57: ((unsigned int)LOWBYTE(multiplier) * LMIDBYTE(multiplicand))
58: +
59: ((unsigned int)LMIDBYTE(multiplier) * LOWBYTE(multiplicand)))
60: << 8;
61:
62: product += ((unsigned long)
63: ((unsigned int)LOWBYTE(multiplier) * HMIDBYTE(multiplicand))
64: +
65: ((unsigned int)LMIDBYTE(multiplier) * LMIDBYTE(multiplicand))
66: +
67: ((unsigned int)HMIDBYTE(multiplier) * LOWBYTE(multiplicand)))
68: << 16;
69:
70: /* cast to smaller type to avoid adding high bits just to discard */
71: product += ((unsigned long)
72: (unsigned char)
73: ((unsigned int)LOWBYTE(multiplier) * HIGHBYTE(multiplicand))
74: +
75: (unsigned char)
76: ((unsigned int)LMIDBYTE(multiplier) * HMIDBYTE(multiplicand))
77: +
78: (unsigned char)
79: ((unsigned int)HMIDBYTE(multiplier) * LMIDBYTE(multiplicand))
80: +
81: (unsigned char)
82: ((unsigned int)HIGHBYTE(multiplier) * LOWBYTE(multiplicand)))
83: << 24;
84:
85: #elif defined(USE_SHRINK)
86: /* add direct to upper bytes, rather than shift and add all bytes */
87: *((unsigned short long*)(((unsigned char*)&product)+1)) +=
88: ((unsigned int)LOWBYTE(multiplier) * LMIDBYTE(multiplicand));
89: *((unsigned short long*)(((unsigned char*)&product)+1)) +=
90: ((unsigned int)LMIDBYTE(multiplier) * LOWBYTE(multiplicand));
91:
92:
93: *((unsigned int*)(((unsigned char*)&product)+2)) +=
94: ((unsigned int)LOWBYTE(multiplier) * HMIDBYTE(multiplicand));
95: *((unsigned int*)(((unsigned char*)&product)+2)) +=
96: ((unsigned int)LMIDBYTE(multiplier) * LMIDBYTE(multiplicand));
97: *((unsigned int*)(((unsigned char*)&product)+2)) +=
98: ((unsigned int)HMIDBYTE(multiplier) * LOWBYTE(multiplicand));
99:
100: *(((unsigned char*)&product)+3) +=
101: (unsigned char)
102: ((unsigned int)LOWBYTE(multiplier) * HIGHBYTE(multiplicand));
103: *(((unsigned char*)&product)+3) +=
104: (unsigned char)
105: ((unsigned int)LMIDBYTE(multiplier) * HMIDBYTE(multiplicand));
106: *(((unsigned char*)&product)+3) +=
107: (unsigned char)
108: ((unsigned int)HMIDBYTE(multiplier) * LMIDBYTE(multiplicand));
109: *(((unsigned char*)&product)+3) +=
110: (unsigned char)
111: ((unsigned int)HIGHBYTE(multiplier) * LOWBYTE(multiplicand));
112:
113: #else
114: #error No method chosen
115: #endif
116: }
117: #else
118:
119: product = 0;
11B00 0E00 MOVLW 0x0
11B02 0101 MOVLB 0x1
11B04 6FFA MOVWF 0xFA, BANKED
11B06 0E00 MOVLW 0x0
11B08 6FFB MOVWF 0xFB, BANKED
11B0A 0E00 MOVLW 0x0
11B0C 6FFC MOVWF 0xFC, BANKED
11B0E 0E00 MOVLW 0x0
11B10 6FFD MOVWF 0xFD, BANKED
120: do {
121: if(multiplier & 1)
11B12 A1F2 BTFSS 0xF2, 0, BANKED
11B14 D008 BRA 0x1B26
122: product += multiplicand;
11B16 51F6 MOVF 0xF6, W, BANKED
11B18 27FA ADDWF 0xFA, F, BANKED
11B1A 51F7 MOVF 0xF7, W, BANKED
11B1C 23FB ADDWFC 0xFB, F, BANKED
11B1E 51F8 MOVF 0xF8, W, BANKED
11B20 23FC ADDWFC 0xFC, F, BANKED
11B22 51F9 MOVF 0xF9, W, BANKED
11B24 23FD ADDWFC 0xFD, F, BANKED
123: multiplicand <<= 1;
11B26 90D8 BCF STATUS, 0, ACCESS
11B28 37F6 RLCF 0xF6, F, BANKED
11B2A 37F7 RLCF 0xF7, F, BANKED
11B2C 37F8 RLCF 0xF8, F, BANKED
11B2E 37F9 RLCF 0xF9, F, BANKED
124: multiplier >>= 1;
11B30 90D8 BCF STATUS, 0, ACCESS
11B32 33F5 RRCF 0xF5, F, BANKED
11B34 33F4 RRCF 0xF4, F, BANKED
11B36 33F3 RRCF 0xF3, F, BANKED
11B38 33F2 RRCF 0xF2, F, BANKED
125: } while(multiplier != 0);
11B3A 51F2 MOVF 0xF2, W, BANKED
11B3C 11F3 IORWF 0xF3, W, BANKED
11B3E 11F4 IORWF 0xF4, W, BANKED
11B40 11F5 IORWF 0xF5, W, BANKED
11B42 A4D8 BTFSS STATUS, 2, ACCESS
11B44 D7E6 BRA 0x1B12
126:
127: #endif
128: return product;
11B46 C1FA MOVFF product, __pcstackBANK1
11B48 F1F2 NOP
11B4A C1FB MOVFF 0x1FB, d
11B4C F1F3 NOP
11B4E C1FC MOVFF c, text
11B50 F1F4 NOP
11B52 C1FD MOVFF d, 0x1F5
11B54 F1F5 NOP
129: }
11B56 0012 RETURN 0

#3
jtemples
Super Member
  • Total Posts : 10689
  • Reward points : 0
  • Joined: 2004/02/13 12:31:19
  • Location: Southern California
  • Status: offline
Re: Why 16x16 multiply does not use HW Multiplier in XC8? 2018/04/16 12:41:54 (permalink)
+2 (2)
How about __lmul()?

 
Using the hardware multiplier requires more code space in this case.  Use --opt=speed and you will get faster (but larger) code which uses the multiplier.
#4
mlp
boots too small
  • Total Posts : 554
  • Reward points : 0
  • Joined: 2012/09/10 15:12:07
  • Location: previously Microchip XC8 team
  • Status: offline
Re: Why 16x16 multiply does not use HW Multiplier in XC8? 2018/04/16 13:31:00 (permalink)
+3 (3)
jtemples
How about __lmul()?

 
Using the hardware multiplier requires more code space in this case.  Use --opt=speed and you will get faster (but larger) code which uses the multiplier.


In some of those source files you'll see the different variants I benchmarked to compare size and speed; the explicit selection of a variant (e.g. `#define USE_SHRINK`) was done after we determined which would be of most benefit. The comments (if I recall correctly) document the total number of 8x8 multiplies, 8-bit shifts, and 8-bit additions each variant requires.

Mark (this opinion available for hire)
#5
Gort2015
Klaatu Barada Nikto
  • Total Posts : 2265
  • Reward points : 0
  • Joined: 2015/04/30 10:49:57
  • Location: 0
  • Status: offline
Re: Why 16x16 multiply does not use HW Multiplier in XC8? 2018/04/16 13:42:32 (permalink)
+1 (1)
Why not get a 16bit chip, it multiplies in one cycle.
Plus you can divide in a few cycles.
 
#define FRAC (90 / 512 * 65536)
int pos = 200;
long angle = pos * FRAC >> 16;

MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
https://www.youtube.com/watch?v=Iu1qa8N2ID0
+ ST:Continues, "What Ships are Made for", Q's back.
#6
imadak
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/22 20:45:43
  • Location: Sapporo, Japan
  • Status: offline
Re: Why 16x16 multiply does not use HW Multiplier in XC8? 2018/04/16 18:39:15 (permalink)
0
Current compiler options are "-P -N255 --warn=-3 --asmlist --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=free"
 
but __OPTIMIZE_SPEED__ is not defined and loop&shift are used in lmul().
It is desabled in Free mode?
#7
jtemples
Super Member
  • Total Posts : 10689
  • Reward points : 0
  • Joined: 2004/02/13 12:31:19
  • Location: Southern California
  • Status: offline
Re: Why 16x16 multiply does not use HW Multiplier in XC8? 2018/04/16 18:52:42 (permalink)
0
Some optimizations are disabled in free mode, but I don't know which ones.  The output of the compiler might tell you when you try to use a PRO optimization.
#8
imadak
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/22 20:45:43
  • Location: Sapporo, Japan
  • Status: offline
Re: Why 16x16 multiply does not use HW Multiplier in XC8? 2018/04/16 19:18:18 (permalink)
0
Thanks.
I could not find any hint by select to PRO.
 
make -f nbproject/Makefile-XC8_18F67K40.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/myname/OneDrive/Documents/BTKB/Software/BTKB.X'
make -f nbproject/Makefile-XC8_18F67K40.mk dist/XC8_18F67K40/production/BTKB.X.production.hex
make[2]: Entering directory 'C:/Users/myname/OneDrive/Documents/BTKB/Software/BTKB.X'
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/interrupts.p1 interrupts.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/main.p1 main.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/eusart2.p1 eusart2.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/sw.p1 sw.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/adcc.p1 adcc.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/user.p1 user.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/system.p1 system.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/configuration_bits.p1 configuration_bits.c
main.c:101: warning: (359) illegal conversion between pointer types
pointer to const unsigned char -> pointer to unsigned char
main.c:110: warning: (373) implicit signed to unsigned conversion
main.c:111: warning: (373) implicit signed to unsigned conversion
main.c:112: warning: (373) implicit signed to unsigned conversion
main.c:113: warning: (373) implicit signed to unsigned conversion
main.c:114: warning: (373) implicit signed to unsigned conversion
user.c:46: warning: (373) implicit signed to unsigned conversion
user.c:49: warning: (373) implicit signed to unsigned conversion
user.c:63: warning: (373) implicit signed to unsigned conversion
sw.c:345: warning: (373) implicit signed to unsigned conversion
sw.c:356: warning: (373) implicit signed to unsigned conversion
sw.c:361: warning: (373) implicit signed to unsigned conversion
sw.c:426: warning: (373) implicit signed to unsigned conversion
sw.c:459: warning: (373) implicit signed to unsigned conversion
sw.c:468: warning: (373) implicit signed to unsigned conversion
sw.c:510: warning: (373) implicit signed to unsigned conversion
sw.c:511: warning: (373) implicit signed to unsigned conversion
sw.c:561: warning: (373) implicit signed to unsigned conversion
sw.c:576: warning: (373) implicit signed to unsigned conversion
user.c:284: warning: (373) implicit signed to unsigned conversion
user.c:299: warning: (373) implicit signed to unsigned conversion
user.c:348: warning: (373) implicit signed to unsigned conversion
user.c:349: warning: (373) implicit signed to unsigned conversion
user.c:350: warning: (373) implicit signed to unsigned conversion
user.c:351: warning: (373) implicit signed to unsigned conversion
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/eusart5.p1 eusart5.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/FT230X.p1 FT230X.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/RN42.p1 RN42.c
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --pass1 --chip=18LF67K40 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/XC8_18F67K40/production/ringBuffer.p1 ringBuffer.c
RN42.c:130: warning: (373) implicit signed to unsigned conversion
RN42.c:131: warning: (373) implicit signed to unsigned conversion
RN42.c:132: warning: (373) implicit signed to unsigned conversion
FT230X.c:29: warning: (373) implicit signed to unsigned conversion
FT230X.c:30: warning: (373) implicit signed to unsigned conversion
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --chip=18LF67K40 -G -mdist/XC8_18F67K40/production/BTKB.X.production.map --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,+speed,-space,-debug,-local --addrqual=ignore --mode=pro -P -N255 --warn=-3 --asmlist -DXPRJ_XC8_18F67K40=XC8_18F67K40 --summary=default,-psect,-class,+mem,-hex,-file --codeoffset=0x800 --errata=+NVMREG --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --memorysummary dist/XC8_18F67K40/production/memoryfile.xml -odist/XC8_18F67K40/production/BTKB.X.production.elf build/XC8_18F67K40/production/configuration_bits.p1 build/XC8_18F67K40/production/interrupts.p1 build/XC8_18F67K40/production/main.p1 build/XC8_18F67K40/production/system.p1 build/XC8_18F67K40/production/user.p1 build/XC8_18F67K40/production/sw.p1 build/XC8_18F67K40/production/adcc.p1 build/XC8_18F67K40/production/eusart2.p1 build/XC8_18F67K40/production/eusart5.p1 build/XC8_18F67K40/production/FT230X.p1 build/XC8_18F67K40/production/RN42.p1 build/XC8_18F67K40/production/ringBuffer.p1
Microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45 (B)
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

:: warning: (1273) Omniscient Code Generation not available in Free mode
ringBuffer.c:11: advisory: (1510) non-reentrant function "_bufWrite" appears in multiple call graphs and has been duplicated by the compiler
C:\Program Files (x86)\Microchip\xc8\v1.45\sources\common\Umul16.c:15: advisory: (1510) non-reentrant function "___wmul" appears in multiple call graphs and has been duplicated by the compiler
user.c:277: warning: (520) function "_GetSW2" is never called
user.c:292: warning: (520) function "_GetChgState" is never called
FT230X.c:25: warning: (520) function "_showHex2" is never called
FT230X.c:34: warning: (520) function "_showHex4" is never called
FT230X.c:45: warning: (520) function "_showState" is never called
RN42.c:117: warning: (520) function "_switchHost" is never called
RN42.c:173: warning: (520) function "_putText" is never called

Memory Summary:
    Program space used 274Bh ( 10059) of 1E400h bytes ( 8.1%)
    Data space used 1C3h ( 451) of DE9h bytes ( 12.7%)
    Configuration bits used 6h ( 6) of 6h words (100.0%)
    EEPROM space used 0h ( 0) of 400h bytes ( 0.0%)
    ID Location space used 10h ( 16) of 10h bytes (100.0%)
    Data stack space used 0h ( 0) of C00h bytes ( 0.0%)


You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.

make[2]: Leaving directory 'C:/Users/myname/OneDrive/Documents/BTKB/Software/BTKB.X'
make[1]: Leaving directory 'C:/Users/myname/OneDrive/Documents/BTKB/Software/BTKB.X'

BUILD SUCCESSFUL (total time: 6s)
Loading code from C:/Users/myname/OneDrive/Documents/BTKB/Software/BTKB.X/dist/XC8_18F67K40/production/BTKB.X.production.hex...
Loading completed

#9
Jump to:
© 2018 APG vNext Commercial Version 4.5