Author Topic: Using CodeBlocks with Digilent Chipkit Max32  (Read 3472 times)

Offline mogplus88

  • Multiple posting newcomer
  • *
  • Posts: 11
Using CodeBlocks with Digilent Chipkit Max32
« on: September 30, 2016, 03:20:49 pm »
Hi, noob question. Is it possible to set up CB to program a Chipkit Max32? I'm assuming it would require setting up the correct toolchain for Chipkit (MCB32 tools?...) in CB so that references to Max32 register names and things would compile okay. An uploader would also be required, like avrdude for Atmel boards. But once that's all done Bob's your mother's brother, I'm guessing.
Thanks,
Ian

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Using CodeBlocks with Digilent Chipkit Max32
« Reply #1 on: September 30, 2016, 04:41:02 pm »
Hi, noob question. Is it possible to set up CB to program a Chipkit Max32? I'm assuming it would require setting up the correct toolchain for Chipkit (MCB32 tools?...) in CB so that references to Max32 register names and things would compile okay. An uploader would also be required, like avrdude for Atmel boards.
Thanks,
Ian

That sounds about right; might or might NOT be able to get the debugger to work inside Code::Blocks.

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

Offline mogplus88

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Using CodeBlocks with Digilent Chipkit Max32
« Reply #2 on: October 02, 2016, 05:17:16 am »
With a a bit more delving I think it is currently not possible. It seems CB only supports known compilers, and the Chipkit compiler isn't one of them. I haven't been able to find a way to add a new compiler to the list of supported compilers, not that surprising really as a modification like that could be very complex and may impact other functionality in CB if not done correctly. I think it's best to leave that kind of thing to people who know what they are doing. I'm not one of them...
:-\

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Using CodeBlocks with Digilent Chipkit Max32
« Reply #3 on: October 02, 2016, 11:25:34 am »
we can try to help you...
can you show us a sample command line of the build command? Or a makefile that uses this compiler?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Using CodeBlocks with Digilent Chipkit Max32
« Reply #4 on: October 02, 2016, 01:17:12 pm »
Are using the "MPIDE", "UECIDE", or the "chipKIT-core plugin with the Arduino IDE"?

Edit2: MPIDE seems to be in either modified or unmodified from MicroChip Digilent.
Edit3: The modified (to maybe support Arduino sketches) version seems to be considered obsolete.
Edit4: I am trying to download "chipKIT-core plugin with the Arduino IDE" to see what compiler it uses.
(I have no hardware; so, I can only test the building)
Edit5: "MPLAB IDE" and "MPIDE" are two different IDEs; the first from MicroChip and I think the second is from Digilent.
Edit6: The compiler/toolchain was installed under here "C:\Users\stahta01\AppData\Local\Arduino15" with "pic32-gcc.exe" for the C Compiler.

Those are the only compiler IDE options I found on http://chipkit.net/wiki/index.php?title=Main_Page

I have never used any of the three IDE choices listed above.
Edit: Each of the above three IDE choices might use the same or different compiler toolchain; I have yet to look that far into the docs.

Tim S.
« Last Edit: October 03, 2016, 04:03:01 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Using CodeBlocks with Digilent Chipkit Max32
« Reply #5 on: October 02, 2016, 08:33:17 pm »
Are you planning to use C/C++ or Arduino sketches?

If using only Arduino sketches, you likely will NOT want to use Code::Blocks.

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

Offline mogplus88

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Using CodeBlocks with Digilent Chipkit Max32
« Reply #6 on: October 05, 2016, 02:44:36 pm »
Thanks to stahta01 for your input. My intention is to avoid the Arduino sketch path and learn how to program the Arduino (or Chipkit) board in raw C. Not sure if that's just dumb stubbornness, but I have always had a penchant for doing things the hard way! I used to program IBM mainframes in Cobol back in the '70s and '80s, and I've always enjoyed the programming process and finding the best solution, which was not always the most obvious or easiest one.

BlueHazzard, the Arduino IDE has no problem compiling for the Max32, I don't know what toolchain it uses. All that stuff is hidden from the user. and there's an option in it to use a separate editor (perhaps a bit of a concession on the part of the Arduino developers that their editor is less than optimal, or maybe just adhering to the KISS principle for noobs like me) so maybe that's the route I should be going for the Max32 anyway.

Thanks again,
Ian

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Using CodeBlocks with Digilent Chipkit Max32
« Reply #7 on: October 05, 2016, 05:49:00 pm »
See if the Compiler tools are located under either of these locations.
Note: The locations are the same in my Windows 10 32 bit system.

Code
%HOME%\AppData\Local\Arduino15\packages\chipKIT\tools\pic32-tools\1.42-pic32gcc\bin

Code
%APPDATA%\..\Local\Arduino15\packages\chipKIT\tools\pic32-tools\1.42-pic32gcc\bin

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