Hi everyone. I am currently developing a Windows app that requires SDCC/GPUtils to be portable ( ie , no installation, just run directly using the path)The SDCC is OK and generates the necessary asm file . It calls gpasm successfully but gpasm seems lost and cannot find the include file ( ie p16f887.inc) . There are different errors in PIC16 & PIC18 .What seems to be missing? I have tested it using the cmd command line only interface. Kindly see below some info:
.................
C:\Users\Nic\PIC14>path
PATH=c:\users\nic\gputils\bin;c:\users\nic\gputils\header;c:\users\nic\gputils\lkr;c:\users\nic\sdcc\bin
C:\Users\Nic\PIC14>sdcc --use-non-free --verbose -mpic14 -p16f887 test8871.c
Processor: 16f887
Using devices from c:\users\nic\sdcc\bin..\include\pic14\pic14devices.txt.
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -std=c11 -D__SDCC_PROCESSOR="16f887" -D__SDCC_PIC16F887 -D__SDCC_PIC14_STACK_SIZE=14 -obj-ext=.o -D__SDCC_CHAR_UNSIGNED -D__SDCC_USE_NON_FREE -D__SDCC=4_0_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=0 -D__SDCC_VERSION_PATCH=0 -D__SDCC_REVISION=11528 -D__SDCC_pic14 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__STDC_UTF_16__=1 -D__STDC_UTF_32__=1 -isystem "c:\users\nic\sdcc\bin..\include\pic14" -isystem "c:\users\nic\sdcc\bin..\include" -isystem "c:\users\nic\sdcc\bin..\non-free\include\pic14" -isystem "c:\users\nic\sdcc\bin..\non-free\include" "test8871.c"
sdcc: Generating code...
sdcc: Calling assembler...
sdcc: gpasm -o "test8871.o" -c "test8871".asm
test8871.asm:11:Error[105] Cannot open file. Include file "p16f887.inc" not found.
test8871.asm:14:Error[113] Symbol not previously defined: "_CONFIG1"
test8871.asm:413:Error[113] Symbol not previously defined: "STATUS"
test8871.asm:421:Error[113] Symbol not previously defined: "STATUS"
test8871.asm:429:Error[113] Symbol not previously defined: "STATUS"
test8871.asm:537:Error[113] Symbol not previously defined: "STATUS"
test8871.asm:545:Error[113] Symbol not previously defined: "STATUS"
C:\Users\Nic\PIC14>sdcc --use-non-free --verbose -mpic16 -p18f4680 TestPIC18.c
Processor: 18f4680
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -std=c11 -D__18f4680 -D__SDCC_PIC18F4680 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_CHAR_UNSIGNED -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=4_0_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=0 -D__SDCC_VERSION_PATCH=0 -D__SDCC_REVISION=11528 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__STDC_UTF_16__=1 -D__STDC_UTF_32__=1 -isystem "c:\users\nic\sdcc\bin..\include\pic16" -isystem "c:\users\nic\sdcc\bin..\include" -isystem "c:\users\nic\sdcc\bin..\non-free\include\pic16" -isystem "c:\users\nic\sdcc\bin..\non-free\include" "TestPIC18.c"
sdcc: Generating code...
WARNING: The target device seems to support XINST and no #pragma config XINST=OFF was found.
The code generated by SDCC does probably not work when XINST is enabled (possibly by default).
Please make sure to disable XINST.
(If the target does not actually support XINST, please report this as a bug in SDCC.)
sdcc: Calling assembler...
sdcc: gpasm -D__STACK_MODEL_SMALL -o "TestPIC18.o" -c "TestPIC18".asm
TestPIC18.asm:1600:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1603:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1606:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1625:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1628:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1647:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1650:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1669:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1672:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1687:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1703:Message[305] Using default destination of 1 (file).
sdcc: Calling linker...
error: Linker script not specified.
Last edit: Nic Pablo 2023-05-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found the culprit. GPUTILS uses two separate environment variables GPUTILS_HEADER_PATH & GPUTILS_LKR_PATH that need to be explicitly provided. Case closed :-)
C:\Users\Nic\PIC14>sdcc --use-non-free --verbose -mpic14 -p16f887 TestPIC16.c
Processor: 16f887
Using devices from c:\Users\Nic\sdcc\bin..\include\pic14\pic14devices.txt.
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -std=c11 -D__SDCC_PROCESSOR="16f887" -D__SDCC_PIC16F887 -D__SDCC_PIC14_STACK_SIZE=14 -obj-ext=.o -D__SDCC_CHAR_UNSIGNED -D__SDCC_USE_NON_FREE -D__SDCC=4_0_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=0 -D__SDCC_VERSION_PATCH=0 -D__SDCC_REVISION=11528 -D__SDCC_pic14 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__STDC_UTF_16__=1 -D__STDC_UTF_32__=1 -isystem "c:\Users\Nic\sdcc\bin..\include\pic14" -isystem "c:\Users\Nic\sdcc\bin..\include" -isystem "c:\Users\Nic\sdcc\bin..\non-free\include\pic14" -isystem "c:\Users\Nic\sdcc\bin..\non-free\include" "TestPIC16.c"
sdcc: Generating code...
sdcc: Calling assembler...
sdcc: gpasm -o "TestPIC16.o" -c "TestPIC16".asm
TestPIC16.asm:1525:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1531:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1537:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1567:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1573:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1603:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1609:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1639:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1645:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1667:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1691:Message[305] Using default destination of 1 (file).
sdcc: Calling linker...
message: Using default linker script "c:\users\nic\gputils\lkr\16f887_g.lkr".
warning: Relocation symbol "_cinit" [0x0000] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0004] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x001E] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0022] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0000] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0004] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x001E] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0022] has no section. (pass 0)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone. I am currently developing a Windows app that requires SDCC/GPUtils to be portable ( ie , no installation, just run directly using the path)The SDCC is OK and generates the necessary asm file . It calls gpasm successfully but gpasm seems lost and cannot find the include file ( ie p16f887.inc) . There are different errors in PIC16 & PIC18 .What seems to be missing? I have tested it using the cmd command line only interface. Kindly see below some info:
.................
C:\Users\Nic\PIC14>path
PATH=c:\users\nic\gputils\bin;c:\users\nic\gputils\header;c:\users\nic\gputils\lkr;c:\users\nic\sdcc\bin
C:\Users\Nic\PIC14>sdcc --use-non-free --verbose -mpic14 -p16f887 test8871.c
Processor: 16f887
Using devices from c:\users\nic\sdcc\bin..\include\pic14\pic14devices.txt.
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -std=c11 -D__SDCC_PROCESSOR="16f887" -D__SDCC_PIC16F887 -D__SDCC_PIC14_STACK_SIZE=14 -obj-ext=.o -D__SDCC_CHAR_UNSIGNED -D__SDCC_USE_NON_FREE -D__SDCC=4_0_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=0 -D__SDCC_VERSION_PATCH=0 -D__SDCC_REVISION=11528 -D__SDCC_pic14 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__STDC_UTF_16__=1 -D__STDC_UTF_32__=1 -isystem "c:\users\nic\sdcc\bin..\include\pic14" -isystem "c:\users\nic\sdcc\bin..\include" -isystem "c:\users\nic\sdcc\bin..\non-free\include\pic14" -isystem "c:\users\nic\sdcc\bin..\non-free\include" "test8871.c"
sdcc: Generating code...
sdcc: Calling assembler...
sdcc: gpasm -o "test8871.o" -c "test8871".asm
test8871.asm:11:Error[105] Cannot open file. Include file "p16f887.inc" not found.
test8871.asm:14:Error[113] Symbol not previously defined: "_CONFIG1"
test8871.asm:413:Error[113] Symbol not previously defined: "STATUS"
test8871.asm:421:Error[113] Symbol not previously defined: "STATUS"
test8871.asm:429:Error[113] Symbol not previously defined: "STATUS"
test8871.asm:537:Error[113] Symbol not previously defined: "STATUS"
test8871.asm:545:Error[113] Symbol not previously defined: "STATUS"
C:\Users\Nic\PIC14>sdcc --use-non-free --verbose -mpic16 -p18f4680 TestPIC18.c
Processor: 18f4680
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -std=c11 -D__18f4680 -D__SDCC_PIC18F4680 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_CHAR_UNSIGNED -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=4_0_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=0 -D__SDCC_VERSION_PATCH=0 -D__SDCC_REVISION=11528 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__STDC_UTF_16__=1 -D__STDC_UTF_32__=1 -isystem "c:\users\nic\sdcc\bin..\include\pic16" -isystem "c:\users\nic\sdcc\bin..\include" -isystem "c:\users\nic\sdcc\bin..\non-free\include\pic16" -isystem "c:\users\nic\sdcc\bin..\non-free\include" "TestPIC18.c"
sdcc: Generating code...
WARNING: The target device seems to support XINST and no #pragma config XINST=OFF was found.
The code generated by SDCC does probably not work when XINST is enabled (possibly by default).
Please make sure to disable XINST.
(If the target does not actually support XINST, please report this as a bug in SDCC.)
sdcc: Calling assembler...
sdcc: gpasm -D__STACK_MODEL_SMALL -o "TestPIC18.o" -c "TestPIC18".asm
TestPIC18.asm:1600:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1603:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1606:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1625:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1628:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1647:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1650:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1669:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1672:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1687:Message[305] Using default destination of 1 (file).
TestPIC18.asm:1703:Message[305] Using default destination of 1 (file).
sdcc: Calling linker...
error: Linker script not specified.
Last edit: Nic Pablo 2023-05-08
I found the culprit. GPUTILS uses two separate environment variables GPUTILS_HEADER_PATH & GPUTILS_LKR_PATH that need to be explicitly provided. Case closed :-)
C:\Users\Nic\PIC14>sdcc --use-non-free --verbose -mpic14 -p16f887 TestPIC16.c
Processor: 16f887
Using devices from c:\Users\Nic\sdcc\bin..\include\pic14\pic14devices.txt.
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -std=c11 -D__SDCC_PROCESSOR="16f887" -D__SDCC_PIC16F887 -D__SDCC_PIC14_STACK_SIZE=14 -obj-ext=.o -D__SDCC_CHAR_UNSIGNED -D__SDCC_USE_NON_FREE -D__SDCC=4_0_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=0 -D__SDCC_VERSION_PATCH=0 -D__SDCC_REVISION=11528 -D__SDCC_pic14 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__STDC_UTF_16__=1 -D__STDC_UTF_32__=1 -isystem "c:\Users\Nic\sdcc\bin..\include\pic14" -isystem "c:\Users\Nic\sdcc\bin..\include" -isystem "c:\Users\Nic\sdcc\bin..\non-free\include\pic14" -isystem "c:\Users\Nic\sdcc\bin..\non-free\include" "TestPIC16.c"
sdcc: Generating code...
sdcc: Calling assembler...
sdcc: gpasm -o "TestPIC16.o" -c "TestPIC16".asm
TestPIC16.asm:1525:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1531:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1537:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1567:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1573:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1603:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1609:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1639:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1645:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1667:Message[305] Using default destination of 1 (file).
TestPIC16.asm:1691:Message[305] Using default destination of 1 (file).
sdcc: Calling linker...
message: Using default linker script "c:\users\nic\gputils\lkr\16f887_g.lkr".
warning: Relocation symbol "_cinit" [0x0000] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0004] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x001E] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0022] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0000] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0004] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x001E] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0022] has no section. (pass 0)