Microchip MPLAB-X IDE OSX issues

Microchip is moving its IDE to a NetBean IDE with MPLAB-X. Support will be for Windows, Linux and Mac OSX I testing the new IDE for a class that I am teaching, by ported the FreeRTOS 7.01 code to the new IDE under Mac OSX. Most of the issues were IDE related as the IDE is in Beta at this point, But their was one issues that puzzle me for a bit of time. It was related to Include paths in the IDE. I was getting error from the complier that It could not find: portmacro.h.
It was in all the Include paths that I tried, I was blaming the IDE for NOT doing Inclusion correctly. The “problem” is that the new IDE support using a forward slash in ALL path name under Windows, Linux and Mac OSX, but will also support a back slash under Windows. One’s eyes, can’t tell one from the other when look at a path error messages… The Portable.h file for the PIC devices, use a back slash as it should for the older IDE under Windows…. fixing this, provide a clean compile. testing was done with Beta IDE 7.01, C30 ver 3.30b on MAC OSX 10.7 same issue will be there for PIC18 and PIC 32 I change the preprocessor macro in the compiler to: MPLABX_DSPIC_PORT OLD… #ifdef MPLAB_PIC24_PORT
    #include “..\..SourceportableMPLABPIC24_dsPICportmacro.h”
#endif #ifdef MPLAB_DSPIC_PORT
    #include “..\..SourceportableMPLABPIC24_dsPICportmacro.h”
#endif #ifdef MPLAB_PIC18F_PORT
    #include “..\..SourceportableMPLABPIC18Fportmacro.h”
#endif #ifdef MPLAB_PIC32MX_PORT
    #include “..\..SourceportableMPLABPIC32MXportmacro.h”
#endif New #ifdef MPLABX_PIC24_PORT
    #include “../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h”
#endif #ifdef MPLABX_DSPIC_PORT
    #include “../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h”
#endif #ifdef MPLABX_PIC18F_PORT
    #include “../../Source/portable/MPLAB/PIC18F/portmacro.h”
#endif #ifdef MPLABX_PIC32MX_PORT
    #include “../../Source/portable/MPLAB/PIC32MX/portmacro.h”
#endif

Microchip MPLAB-X IDE OSX issues

Thanks for the post.  Just for completeness, here is a copy of the email sent:
Thank you indeed for taking the time to provide this feedback.
I myself am just a Windows user, so have been tripped up by case
sensitivity and slash ‘orientation’ issues before, and it is always
appreciated when people point these out. With regards to the lines you have indicated in portable.h, which select
which portmacro.h file to include.  These lines are problematic for a
number of reasons, not least of which is that they expect a certain
directory structure to exist, and people will often change the structure
to suite their requirements.  The other problems are first the one you
have just run into, and second that it requires people to have a symbol
defined in their project options (MPLAB_PIC32MX_PORT for example).  For
these reasons, their use is now deprecated, although they are retained
for backward compatibility.  If you look at the bottom of the list of
entries (part of which you have cut into your email) you will see a line
has been added to just #include “portmacro.h” without any path, if
portmacro.h has not already been included. This dropping of use is not advertised anywhere, and many older projects
exist that still use them (I cannot go through all the projects to
change them as there are too many), but newer projects just add the path
to the required portmacro.h header file to the list of existing include
paths to ensure the right one gets included.  I would recommend doing
the same in your new MPLAB-X projects.

Microchip MPLAB-X IDE OSX issues

Are there any additional steps required for building projects in MPLAB-X? I have made these changes to Portable.h but I still cannot successfully port a clean project. If there would you mind listing all that is required to build FreeRTOS projects with in MPLAB-X? I am working with a PIC24 and FreeRTOS V7.1.0 Thanks a lot!

Microchip MPLAB-X IDE OSX issues

What errors are you getting that makes your build unsuccessful?

Microchip MPLAB-X IDE OSX issues

Hello, I am getting several errors that are resulting from MPLABX not being able to properly locate #include references below  in croutine.c #include “/include/FreeRTOS.h”
#include “/include/task.h”
#include “/include/croutine.h” for which I am getting the errors: ../PorjectFolder/FreeRTOS/Source/croutine.c:54:31: error: /include/FreeRTOS.h: No such file or directory
../PorjectFolder/FreeRTOS/Source/croutine.c:55:27: error: /include/task.h: No such file or directory
../PorjectFolder/FreeRTOS/Source/croutine.c:56:31: error: /include/croutine.h: No such file or directory However, these are the actual locations of these files; when I clean the project all the references work. But the failure still occur upon each build attempt. Thanks in advance!

Microchip MPLAB-X IDE OSX issues

I really think usage of backslash in C source is wrong. What if your directory name is 007? “..07” should that be interpreted as a octal number? http://stackoverflow.com/a/5790284 I have started today to play with this.
It compiles but does not link as it looses some .c files during conversion of the project to MPLABX

Microchip MPLAB-X IDE OSX issues

Thank you very much. I was talking to someone else about exactly this. I will rebuild the project and include all the relevant folders under “include directories” in the project properties. I’ll update my progress

Microchip MPLAB-X IDE OSX issues

I included the directories in the  project properties and it works fine now. Although it might not have an impact,  I should also note that I upgraded MPLAB-X from the beta to version 1.00.

Microchip MPLAB-X IDE OSX issues

Strappingchap, Would it be possible to list the directories you are including? Ive got a project thats fine in MPLAB 8.83 but when I convert it to MPLAB x 1.00 I get problems. Under pic32-gcc and pic32-as include directories I have the following
..
S:/SDK/FreeRTOS/include
S:/SDK/FreeRTOS/portable/MPLAB/ This is fine for MPLAB 8.33 but not for X Any ideas folks? Mat

