I have previously posted a blog on how I was able to install the sdcc compiler. In that blog I had used the Ubuntu’s software center to install the software. But it comes with its share of problems:a
- It does not contain the header files for PIC
- It misses libraries for PIC
- As the version is old it does not support all the controllers that the latest version of SDCC supports.
I was trying to install the libraries alone but the problem was apt-get will not track it. Looking for a software that would do the job led me to checkinstall. That I wrote about in the previous blog.
I found that the easiest way to install is to
- Download and install the latest version of gputils.
- Download and install the latest version of sdcc.
It is best to use checkinstall whenever installing from source. checkinstall takes some extra time in making the package but the wait is worth the pain.
Now I have sdcc and gputils installed. I even tried compiling am example code using Code::Blocks and sdcc and it produced a hex file. I am still using Installing and Using SDCC guide which I used last time.
Only care to take while building with C::B is to specify the processor type by adding -p<processor> switch. This can be added in the settings->compiler… and setting the pic flag in compiler flags and adding the -p <processor> switch in Other Options.
Leave a Reply
You must be logged in to post a comment.