News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Using CodeBlocks with Digilent Chipkit Max32

Started by mogplus88, September 30, 2016, 03:20:49 PM

Previous topic - Next topic

mogplus88

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

stahta01

Quote from: mogplus88 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.
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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

mogplus88

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...
:-\

BlueHazzard

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?

stahta01

#4
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

mogplus88

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

stahta01

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.


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



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


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