using sdcc for pic

lipschutz

Member
Hi
I am trying to compile a C example program by sdcc in linux. but every time I command to compile from the terminal it reports that it couldn't find the 'pic16f877.h' file. By examining the directories the compiler searched for I find that those do not contain the file as well and that the file is contained in a directory named non-free (usr/local/share/sdcc/non-free/include/pic14). Now that i am stuck and any help will be useful. thanks in advance.

The code and the terminal command I issued are attached.

Regards
lipschutz
 

Attachments

so it seems the command
sdcc -mpic14 -pic16f877 program.c
wouldn't work because I've been using this command over and over.
doesn't the option -mpic14 get the .h files for pic?
 
I'm working in the dark here.. I use SDCC for 51 derivative only... If its only the H file that's causing your problem, Take the file "pic16f877,h" from the "non free/ pic14" directory and put it in the H directory and it should be seen..
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…