Спойлер
Код: Выделить всё
#include <xc.h>
#pragma config FOSC = INTRC_CLKOUT
#pragma config WDTE = OFF
#pragma config PWRTE = ON
#pragma config MCLRE = OFF
#pragma config CP = OFF
#pragma config CPD = OFF
#pragma config BOREN = OFF
#pragma config IESO = OFF
#pragma config LVP = OFF
#pragma config BOR4V = BOR21V
#pragma config WRT = OFF
void main( void )
{
while(1);
}
C standard -> выбрать C 90
XC8 Linker -> Link C Library -> выбрать C90
Я обычно этого не делаю, MPLABX сам подставляет, что нужно, это просто чтобы не выводились предупреждения
Вывод компилятора:
Код: Выделить всё
CLEAN SUCCESSFUL (total time: 81ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'D:/YandexDisk/Electronics/Projects/886/Test.X'
make -f nbproject/Makefile-default.mk dist/default/production/Test.X.production.hex
make[2]: Entering directory 'D:/YandexDisk/Electronics/Projects/886/Test.X'
"C:\Program Files\Microchip\xc8\v2.32\bin\xc8-cc.exe" -mcpu=16F886 -c -mdfp="C:/Program Files/Microchip/MPLABX/v5.50/packs/Microchip/PIC16Fxxx_DFP/1.2.33/xc8" -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=default -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c90 -gdwarf-3 -mstack=compiled:auto:auto -o build/default/production/main.p1 main.c
"C:\Program Files\Microchip\xc8\v2.32\bin\xc8-cc.exe" -mcpu=16F886 -Wl,-Map=dist/default/production/Test.X.production.map -DXPRJ_default=default -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="C:/Program Files/Microchip/MPLABX/v5.50/packs/Microchip/PIC16Fxxx_DFP/1.2.33/xc8" -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c90 -gdwarf-3 -mstack=compiled:auto:auto -Wl,--memorysummary,dist/default/production/memoryfile.xml -o dist/default/production/Test.X.production.elf build/default/production/main.p1
Non line specific message::: advisory: (1492) using updated 32-bit floating-point libraries; improved accuracy might increase code size
Memory Summary:
Program space used Bh ( 11) of 2000h words ( 0.1%)
Data space used 2h ( 2) of 170h bytes ( 0.5%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 2h ( 2) of 2h words (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)
make[2]: Leaving directory 'D:/YandexDisk/Electronics/Projects/886/Test.X'
make[1]: Leaving directory 'D:/YandexDisk/Electronics/Projects/886/Test.X'
BUILD SUCCESSFUL (total time: 2s)
Loading code from D:/YandexDisk/Electronics/Projects/886/Test.X/dist/default/production/Test.X.production.hex...
Program loaded with pack,PIC16Fxxx_DFP,1.2.33,Microchip
Loading completed
Там все подробно расписано. Еще по битам конфигурации здесь:
https://microchipdeveloper.com/mplabx:v ... ation-bits
и в файлах 16f886.cfgmap и 16f886.cfgdata
Сделал всё, как вы писали, на время сборки повлияло отрицательно. Три минуты теперь, вместо двух.
Код: Выделить всё
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Mplab/Project/886_2.X'
make -f nbproject/Makefile-default.mk dist/default/production/886_2.X.production.hex
make[2]: Entering directory 'C:/Mplab/Project/886_2.X'
"C:\Program Files\Microchip\xc8\v2.36\bin\xc8-cc.exe" -mcpu=16F886 -c -mdfp="C:/Program Files/Microchip/MPLABX/v6.00/packs/Microchip/PIC16Fxxx_DFP/1.3.42/xc8" -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=default -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits -mc90lib -std=c90 -gdwarf-3 -mstack=compiled:auto:auto -o build/default/production/main.p1 main.c
"C:\Program Files\Microchip\xc8\v2.36\bin\xc8-cc.exe" -mcpu=16F886 -Wl,-Map=dist/default/production/886_2.X.production.map -DXPRJ_default=default -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="C:/Program Files/Microchip/MPLABX/v6.00/packs/Microchip/PIC16Fxxx_DFP/1.3.42/xc8" -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits -mc90lib -std=c90 -gdwarf-3 -mstack=compiled:auto:auto -Wl,--memorysummary,dist/default/production/memoryfile.xml -o dist/default/production/886_2.X.production.elf build/default/production/main.p1
Non line specific message::: advisory: (1492) using updated 32-bit floating-point libraries; improved accuracy might increase code size
:3558:: warning: (1311) missing configuration setting for config word 0x2007; using default
:3558:: warning: (1311) missing configuration setting for config word 0x2008; using default
Memory Summary:
Program space used Bh ( 11) of 2000h words ( 0.1%)
Data space used 2h ( 2) of 170h bytes ( 0.5%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 2h ( 2) of 2h words (100.0%)
ID Location space used 4h ( 4) of 4h bytes (100.0%)
make[2]: Leaving directory 'C:/Mplab/Project/886_2.X'
make[1]: Leaving directory 'C:/Mplab/Project/886_2.X'
BUILD SUCCESSFUL (total time: 2m 46s)
Loading code from C:/Mplab/Project/886_2.X/dist/default/production/886_2.X.production.hex...
Program loaded with pack,PIC16Fxxx_DFP,1.3.42,Microchip
Loading completed