I have a newer gpasm than you.
gpasm --version
gpasm-1.5.2 #1319 (Jul 18 2019)
The test2.c file is exactly as you sent it.
/home/don/c/pic/sdcc/branchTest/testInstall/bin/sdcc --version
SDCC : pic14 3.9.2 #11327 (Linux)
published under GNU General Public License (GPL)
/home/don/c/pic/sdcc/branchTest/testInstall/bin/sdcc \
--use-non-free -mpic14 -p16f1825 --nostdinc \
-I/home/don/c/pic/sdcc/branchTest/testInstall/share/sdcc/include/pic14 \
-I/home/don/c/pic/sdcc/branchTest/testInstall/share/sdcc/non-free/include/pic14
\
test2.c
message: Using default linker script
"/usr/local/share/gputils/lkr/16f1825_g.lkr".
error: Duplicate symbol "_main" defined in "test2.o" and "libsdcce_a-idata.o".
warning: Relocation symbol "_cinit" [0x0000] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0004] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x0018] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x001C] 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" [0x0018] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x001C] has no section. (pass 0)
error: Error while writing hex file.
--------------------
/usr/local/bin/sdcc --version
SDCC :
mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ez80_z80/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15
3.9.2 #11326 (Linux)
published under GNU General Public License (GPL)
/usr/local/bin/sdcc \
--use-non-free -mpic14 -p16f1825 --nostdinc \
-I/usr/local/share/sdcc/include/pic14 \
-I/usr/local/share/sdcc/non-free/include/pic14 \
test2.c
message: Using default linker script
"/usr/local/share/gputils/lkr/16f1825_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" [0x0018] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x001C] 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" [0x0018] has no section. (pass 0)
warning: Relocation symbol "_cinit" [0x001C] has no section. (pass 0)
- Don
On Jul 26, Gonzalo Pérez de Olaguer Córdoba propounded certain bytes, to wit:
> Subject: Re: [Sdcc-user] pic14 users: Please test the pic14 branch!
>
> Hi, Don.
>
> El Wed, 24 Jul 2019 20:08:09 -0400
> Don Wooton <[email protected]> escribió:
>
> > [...]
> > I was not so successful with _INTCONbits. Maybe I did not do it correctly?
>
> You did it right. All the variations you tried work for me.
> Maybe the difference is this:
>
> $ gpasm --version
> gpasm-1.5.0 #1285 (May 29 2019)
>
> What version of gputils are you using?
>
> > Manually adding extern _INTCONbit into main.asm in the correct
> > section did work but would be rather a pain to automate.
>
> Please try the attached file test2.c
>
> In case of failure, please post the C file and the resulting
> assembly file.
>
> --
> Gonzalo Pérez de Olaguer Córdoba [email protected]
> -=- buscando empleo desde 1988 -=- www.gpoc.es
>
> PGP: 3F87 CCE7 8B35 8C06 E637 2D57 5723 9984 718C A614
> #include "pic16f1825.h"
>
> typedef unsigned int config_word_t;
> static __code config_word_t __at _CONFIG1 config1Reg = 0x01;
> static __code config_word_t __at _CONFIG2 config2Reg = 0x01;
>
>
> #define disableIntr() \
> (void)INTCONbits; \
> __asm __endasm; \
> __asm bcf _INTCONbits,7 ; disableIntr() __endasm; \
> __asm btfsc _INTCONbits,7 __endasm; \
> __asm goto $-2 __endasm; \
> __asm __endasm
>
> #define enableIntr() \
> __asm __endasm; \
> __asm bsf _INTCONbits,7 ; enableIntr() __endasm; \
> __asm __endasm
>
> void main(void)
> {
> disableIntr();
>
> enableIntr();
> }
>
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>-- End of excerpt from Gonzalo Pérez de Olaguer Córdoba'
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user