Author Topic: C::B for Microchip MCUs?  (Read 2398 times)

Offline knivd

  • Single posting newcomer
  • *
  • Posts: 1
C::B for Microchip MCUs?
« 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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13405
    • Travis build status
Re: C::B for Microchip MCUs?
« Reply #1 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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline AndrewCot

  • Multiple posting newcomer
  • *
  • Posts: 97
Re: C::B for Microchip MCUs?
« Reply #2 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7150
    • My Best Post
Re: C::B for Microchip MCUs?
« Reply #3 on: June 23, 2021, 03:35:41 am »
FYI: The SDCC only supports a very small sub-set of Microchip MCUs.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org