Hello all,
I was trying to compile ArduPlane Code from Arduino IDE. I got following errors: Could you please help me out?
In file included from C:\Users\dawadea\Documents\ardupilot\libraries\AP_Progmem/AP_Progmem.h:5,
from ArduPlane.ino:35:
C:\Users\dawadea\Documents\ardupilot\libraries\AP_HAL/AP_HAL_Boards.h:91:2: error: #error "Unknown CONFIG_HAL_BOARD type"
In file included from C:\Users\dawadea\Documents\ardupilot\libraries\AP_Compass/AP_Compass_HMC5843.h:9,
from C:\Users\dawadea\Documents\ardupilot\libraries\AP_Compass/AP_Compass.h:6,
from ArduPlane.ino:41:
C:\Users\dawadea\Documents\ardupilot\libraries\AP_Compass/Compass.h:37:3: error: #error "You must define a default compass orientation for this board"
In file included from C:\Users\dawadea\Documents\ardupilot\libraries\AP_Notify/AP_Notify.h:22,
from ArduPlane.ino:74:
C:\Users\dawadea\Documents\ardupilot\libraries\AP_Notify/AP_BoardLED.h:64:2: error: #error "Unknown board type in AP_Notify"
In file included from ArduPlane.ino:85:
C:\Users\dawadea\AppData\Local\Temp\build7441579889674349359.tmp\/config.h:128:4: error: #error "CONFIG_BARO not set"
C:\Users\dawadea\AppData\Local\Temp\build7441579889674349359.tmp\/config.h:132:4: error: #error "CONFIG_COMPASS not set"
ArduPlane.ino:216:3: error: #error Unrecognized CONFIG_BARO setting
ArduPlane.ino:226:3: error: #error Unrecognized CONFIG_COMPASS setting
ArduPlane.ino:278:4: error: #error Unrecognised CONFIG_INS_TYPE setting.
ArduPlane.ino:263: error: 'void delay(uint32_t)' was declared 'extern' and later 'static'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:133: error: previous declaration of 'void delay(long unsigned int)'
ArduPlane.ino:265: error: 'uint32_t millis()' was declared 'extern' and later 'static'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:131: error: previous declaration of 'long unsigned int millis()'
ArduPlane.ino:266: error: 'uint32_t micros()' was declared 'extern' and later 'static'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:132: error: previous declaration of 'long unsigned int micros()'
ArduPlane.ino:104: error: 'AP_HAL_BOARD_DRIVER' was not declared in this scope
ArduPlane.ino:285: error: 'ins' was not declared in this scope
ArduPlane.ino:285: error: 'barometer' was not declared in this scope
ArduPlane.ino:706: error: 'barometer' was not declared in this scope
ArduPlane.ino: In function 'void loop()':
ArduPlane.ino:861: error: 'ins' was not declared in this scope
ArduPlane.ino: In function 'void update_compass()':
ArduPlane.ino:952: error: 'compass' was not declared in this scope
ArduPlane.ino: In function 'void compass_accumulate()':
ArduPlane.ino:969: error: 'compass' was not declared in this scope
ArduPlane.ino: In function 'void barometer_accumulate()':
ArduPlane.ino:978: error: 'barometer' was not declared in this scope
ArduPlane.ino: In function 'void compass_save()':
ArduPlane.ino:1087: error: 'compass' was not declared in this scope
ArduPlane.ino: In function 'void update_GPS_10Hz()':
ArduPlane.ino:1179: error: 'compass' was not declared in this scope
ArduPlane.ino: In function 'void update_alt()':
ArduPlane.ino:1472: error: 'barometer' was not declared in this scope
ArduPlane.ino: At global scope:
ArduPlane.ino:1508: error: expected constructor, destructor, or type conversion before ';' token
Attitude.ino: In function 'void stabilize()':
Attitude.ino:347: error: 'barometer' was not declared in this scope
sensors.ino: In function 'void init_barometer()':
sensors.ino:6: error: 'barometer' was not declared in this scope
setup.ino: In function 'int8_t setup_declination(uint8_t, const Menu::arg*)':
setup.ino:353: error: 'compass' was not declared in this scope
setup.ino: In function 'int8_t setup_accel_scale(uint8_t, const Menu::arg*)':
setup.ino:398: error: 'ins' was not declared in this scope
setup.ino: In function 'int8_t setup_compass(uint8_t, const Menu::arg*)':
setup.ino:414: error: 'compass' was not declared in this scope
setup.ino:424: error: 'compass' was not declared in this scope
setup.ino: In function 'void report_compass()':
setup.ino:467: error: 'compass' was not declared in this scope
setup.ino:487: error: 'compass' was not declared in this scope
setup.ino: In function 'void print_accel_offsets_and_scaling()':
setup.ino:611: error: 'ins' was not declared in this scope
setup.ino: In function 'void print_gyro_offsets()':
setup.ino:625: error: 'ins' was not declared in this scope
system.ino: In function 'void init_ardupilot()':
system.ino:116: error: 'barometer' was not declared in this scope
system.ino:170: error: 'compass' was not declared in this scope
system.ino: In function 'void startup_INS_ground(bool)':
system.ino:469: error: 'ins' was not declared in this scope
test.ino: In function 'int8_t test_ins(uint8_t, const Menu::arg*)':
test.ino:432: error: 'ins' was not declared in this scope
test.ino:453: error: 'compass' was not declared in this scope
test.ino: In function 'int8_t test_mag(uint8_t, const Menu::arg*)':
test.ino:485: error: 'compass' was not declared in this scope
test.ino:492: error: 'compass' was not declared in this scope
test.ino:496: error: 'ins' was not declared in this scope
test.ino: In function 'int8_t test_pressure(uint8_t, const Menu::arg*)':
test.ino:592: error: 'barometer' was not declared in this scope
Replies
Randy
First of all thank you for response
I hope your are using exactly the same tools as inside the wiki
I had same experience like Julien Dubois here
and I believe ArduPilot-Arduino-1.0.3-gcc-4.7.2-windows.zip , even you have updated 4.72 at title link, when extracted I got the library of the GCC still 4.3 . can you take a look?
I was struggling yesterday to fix my bootloader at 2560 and this is unmodified hex from Arduino ardupilot pacth (stk500boot_v2_mega2560.hex)
I managed to fix my board like Julien did, but 1 byte still missed match and the good thing is worked and I doubt eventually this boot loader will create problem to the firmware.
See here comment from Bill Bonney here
I hope the modified one will be released in hex file since been update 20 days ago. below
https://github.com/diydrones/ardupilot/tree/master/Tools/APM2_2560_...
I don't know about the master you can get 245,298 with the same tools at the wiki.
Thank you
Naitsuga
Randy
Forget about my problem I solve it
I think there is confusion about my arduino IDE I have instaledl Ardunio 1.05 some how the registry and other things is not clean enough and also my kaspersky AV
and I compile exactly like yours 245,298 bytes :)
but some warning at
Motors.pde 'in function bool pre__arm_gps.....
is that normal
I apologize for my stupidity.
Thank you very much
BTW do you know how to save on hex before upload in IDE
Thanks Randy,
I found that later last evening. I am going through all the steps. I hope it will work. In the past I had problem with Ardupilot Arduino 1.0.3. While compiling it was throwing error: "Sketch is too big".