First you must download the CodeBlocks model for Pinguino.
Then you have to configure CodeBlocks to work with SDCC.
Create a new empty project in the same folder than the CodeBlocks model,
Go to the Settings menu/Compiler and debugger and choose SDCC in the Selected compiler panel,
Click the compiler settings tab and Compiler flags tab and select:
- Be verbose
- [CPU] PIC 16 bits
- ouput intel hex
- --optimize-goto --denable-peeps --obanksel=9 --opt-code-size --optimize-cmp --optimize-df
Select the Project/Build Options menu,
Click on the Compiler Settings tab and Other Options tab,
type -p18f2550 in the field.
Click now on the Linker Settings panel.
In the Other Linker Options field, type:
--no-crt -Wl-s18f2550.lkr,-m
In the Link Libraries field, click on add and select this files:
libpuf.lib wich is in the project folder,
libc18f.lib wich is in the /usr/share/sdcc/lib/pic16 folder ( Linux )
libio18f2550.lib wich is in the /usr/share/sdcc/lib/pic16 folder ( Linux )
Now you can click on the Build button and an hex file should be generated.
All the code must be written in the application_main() in main.c
To upload the code to the PIC, you can use the Python downloader wich can be downloaded here.
I hope to propose some models of applications.