View previous topic :: View next topic |
Author |
Message |
mgiuliani
Joined: 30 Mar 2023 Posts: 20
|
Porting a CCS C Compiler IDE Project to MPLABX IDE |
Posted: Thu Dec 05, 2024 8:18 am |
|
|
Been looking into trying to get off of the awful CCS C IDE and got all excited that MPLABX IDE has a CCS C Compiler plugin, but of course that doesn't make porting an existing project easy. I'm not sure if it does anything, really. Is there any known practical way to port a CCS C project to MPLABX IDE, or am I better off just starting fresh and porting the code manually?
I'm mainly worried about the built-in functions that CCS's IDE has that the code uses all over the place. Also worried by the fact that when I make a new MPLABX IDE project with the CCS toolchain, clicking Clean & Build does absolutely nothing even with a fresh project. |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1354
|
|
Posted: Thu Dec 05, 2024 8:57 am |
|
|
all the built in functions are part of the compiler, not the IDE. I have projects where I freely switch between mplabx and CCS. You don't need to port anything. The main thing is setting up mplabx to correctly call the compiler (which is independent of the CCS project itself).
Is your CCS project for a single compilation model where you #include all your C files or is it a multicompilation model where every C file includes your specific PIC header file? It makes a difference on setup. |
|
|
mgiuliani
Joined: 30 Mar 2023 Posts: 20
|
|
Posted: Thu Dec 05, 2024 9:44 am |
|
|
jeremiah wrote: | all the built in functions are part of the compiler, not the IDE. I have projects where I freely switch between mplabx and CCS. You don't need to port anything. The main thing is setting up mplabx to correctly call the compiler (which is independent of the CCS project itself).
Is your CCS project for a single compilation model where you #include all your C files or is it a multicompilation model where every C file includes your specific PIC header file? It makes a difference on setup. |
That's good to hear. It's a single compilation model for all of our CCS projects, only one instance of including the PIC header and we #include all of our source files. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Thu Dec 05, 2024 10:06 am |
|
|
The CCS IDE, is a bit clunky, but works reasonably. MPLAB-X is 100* worse.
It gives unexplained errors, does not let you do things, and keeps requiring
upgrades that then make something else fail.
If you think MPLAB-X is 'better', you are in for some very nasty surprises.... |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9242 Location: Greensville,Ontario
|
|
Posted: Thu Dec 05, 2024 11:03 am |
|
|
gee , all I've ever used has been MPLAB, v8.92 now.... it works....
hmm, IDE... sounds like one of those new Hard drives with Integrated Drive Electronics..... guess I'm showing my age ?
started with PCM 2.540, found the files tucked away on a harddrive I 'found' last night. |
|
|
mgiuliani
Joined: 30 Mar 2023 Posts: 20
|
|
Posted: Thu Dec 05, 2024 2:00 pm |
|
|
On a whim I checked if VS Code has a plugin of some sort, because surely CCS Compiler isn't popular enough for one, but some saint out there published one a mere two weeks ago. I just tried it so idk how deep its features go but it works for editing and compiling at least which is 98% of what I need it to do and took like three minutes to get working. VS Code has served me well so looking forward to trying it out. And if it somehow isn't worth using, it's only a few minutes of effort gone.
https://marketplace.visualstudio.com/items?itemName=pgvt.picc-ccs-support |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1354
|
|
Posted: Thu Dec 05, 2024 3:43 pm |
|
|
mgiuliani wrote: | jeremiah wrote: | all the built in functions are part of the compiler, not the IDE. I have projects where I freely switch between mplabx and CCS. You don't need to port anything. The main thing is setting up mplabx to correctly call the compiler (which is independent of the CCS project itself).
Is your CCS project for a single compilation model where you #include all your C files or is it a multicompilation model where every C file includes your specific PIC header file? It makes a difference on setup. |
That's good to hear. It's a single compilation model for all of our CCS projects, only one instance of including the PIC header and we #include all of our source files. |
I know you are checking out VsCode (I like it a lot), but if you are ever forced back into mplabx, one thing to keep in mind for single file compilation model (the one I use in mplabx as well). There's a menu you have to go into to tell mplabx not to compile any of the C files except for your main file. I don't have it in front of me here to get the name, but if you don't do that it will try to do multi file compilation.
EDIT: actually found a note I had on it, I had to right click the "Source Files" folder in the Project view and select properties, then on the right side you can check all the files except for your main file to exclude them from the build (they are #included, so that will handle getting them built). |
|
|
|