using sdcc for pic

Status
Not open for further replies.

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

  • program_sdcc.c
    387 bytes · Views: 198
  • untitled.txt
    1.5 KB · Views: 186
The includes you need are in the "non free" directory... But SDCC compiles for the MCS51 by default You need to specify the PIC14 port in your command line....
 
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..
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…