MPLABX compile error -- p30f4011.h: No such file or directory

1,920 views
Skip to first unread message

Phil Giacalone

unread,
Oct 28, 2012, 3:16:03 PM10/28/12
to uavdevboard
Hi,

I'm trying MPLAB X IDE v1.41 on my MacBook but get a compiler error
due to a missing file (p30f4011.h). The file exists on the path below,
but I don't know how to add it to the project.

/Applications/microchip/xc16/v1.10/support/dsPIC30F/h/p30f4011.h

What's the process to add a header file?

Best regards,
Phil

CLEAN SUCCESSFUL (total time: 117ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/Users/phil/dev/UAV/gentlenav/MatrixPilot/
MatrixPilot-udb4.X'
make -f nbproject/Makefile-default.mk dist/default/production/
MatrixPilot-udb4.X.production.hex
make[2]: Entering directory `/Users/phil/dev/UAV/gentlenav/MatrixPilot/
MatrixPilot-udb4.X'
"/Applications/microchip/xc16/v1.10/bin/xc16-gcc" ../../libDCM/
estWind.c -o build/default/production/_ext/1077471063/estWind.o -c -
mcpu=33FJ256GP710A -MMD -MF "build/default/production/_ext/1077471063/
estWind.o.d" -g -omf=coff -legacy-libc -mlarge-code -O0 -
I"../../MAVLink/include" -I".." -I"../../libUDB" -I"../../libDCM" -
I"../../MAVLink/include/common" -I"../../MAVLink/include/matrixpilot" -
msmart-io=1 -Wall -msfr-warn=off
In file included from ../../libDCM/../libUDB/libUDB.h:28:0,
from ../../libDCM/libDCM.h:26,
from ../../libDCM/libDCM_internal.h:22,
from ../../libDCM/estWind.c:22:
../../libDCM/../libUDB/libUDB_defines.h:61:22: fatal error:
p30f4011.h: No such file or directory
compilation terminated.
make[2]: *** [build/default/production/_ext/1077471063/estWind.o]
Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory `/Users/phil/dev/UAV/gentlenav/MatrixPilot/
MatrixPilot-udb4.X'
make[1]: Leaving directory `/Users/phil/dev/UAV/gentlenav/MatrixPilot/
MatrixPilot-udb4.X'

Peter Hollands

unread,
Oct 28, 2012, 3:27:25 PM10/28/12
to uavde...@googlegroups.com
Phil,

Are you compiling for a UDB3 (which has the dspic30F4011) ?

If not, and you are using UDB4, then you may be using the wrong project or workplace file. (I have not used MPLAB-X).

Best wishes, Pete


--
--



Phil Giacalone

unread,
Oct 28, 2012, 3:44:24 PM10/28/12
to uavdevboard
Hi Pete,

Well, I think I'm compiling for the UDB4 :-)

Here's what I did...

I did a brand new install of MPLABX v1.41
Then I grabbed MatrixPilot 3.3 from the wiki
Then I launched MPLABX and opened the MatrixPilot 3.3 project by
choosing a file called MatrixPilot-udb4.X.
Then I tried to compile it and got the error message.

So I assume the project should be setup for UDB4, but I could be doing
something wrong.

Best regards,
Phil


On Oct 28, 12:27 pm, Peter Hollands <peter.holla...@gmail.com> wrote:
> Phil,
>
> Are you compiling for a UDB3 (which has the dspic30F4011) ?
>
> If not, and you are using UDB4, then you may be using the wrong project or
> workplace file. (I have not used MPLAB-X).
>
> Best wishes, Pete
>

Phil Giacalone

unread,
Oct 28, 2012, 7:43:26 PM10/28/12
to uavdevboard
Hi Pete,

Ok, I have the solution (Thanks, Ben!)

The problem was with the options.h file, which defines the BOARD_TYPE
as UDB3_BOARD by default. No surprise, eh?

I wrongly assumed that MatrixPilot would default to UDB4 by now. Does
it make any sense to do this?

Best regards,
Phil

Peter Hollands

unread,
Oct 29, 2012, 1:38:18 AM10/29/12
to uavde...@googlegroups.com
Hi Phil,

There is an argument that all mandatory settings in options.h should default to a type which causes a nice human readable error from the compiler, if the user has not set them.

For example, the board type line could defaul in the download to:-
#define BOARD_TYPE    NEEDS_TO_BE_SET_BY_USER

would cause the file that tests for configuration errors to say something like this during compile:-
Compile Failed: Error on line 12 of options.h "BOARD_TYPE" needs to be set in options.h by the user"

That is probably the best option to my mind.

Best wishes, Pete


--
--



Phil Giacalone

unread,
Oct 30, 2012, 12:43:43 AM10/30/12
to uavdevboard
Hi all,

Now that I've overcome my stupid compilation mistakes with MPLAB X IDE
v1.41 (thanks, guys), I wanted to say how impressed I am with the new
release of the IDE. I'm using it on a Mac with OS X 10.6.8 and
everything just works better, faster, and more easily. And there are
some nice features in MPLABX, like a graphing feature to visualize and
navigate the code.

And integration with the PICkit3 seems to be much better. I think I
read something about Microchip using new USB drivers. Whatever they
did, everything just works more smoothly now. Previously I would
sometimes get glitches and have to reboot my PC to get connectivity
with the UDB. Haven't had a single problem with MPLABX so far.


The recent release of MatrixPilot 3.3 put a fire under me to upgrade
both the UDB and my IDE. I've been happily using MatrixPilot 3.2.1 for
a year now with hundreds of great flights. Anyway, I'll be taking my
HawkSky out for a few flights tomorrow to test drive MatrixPilot 3.3
and will report back. Sorry to say this to the east coasters, but the
weather in California is excellent. Hope everyone made it through the
storms safely and without costly damage.

Looking forward to Matrix Pilot 3.3 flying. Thanks again to everyone
for their efforts on this new release!

Best regards,
Phil


On Oct 28, 10:38 pm, Peter Hollands <peter.holla...@gmail.com> wrote:
> Hi Phil,
>
> There is an argument that all mandatory settings in options.h should
> default to a type which causes a nice human readable error from the
> compiler, if the user has not set them.
>
> For example, the board type line could defaul in the download to:-
> #define BOARD_TYPE    NEEDS_TO_BE_SET_BY_USER
>
> would cause the file that tests for configuration errors to say something
> like this during compile:-
> Compile Failed: Error on line 12 of options.h "BOARD_TYPE" needs to be set
> in options.h by the user"
>
> That is probably the best option to my mind.
>
> Best wishes, Pete
>

Phil Giacalone

unread,
Oct 31, 2012, 1:16:45 AM10/31/12
to uavdevboard
Hi all,

Just a quick report on my first flight with MatrixPilot 3.3.

My HawkSky was rock steady in the air and maneuvered with more crisp
controls during aerobatics. All modes worked perfectly, including loss
of tx signal. All my options.h settings were unchanged relative to
what was used with MatrixPilot 3.2.1 but overall the controls just
seemed smoother, steadier, and more crisp.

Excellent work, guys.

Best regards,
Phil

Phil Giacalone

unread,
Nov 3, 2012, 4:19:58 PM11/3/12
to uavde...@googlegroups.com
Hi all,

Just wanted to post a little note about a recent MPLABX problem and solution -- in case someone else encounters it.

I had been using MPLABX 1.41 successfully with Mac OS X 10.6.8. Yesterday I updated the Mac to 10.8.2 and immediately started having problems when I tried to program the device. Here is the error message:

    PICkit 3 not found The last tool used for this project is unavailable, please select the tool...

The fix was easy -- uninstall
MPLABX 1.41 and install MPLABX 1.50. Problem resolved.

Best regards,
Phil


Reply all
Reply to author
Forward
0 new messages