Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Microchip MPLAB-X IDE OSX issues

Posted by lafleur on August 13, 2011
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 "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
#endif

#ifdef MPLAB_DSPIC_PORT
#include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
#endif

#ifdef MPLAB_PIC18F_PORT
#include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"
#endif

#ifdef MPLAB_PIC32MX_PORT
#include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.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

RE: Microchip MPLAB-X IDE OSX issues

Posted by Richard on August 14, 2011
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.”

RE: Microchip MPLAB-X IDE OSX issues

Posted by Bopamo Osaisai on December 18, 2011
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!




RE: Microchip MPLAB-X IDE OSX issues

Posted by Richard Damon on December 18, 2011
What errors are you getting that makes your build unsuccessful?

RE: Microchip MPLAB-X IDE OSX issues

Posted by Bopamo Osaisai on December 18, 2011
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!

RE: Microchip MPLAB-X IDE OSX issues

Posted by https://www.google.com/accounts on December 21, 2011
I really think usage of backslash in C source is wrong. What if your directory name is 007? "..\007\" 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

RE: Microchip MPLAB-X IDE OSX issues

Posted by Bopamo Osaisai on December 22, 2011
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

RE: Microchip MPLAB-X IDE OSX issues

Posted by Bopamo Osaisai on December 23, 2011
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.

RE: Microchip MPLAB-X IDE OSX issues

Posted by Mathew Key on January 16, 2012
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

RE: Microchip MPLAB-X IDE OSX issues

Posted by Mathew Key on January 16, 2012
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

RE: Microchip MPLAB-X IDE OSX issues

Posted by Richard on January 16, 2012
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.

RE: Microchip MPLAB-X IDE OSX issues

Posted by Mathew Key on January 17, 2012
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

RE: Microchip MPLAB-X IDE OSX issues

Posted by Bopamo Osaisai on January 17, 2012
Hello Mat,

Hopefully everything is working now?

Best regards,


RE: Microchip MPLAB-X IDE OSX issues

Posted by Felix Hirzel on April 5, 2013
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[1]: Entering directory `F:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X'
make -f nbproject/Makefile-default.mk dist/default/production/MicroStickII-FreeRTOS-Test.X.production.hex
make[2]: Entering directory `F:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X'
"F:\Microchip\xc32\v1.20\bin\xc32-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:\Microchip\xc32\v1.20\bin\xc32-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:\Microchip\xc32\v1.20\bin\xc32-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:\Microchip\xc32\v1.20\bin\xc32-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:\Microchip\xc32\v1.20\bin\xc32-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[2]: Leaving directory `F:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X'
make[2]: *** [build/default/production/_ext/378054839/port_asm.o] Error 1
make[1]: Leaving directory `F:/MPLABXProjects/MicroStickII-FreeRTOS-Test.X'
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] 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.

RE: Microchip MPLAB-X IDE OSX issues

Posted by woops_ on April 5, 2013
“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.


RE: Microchip MPLAB-X IDE OSX issues

Posted by Felix Hirzel on April 5, 2013
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).

RE: Microchip MPLAB-X IDE OSX issues

Posted by Felix Hirzel on April 5, 2013
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.

RE: Microchip MPLAB-X IDE OSX issues

Posted by Felix Hirzel on April 5, 2013
Meant ISR_Support.h

Is there no way to edit a post on this forum?

RE: Microchip MPLAB-X IDE OSX issues

Posted by MEdwards on April 5, 2013
As this is an OSX thread could it be something as simple as using a backslash where a forward slash is needed?

RE: Microchip MPLAB-X IDE OSX issues

Posted by Felix Hirzel on April 24, 2013
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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS