Hi,

Look for the pic header files in a non-free package of arch linux.

Or else uninstall the sdcc package, download the source from our
sourceforge page and compile and install from there.

Maarten


> Hi, I was wondering if im losing an step on trying to compile a
> microchips pic 16f877a with sdcc, I've already install guptils, sdcc,
> piklab and pk2cmd and when trying to compile the pic with this code:
>
> main.c
> ----------------------
> #include <16F877A.h>
> #use delay(clock=4000000)
> #byte puerto_b=06
>
> void main(void){
>          set_tris_b(0x00);
>          puerto_b=0;
> /*set tris_b 0 apagado 0xff b4,b5-b7 salidas */
>
>          do{
>                  bit_set(puerto_b,7);
>                  /*activa puerto 7 */
>                  delay_ms(500);
>                  bit_clear(puerto_b,7);
>                  delay_ms(500);
>          }while(TRUE);
>
> }
> ---------------------------
>
>
>
> -------------------------------
> Makefile
> -------------------------------
>
> all: main
>
> main: main.c
>               sdcc -mpic14 -p16f877A main.c --use-non-free
>
> program:
>               pk2cmd -B/usr/share/pk2/ -PPIC16F877A -Fmain.hex -M -R
>
> ---------------------
>
>
> when trying:
> make
>
> i got this errors:
>
>
>
> sdcc -mpic14 -p16f877A main.c --use-non-free
> main.c:1:21: fatal error: 16F877A.h: No such file or directory
> compilation terminated.
> main.c:1: warning 190: ISO C forbids an empty source file
> make: *** [Makefile:4: main] Error 1
>
>
>
> I think I just dont have those libraries, so i got the headers from a
> ccs compiler files  and used them on the include like
> #include </path/pic/16f877a>
>
> but now I have a lot of errors from the header file, si I thought i was
> missing an step on the installation of sdcc, I actually write a mail
> because the tutorial on internet are some old and I'm not getting many
> options.
>
> what should I test now?
>
> SO: arch linux 4.9.6-1 64 bits
> SDCC :
> mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8
> 3.6.0 #9615 (Linux)
> gputils 1.5.0-1
> piklab: version 0.16.2 (rev. distribution)
> pk2cmd-plus 1.21rc1_1.63.148-2
>
> thanks.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to