View previous topic :: View next topic |
Author |
Message |
shimpossible
Joined: 27 Aug 2018 Posts: 6
|
mplabx prjMakefileGenerator and CCSC plugin |
Posted: Mon Aug 27, 2018 8:16 pm |
|
|
I'm trying to build a CCSC mplabx project from the command line. prjMakefileGenerator.bat is supposed to take the nbproject directory and build the makefiles based on it.
I get the following errors when I try
Unrecognized language toolchain: CCSC
and then at the bottom
[Configuration Loading Error] error: Configuration "default" builds with "CCSC", but no toolchains of that type are installed.
[Configuration Loading Error] Errors have occurred while loading one or more configurations.
If I switch the project to the xc8 compiler it works fine.
Has anyone been successful in using CCSC with prjMakefileGenerator? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Tue Aug 28, 2018 7:36 am |
|
|
Have you actually installed the CCSC plug-in, and got the project to compile with this in MPLAB?. |
|
|
shimpossible
Joined: 27 Aug 2018 Posts: 6
|
|
Posted: Wed Aug 29, 2018 5:36 pm |
|
|
Ttelmah wrote: | Have you actually installed the CCSC plug-in, and got the project to compile with this in MPLAB?. |
I'm able to compile and build just fine in the IDE. Its when I try this batch file I run into problems.
Are you implying it works for you? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Wed Aug 29, 2018 11:42 pm |
|
|
OK.
It means that somewhere in the install the configuration stuff is not fully installed. Have a look at this thread, which is the same problem for the HiTech compiler:
<https://www.eevblog.com/forum/microcontrollers/mplabx-hitech-c-issues/>
You have the compiler plug-in installed, but the toolchain is not there in the build tools.
There should be a MPLAB option somewhere to rescan for toolchains.
As a comment though, why bother?.
CCS itself has at it's core a command line compiler. Just make a .bat or .cmd file with a line like:
CCSC +FD +P5 yoursourcefilename
This will then compile 'yoursourcefilename', without all the complexity of launching Java, calling the MPLAB engine in this, which then calls the CCS compiler from this. It'll probably run at least twice as fast.... |
|
|
shimpossible
Joined: 27 Aug 2018 Posts: 6
|
|
Posted: Thu Aug 30, 2018 8:13 am |
|
|
I've a lot of files in the project. Was planning on reusing the makefile that mplabx gives you instead of coding a new one from hand. Maybe I'll end up doing that instead.
The link you sent isn't clear if their error in in the IDE or the command line. I've seen a similar error in the IDE, if CCSC plugin isn't installed correctly. But I don't get that error in the IDE, only from the command line.
I've tried changing the compiler to a made up 'custom' compiler and everything works fine. Switching to XC8 or MASM works. But when I try CCSC it does not work.
To be clear, I'm using mplabx v4.20. prjMakefileGenerator is broken in v4.15, and also appears broken in v5.0.
I was able to use v4.20 prjMakefileGenerator for other compilers. Its just CCSC that fails.
What I really want to know is if anyone has successfully used prjMakefileGenerator with the CCSC plugin. If no one has ever been able to use it, there is no point in my trying. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Thu Aug 30, 2018 10:21 am |
|
|
Surely the number of files doesn't matter. The main will include all the files it needs.
It _used_ to work. I know somebody who did use it a few months ago. However there are lots of reports of it failing in various ways on later compilers, even in some cases with MicroChip's own compilers. The other trick that applied in some cases was to uninstall and then re-install the plug in. Adding manually to the toolchain has also applied in some cases. |
|
|
shimpossible
Joined: 27 Aug 2018 Posts: 6
|
|
Posted: Sat Sep 01, 2018 6:17 am |
|
|
I got it to work. I had to run the prjMakefileGenerator.jar manually and add the ccs compiler plugin to the class path, and set the netbeans.user property.
Apparently the ccs plugin was never being loading when ran from the command line. Which accounts for the first error.
"Unrecognized language toolchain: CCSC"
The second error "error: Configuration "default" builds with "CCSC", but the support for this toolchain type is not installed", meant it wasn't setup. This was because prjMakefileGenerator.jar wasn't loading the user settings properly. Adding "netbeans.user" allows it to do this and everything works.
I tried this on v5.0 |
|
|
lukasschmid
Joined: 16 Oct 2024 Posts: 1
|
|
Posted: Wed Oct 16, 2024 2:18 am |
|
|
Hi,
I know this thread is inactive for quite a while. I run into the same issue while trying to run a build on a CI.
Where have you been able to add the ccs compiler plugin to the class path?
And where could you set the netbeans.user property?
I have an PCD 5.118 and use the mplabx v6.20. |
|
|
|