Microchip MPLAB-X IDE OSX issues

Stupidly forgot to post what my error message was! In file included from S:/SDK/FreeRTOS/portable/MPLAB/PIC32MX/port_asm.S:56:0:
S:/SDK/FreeRTOS/portable/MPLAB/PIC32MX/ISR_Support.h:54:28: fatal error: FreeRTOSConfig.h: No such file or directory

Microchip MPLAB-X IDE OSX issues

Sorry if this is pointing out the obvious, but FreeRTOSConfig.h is normally in the application directory.  The include paths you listed in post 9 does not include the application directory.  Are you sure you have the path to FreeRTOSConifg.h in your include path? Regards.

Microchip MPLAB-X IDE OSX issues

Hi Richard, The obvious ones are normally the best! Yeap…I have the FreeRTOSConfig.h in my current dir, but I thought that was included via the “..” path. Mat

Microchip MPLAB-X IDE OSX issues

Hello Mat, Hopefully everything is working now? Best regards,

Microchip MPLAB-X IDE OSX issues

Sorry to dig up this thread but I must be really stupid. Having read the above and did my utmost to get it right in my project I still get the following error: make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make: Entering directory `F:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X’
make  -f nbproject/Makefile-default.mk dist/default/production/MicroStickII-FreeRTOS-Test.X.production.hex
make: Entering directory `F:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X’
“F:Microchipxc32v1.20binxc32-gcc.exe” -g -x c -c -mprocessor=32MX250F128B -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/include -IF:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX -MMD -MF build/default/production/_ext/301941837/list.o.d -o build/default/production/_ext/301941837/list.o ../FreeRTOSV7.4.0/FreeRTOS/Source/list.c -I ../
“F:Microchipxc32v1.20binxc32-gcc.exe” -g -x c -c -mprocessor=32MX250F128B -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/include -IF:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX -MMD -MF build/default/production/_ext/301941837/queue.o.d -o build/default/production/_ext/301941837/queue.o ../FreeRTOSV7.4.0/FreeRTOS/Source/queue.c -I ../
“F:Microchipxc32v1.20binxc32-gcc.exe” -g -x c -c -mprocessor=32MX250F128B -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/include -IF:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX -MMD -MF build/default/production/_ext/301941837/tasks.o.d -o build/default/production/_ext/301941837/tasks.o ../FreeRTOSV7.4.0/FreeRTOS/Source/tasks.c -I ../
“F:Microchipxc32v1.20binxc32-gcc.exe” -g -x c -c -mprocessor=32MX250F128B -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/include -IF:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX -MMD -MF build/default/production/_ext/378054839/port.o.d -o build/default/production/_ext/378054839/port.o ../FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX/port.c -I ../
“F:Microchipxc32v1.20binxc32-gcc.exe” -c -mprocessor=32MX250F128B -MMD -MF build/default/production/_ext/378054839/port_asm.o.d -o build/default/production/_ext/378054839/port_asm.o ../FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S -Wa,-defsym=__MPLAB_BUILD=1,-MD=build/default/production/_ext/378054839/port_asm.o.asm.d,-gdwarf-2,-IF:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X -I../
In file included from ../FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX/port_asm.S:77:0:
../FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX/ISR_Support.h:75:28: fatal error: FreeRTOSConfig.h: No such file or directory
compilation terminated.
make: Leaving directory `F:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X’
make: ***  Error 1
make: Leaving directory `F:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X’
make: ***  Error 2
make: ***  Error 2 The PIC32 demo project compiles just fine, but whether I modify the demo project or start a new project from scratch, ISR_Support.h doesn’t want to find my FreeRTOSConfig.h. I know it exists and the project directory is included in the include path of the XC32 compiler. Stumped. Any help greatly appreciated.

Microchip MPLAB-X IDE OSX issues

The PIC32 demo project compiles just fine, but whether I modify the demo project or start a new project from scratch, ISR_Support.h doesn’t want to find my FreeRTOSConfig.h.
The compiler command line has -IF:/MPLABXProjects/FreeRTOSV7.4.0/FreeRTOS/Source/portable/MPLAB/PIC32MX so the header can be found. The assembler command line has no such include path so the header file cannot be found. Add the same include path in the assembler options in mplab.

Microchip MPLAB-X IDE OSX issues

Unfortunately, that’s not it. The paths are already the same for both the compiler and the assembler options in MPLAB-X. If finds the ISR_Support.h file but not the FreeRTOSConfig.h, which is located in the project directory (as I believe it should be).

Microchip MPLAB-X IDE OSX issues

The only way I can get it to build successfully is if I hard code the entire path to the FreeRTOSConfig.h header file into the SR_Support.h header file. This must be some kind of MPLAB-x problem, or at least as likely my ignorance. Still, if someone has any clues, I’d be most grateful. Cheers.

Microchip MPLAB-X IDE OSX issues

Meant ISR_Support.h Is there no way to edit a post on this forum?

Microchip MPLAB-X IDE OSX issues

As this is an OSX thread could it be something as simple as using a backslash where a forward slash is needed?

Microchip MPLAB-X IDE OSX issues

Just to update my earlier question/problem which I’ve now solved. My issue was that I failed to add the projects path in the “Preprocessor Include directories” in the XC32-as setting in MPLAB-X. I had it only in the “Assembler Include directories”. Hopefully, this is of use to someone.