Code::Blocks Forums

User forums => Embedded development => Topic started by: knivd on June 22, 2021, 12:12:31 pm

Title: C::B for Microchip MCUs?
Post by: knivd on June 22, 2021, 12:12:31 pm
I quite like the Code Blocks environment and was wondering, is it not possible to include support for the PIC families in it? I can see a lot of other platforms are already there.
Thanks!
Title: Re: C::B for Microchip MCUs?
Post by: oBFusCATed on June 22, 2021, 03:28:27 pm
What support do you need?
It should currently be possible to do this if you do these steps:
1. Install the compiler
2. Set it up inside codeblocks
3. Create empty project which uses this compiler
4. Add files
5. Setup build options for your device
6. Add post build commands to do firmware gathering or/and upload in your environment.
7. enjoy

If you need to do these steps often you can write a wizard template script which automates the stuff above and then provide a patch for inclusion in the C::B releases.
Title: Re: C::B for Microchip MCUs?
Post by: AndrewCot on June 23, 2021, 01:55:54 am
A google search on "codeblocks PIC compiler" returned the following pages that should help you out configuring CB with SDCC for use with PIC uControllers:

https://wiki.codeblocks.org/index.php/Using_the_Code::Blocks_IDE_with_SDCC_on_PIC_MCUs
http://www.iearobotics.com/wiki/index.php?title=CodeBlock_IDE_and_PIC_microcontrollers

If you do not know what SDCC is then have a look at the following main SDCC page:
http://sdcc.sourceforge.net/

You can search the CB forums for "SDCC" or the compiler you want to use to see if there are details on configuring it for use with CB.
Title: Re: C::B for Microchip MCUs?
Post by: stahta01 on June 23, 2021, 03:35:41 am
FYI: The SDCC only supports a very small sub-set of Microchip MCUs.

Tim S.