MegaPirateNG / ardupilot-mpng

MegaPirateNG
GNU General Public License v3.0
116 stars 104 forks source link

Arducopter platform, compiling sketch issue #186

Open Pyxis31 opened 9 years ago

Pyxis31 commented 9 years ago

Hi all, I've prepared the Arduino environment as described in the documents, i've selected my platform (Arducopter), no problem so far. But, when i compile the source code, i get this error -->

Buiding for MegaPirateNG Excluding arduino core from include paths avr-gcc unrecognized command line option '-assembler-with-cpp-'

What does it mean ? how can i avoid it ?

Thanks in advance

gergalyb commented 9 years ago

Hi! I could narrow down this problem to that newer gcc uses this command instead: -x assembler-with-cpp

I was using 64bit win8.1. The compiling worked on OSX 10.9.5

Arturete commented 8 years ago

Hi!

I have the same problem. Where is the file that i have to modify?? Are there another solutions??

I am using 64bit win8.1.

thanks!!

gergalyb commented 8 years ago

You could try booting into linux and trying to compile it there

efman commented 8 years ago

I have had the same error messenger. I tried to change -assembler-with-cpp by -x assembler-with-cpp but I don't know where find the directory. Could you give me the location or the file name? thank you!

gergalyb commented 8 years ago

ArduPilot-Arduino-1.0.3-windows\hardware\tools\avr\bin As you can see in this folder there are avr-gcc-4.3.2, avr-gcc-4.7.2 and avr-gcc-4.8.2. Arduino uses the one that is named avr-gcc.exe and in that folder the file size of 4.8.2 and the plain one is the same so they are the same. This is the compiler itself so I don't think you can solve this problem by modifiying these files.

gergalyb commented 8 years ago

The problem is that 4.8.2 only supports -x assembler-with-cpp. If you change the plain avr.gcc.exe to an older gcc version than it will support assembler-with-cpp but it doesn't know about newer commands that are used in ardupilot so it will fail to compile with a bunch more errors.

efman commented 8 years ago

I've seen it myself . as you told me, I changed to an older gcc version and it doesn't know the new commands. Then , I can't change gcc version , I don't have MAC and I can't rewrite the command -x assembler -with- cpp because I don´t know how to find it . The only solution is to compile with Ubuntu?

gergalyb commented 8 years ago

Yes, I think compiling with ubuntu might be the best solution.

efman commented 8 years ago

ok, thank you, I try to do it. I'll tell you the progress ;)

TxTwist2000 commented 7 years ago

And.. if you don't want to download/install Ubuntu, or buy a Mac? Can the installation docs be updated with links/screen shots that are current and will actually get you flying? :)

Bazmundi commented 6 years ago

The relevant file in a later version of the IDE is:

https://github.com/arduino/Arduino/blob/ide-1.5.x/hardware/arduino/avr/platform.txt

The problem may be built into the IDE use for megapirate, since it uses an older version and doesn't seem to use a text file to set the compile parameters??