I also want to add that before i came up with a makefile if i simply type on the command line :
sdcc -mpic14 -p16f88 test1.c
I get on the output :
pic16f88.lib: No such file or directory
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Toggling the port is tricky - especially at that frequency, you never know if you will read the proper value. For PIC16, one would toggle LATB, for PIC14 I recommend to introduce a variable:
I did not mean to imply that the errors you already see originate in your code. The port access stuff was just some free advice to prevent future problems.
Did you already try the --use-non-free command line option? That was the more important part of my previous post.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GPLINK crashes -- this is probably the wrong forum; that would be gputils.sf.net. How about letting SDCC invoke gplink for you? You need to provide libraries and flags, and some of them need to be in the right order ... SDCC knows how to do that.
sdcc -mpic14 -p16f88 --use-non-free test2.c
If need be, you can pass -L/usr/share/sdcc/lib/pic14 to sdcc as well to make gplink find pic16f88.lib.
You can also add -V (or -v?) to see how SDCC invokes gplink.
If that does not work, please update (or downgrade) gputils to get rid of the crash.
If you still get 'pic16f88.lib not found' errors, please build SDCC from source or use a snapshot (http://sdcc.sourceforge.net/snap.php#Linux). At least the Debian packages do not include pre-built PIC14/16 libraries due to licensing uncertainties.
Which versions of gputils and SDCC are you using? What source (Debian packages, source, snapshot, other)?
Last edit: Raphael Neider 2014-09-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, Finally i got it to give me the .hex :)
I had to remove sdcc which i had installed with aptitude, and reinstalled the latest manually, then like you said i let sdcc invoke gplink for me, so i removed the linker and linker flags from the Makefile and voilá, it works, but i guess there's a bug somewhere between sdcc and gplink, which is a bit annoying i like to make the makefile all the way.
Thank you for the precious help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello im using only linux, VIM and makefile,
My test1.c is :
My make file flags are :
The output of the make command is :
This is a very basic test i still dont understand where am i getting it wrong.
Last edit: Raphael Neider 2014-09-10
I also want to add that before i came up with a makefile if i simply type on the command line :
sdcc -mpic14 -p16f88 test1.c
I get on the output :
pic16f88.lib: No such file or directory
sdcc -mpic14 -p16f88 --use-non-free test1.cshould do what you need.
Toggling the port is tricky - especially at that frequency, you never know if you will read the proper value. For PIC16, one would toggle
LATB, for PIC14 I recommend to introduce a variable:Hello Raphael but i just tried to compile the code :
void main (void) {
}
And i get the exact same result, so i don't think the problem is in the code.
I did not mean to imply that the errors you already see originate in your code. The port access stuff was just some free advice to prevent future problems.
Did you already try the
--use-non-freecommand line option? That was the more important part of my previous post.Ow didn't understand that, thank you.
I've just added the --use-non-free, but the exact same problem persist.
sdcc -mpic14 -p16f88 --use-non-free -o test2.o -c test2.c
gplink -c -r -w -m I /usr/share/sdcc/lib/pic14/ test2.o -o t1
make: *** [t1] Segmentation fault
GPLINK crashes -- this is probably the wrong forum; that would be gputils.sf.net. How about letting SDCC invoke gplink for you? You need to provide libraries and flags, and some of them need to be in the right order ... SDCC knows how to do that.
sdcc -mpic14 -p16f88 --use-non-free test2.cIf need be, you can pass
-L/usr/share/sdcc/lib/pic14to sdcc as well to make gplink findpic16f88.lib.You can also add
-V(or-v?) to see how SDCC invokes gplink.If that does not work, please update (or downgrade) gputils to get rid of the crash.
If you still get 'pic16f88.lib not found' errors, please build SDCC from source or use a snapshot (http://sdcc.sourceforge.net/snap.php#Linux). At least the Debian packages do not include pre-built PIC14/16 libraries due to licensing uncertainties.
Which versions of gputils and SDCC are you using? What source (Debian packages, source, snapshot, other)?
Last edit: Raphael Neider 2014-09-10
Hello, Finally i got it to give me the .hex :)
I had to remove sdcc which i had installed with aptitude, and reinstalled the latest manually, then like you said i let sdcc invoke gplink for me, so i removed the linker and linker flags from the Makefile and voilá, it works, but i guess there's a bug somewhere between sdcc and gplink, which is a bit annoying i like to make the makefile all the way.
Thank you for the precious help.