Discussion forum for UAVDevBoard, Sparkfun's 3-axis IMU-based autopilot board

This is the place to discuss the new open source IMU-based autopilot board by Bill Premerlani.

Views: 14801

Reply to This

Replies to This Discussion


It seems likely that you have MPLAB installed, but that you do not have the C Compiler installed.

MPLAB cannot find the a "build tool".

I think it is best to get the latest C compiler and install that on your computer. The one on the CD may be out of date.
We know that a previous compiler had a nasty performance bug in it's printf code. So you should get the latest version.

The C compiler page is shown here

You can download and use the "MPLab Compiler for dsPIC V3.23 Standard-Eval Version"

You will need to register with the website and create a login to be able to download the code.

Jonny, Just to confirm that the evaluation compiler is free. That is the compiler that most of us use in the UAV DevBoard Project.
Hi Pete

I downloaded the C compiler as instructed but the build is still failing?????????????????????

Anyone else had this message?

Release build of project `C:\Documents and Settings\admin\My Documents\MatrixPilot-2_0_3\MatrixPilot.mcp' started.
Language tool versions: pic30-as.exe v3.23, pic30-gcc.exe v3.23, pic30-ld.exe v3.23, pic30-ar.exe v3.23
Wed Mar 24 20:58:01 2010
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=30F4011 -x c -c "analog2digital.c" -o"analog2digital.o" -Werror
Microchip MPLAB C30 License Manager Version v3_23 (Build Date Jan 15 2010).
Copyright (c) 2008 Microchip Technology Inc. All rights reserved.
The installed license is invalid for this device.
pic30-coff-cc1.exe: error: Your license is invalid for the device selected.
Select an appropriate device, or acquire the correct license.
Visit http://www.microchip.com/ to purchase a new key.
Halting build on first failure as requested.
Release build of project `C:\Documents and Settings\admin\My Documents\MatrixPilot-2_0_3\MatrixPilot.mcp' failed.
Language tool versions: pic30-as.exe v3.23, pic30-gcc.exe v3.23, pic30-ld.exe v3.23, pic30-ar.exe v3.23
Wed Mar 24 20:58:02 2010

We are making progress. Great !

I think that you now just have to select the right device for the build. In other words, you just have to tell the project what type of micro processor you are building for . Actually, William Premerlani recently uploaded a post exactly about this at this location.

Here is his message:-


After you install Microchip MPLAB IDE for the first time, be sure to set the
device type to dsPIC30F4011, under the Configure tab.

Otherwise, you will get a "BUILD FAIL" error message when you try to build
any of the UDB firmware, because the default device type that gets set
during installation is not the dsPIC30F4011.

Once you set the device type to dsPIC30F4011, MPLAB will remember.

Best regards,

So Jonny, please could you follow Bill advice and then do a "Build All"

Hi Pete

The device is set to dsPIC30F4011, I set that last week when I first started, hopefully someone will recognise or understand the error message as I am exhausted

Thank you for the advice
Kind regards

First of all, take a break, go do something entirely different to clear your mind.

I am really sorry that you are running into so much trouble.

I have only seen this particular problem reported once before. Whoever had the problem was able to figure it out, I do not remember exactly what he did to solve it. I think he contacted Microchip.

The problem that you are running into seems to be entirely a software issue, it does not have anything to do with the UAV DevBoard, or with your progammer/debugger.

So, at this point, I suggest that you contact Microchip tech support and tell them you are having a problem with MPLAB and the C compiler, and see if they have any suggestions. It looks to be a problem with their license manager.

In the meantime, maybe someone else who has run into the same problem will step forward.

If you do find out what the problem is with the Microchip license manager, please let me know, so that I can pass along the information to anyone else who has the same problem.

Best regards,
Hi Bill,

Are you prefer 500 degrees/second rate lieu using 2000 degrees/second InvenSense in UDB v3?
Please explain it.


I compared my build with yours.

I receive the following message for a compilation step:

Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=30F4011 -x c -c "analog2digital.c" -o"analog2digital.o" -g

I noticed that your message is slightly different:

Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=30F4011 -x c -c "analog2digital.c" -o"analog2digital.o" -Werror

I show the differences betwen the two in bold. My build uses a "-g" options whereas yours uses "-Werror". I do not know if that is significant or not.

When you were trying to get the build to work before you had the compiler, did you change any of the project or build options having to do with compilation? Did you accidentally download the licensed version of the compiler?

There is both a licensed version of the compiler, and the evaluation version. If you accidentally downloaded the licensed version, you would get exactly the error messages you saw, because you do not have a license.

If you think you might have either changed some MPLAB options, or perhaps downloaded the licensed version of the compiler, then the thing to do (I am sorry) is to start fresh. It would be a lot of work, but I think it would get you past this hurdle.

1. Uninstall MPLAB and the C compiler.
2. Reinstall the latest versions of MPLAB and the evaluation version of the C compiler.
3. Set the device type to dsPIC30F4011 in MPLAB.
4. Try the build again.

Here is a link to the free compiler.

I prefer to use 500 degrees/second rate instead of 2000 degrees/second, because the 500 degree/second gyro will have lower effective drift and noise than the 2000 degrees/second one. Since they are both made by InvenSense, I would expect they would both have about the same percentage drift and noise. So, the 2000 degrees/second one will have about 4 times the drift and noise of the 500 one.

We have done tests on the 500 degree/second gyros, and they actually will work up to about 700 degrees/second.

Some members of the team have been flying AcroMasters, with prototype UAV DevBoards with the 500 degree/second gyros. The fastest rotation rate of an AcroMaster is about 700 degrees per second, and if you blink, you will miss it. A complete 360 degree roll takes a little over 1 second. From the videos that I have seen, the Acromaster represents very nearly the "upper edge" of the envelope.

I am not aware of any planes that can roll at 2000 degrees/second, that is more than 5 turns in one second. In any case, I believe the 700 degree/sec actual range of the 500 degree/sec Invensense gyro will handle the majority of the types of planes that people are flying.

Best regards,

I thought of one more thing to try...

The Microchip documentation for the C compiler says that you need to restart your computer have installing the compiler. You might want to try that.

Thanks Billu
I'm having a short break, will be back on all cylinders tomorrow.
It is something simple, I know that and I will get to the bottom of it.

One queery though, all the lights have stopped working on the UDB? is it possible that the programmer has wiped all code off the chip and they have no code?

I will keep you informed of my progress

Many thanks
Hi Jonny,

A break is just what you need. I find that when I am stuck on something, after I take a break, I come back with renewed energy and fresh ideas.

When you say the lights have stopped working on the UDB, do you mean with or without the the PICkit connected?

The PICkit can stop the UDB from running.

If the PICkit is not connected, the self test program that is on the UDB when it is shipped should turn the LEDs on briefly at power up. It not, then chances are that you erased the PIC. That is no cause for concern. How that might have happened is if you tried to program the UDB after the build failed. At that point, the UDB would be erased.

In any case, I will stick with you until we get your UDB flying. I do not see any reason why we cannot. I am sorry that you are running into so much trouble, but if it is any consolation, it will help others. I learn more from users who run into trouble than I do from those who do not have any problems. So, our experience grows. Soon it will be time for us to revise all of the documentation, there is a lot we have learned lately.

Best regards,
Billu Bhaiya

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service