I have been trying to get 2.9 to build so I can beta test and I cannot get it to compile. I have followed the Wiki and other instructions, but when I try to build I get a huge list of errors - most of which appear to be around variable declarations. It looks to me like it maybe it is not finding the libraries. This is the directory structure I have:

My Documents

     ArduPilot-Arduino-1.0.3-windows

     ardupilot-mega-9235ce36ede9

          ArducCopter

              all the source code

          libraries

              all the library files

 

I run Arduino (as Administrator, just in case), set the ardupilot-mega-9235ce36ede9 folder as the sketchbook folder and open Arducopter/ArduCopter.pde from there. This opens all the various files into tabs in the editor.

 

If I click the Verify button, I get several hundred errors (see below) - this feels like I am missing some simple step - but I am darned if I know what it might be. HELP!

Log:1190: error: 'data' was not declared in this scope
Log:1193: error: 'log_step' was not declared in this scope
Parameters.pde: In function 'void load_parameters()':
Parameters:672: error: 'micros' was not declared in this scope
commands.pde: In function 'void set_cmd_with_index(Location, int)':
commands:74: error: 'constrain' was not declared in this scope
commands.pde: In function 'int32_t get_RTL_alt()':
commands:111: error: 'min' was not declared in this scope
commands:113: error: 'min' was not declared in this scope
commands.pde: In function 'void set_next_WP(Location*)':
commands:156: error: 'max' was not declared in this scope
commands.pde: In function 'void init_home()':
commands:196: error: 'Log_Write_Cmd' was not declared in this scope
commands_logic.pde: In function 'void do_RTL()':
commands_logic:230: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_takeoff()':
commands_logic:246: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_nav_wp()':
commands_logic:264: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_land()':
commands_logic:293: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_unlimited()':
commands_logic:300: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_turns()':
commands_logic:315: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'void do_loiter_time()':
commands_logic:342: error: 'wp_control' was not declared in this scope
commands_logic:343: error: 'millis' was not declared in this scope
commands_logic:346: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'bool verify_nav_wp()':
commands_logic:395: error: 'millis' was not declared in this scope
commands_logic:405: error: 'wp_control' was not declared in this scope
commands_logic:407: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'bool verify_loiter_unlimited()':
commands_logic:426: error: 'wp_control' was not declared in this scope
commands_logic.pde: In function 'bool verify_loiter_time()':
commands_logic:436: error: 'wp_control' was not declared in this scope
commands_logic:437: error: 'millis' was not declared in this scope
commands_logic:441: error: 'wp_control' was not declared in this scope
commands_logic:443: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'bool verify_RTL()':
commands_logic:485: error: 'wp_control' was not declared in this scope
commands_logic:499: error: 'wp_control' was not declared in this scope
commands_logic:502: error: 'millis' was not declared in this scope
commands_logic:511: error: 'millis' was not declared in this scope
commands_logic:536: error: 'set_mode' was not declared in this scope
commands_logic.pde: In function 'void do_wait_delay()':
commands_logic:568: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'void do_yaw()':
commands_logic:604: error: 'constrain' was not declared in this scope
commands_logic.pde: In function 'bool verify_wait_delay()':
commands_logic:622: error: 'millis' was not declared in this scope
commands_logic.pde: In function 'void do_repeat_servo()':
commands_logic:815: error: 'event_id' was not declared in this scope
commands_logic.pde: In function 'void do_repeat_relay()':
commands_logic:844: error: 'event_id' was not declared in this scope
commands_process.pde: In function 'void change_command(uint8_t)':
commands_process:9: error: 'min' was not declared in this scope
commands_process.pde: In function 'void execute_nav_command()':
commands_process:159: error: 'Log_Write_Cmd' was not declared in this scope
commands_process.pde: In function 'void exit_mission()':
commands_process:223: error: 'set_mode' was not declared in this scope
commands_process:225: error: 'set_mode' was not declared in this scope
control_modes.pde: In function 'void read_control_switch()':
control_modes:8: error: 'byte' was not declared in this scope
control_modes:8: error: expected `;' before 'switchPosition'
control_modes:10: error: 'oldSwitchPosition' was not declared in this scope
control_modes:10: error: 'switchPosition' was not declared in this scope
control_modes:18: error: 'set_mode' was not declared in this scope
control_modes.pde: At global scope:
control_modes:34: error: 'byte' does not name a type
control_modes.pde: In function 'void reset_control_switch()':
control_modes:47: error: 'oldSwitchPosition' was not declared in this scope
control_modes.pde: In function 'void read_trim_switch()':
control_modes:93: error: 'set_mode' was not declared in this scope
control_modes:116: error: 'set_mode' was not declared in this scope
control_modes:142: error: 'constrain' was not declared in this scope
control_modes.pde: In function 'void auto_trim()':
control_modes:187: error: 'led_mode' was not declared in this scope
events.pde: In function 'void failsafe_on_event()':
events:25: error: 'set_mode' was not declared in this scope
events:28: error: 'set_mode' was not declared in this scope
events:35: error: 'set_mode' was not declared in this scope
events:38: error: 'set_mode' was not declared in this scope
events:45: error: 'set_mode' was not declared in this scope
events:48: error: 'set_mode' was not declared in this scope
events.pde: In function 'void low_battery_event()':
events:76: error: 'set_mode' was not declared in this scope
events:81: error: 'set_mode' was not declared in this scope
events:84: error: 'set_mode' was not declared in this scope
events:88: error: 'set_mode' was not declared in this scope
events:101: error: 'bitRead' was not declared in this scope
events.pde: In function 'void update_events()':
events:110: error: 'millis' was not declared in this scope
events:114: error: 'millis' was not declared in this scope
events:116: error: 'event_id' was not declared in this scope
events:124: error: 'event_id' was not declared in this scope
failsafe.pde: In function 'void failsafe_enable()':
failsafe:20: error: 'micros' was not declared in this scope
leds.pde: In function 'void update_lights()':
leds:5: error: 'led_mode' was not declared in this scope
leds.pde: In function 'void update_GPS_light()':
leds:25: error: 'HIGH' was not declared in this scope
leds:25: error: 'bitWrite' was not declared in this scope
leds:25: error: 'bitWrite' was not declared in this scope
leds:25: error: 'digitalWrite' was not declared in this scope
leds:27: error: 'LOW' was not declared in this scope
leds:27: error: 'bitWrite' was not declared in this scope
leds:27: error: 'bitWrite' was not declared in this scope
leds:27: error: 'digitalWrite' was not declared in this scope
leds:35: error: 'LOW' was not declared in this scope
leds:35: error: 'bitWrite' was not declared in this scope
leds:35: error: 'bitWrite' was not declared in this scope
leds:35: error: 'digitalWrite' was not declared in this scope
leds:37: error: 'HIGH' was not declared in this scope
leds:37: error: 'bitWrite' was not declared in this scope
leds:37: error: 'bitWrite' was not declared in this scope
leds:37: error: 'digitalWrite' was not declared in this scope
leds:44: error: 'LOW' was not declared in this scope
leds:44: error: 'bitWrite' was not declared in this scope
leds:44: error: 'bitWrite' was not declared in this scope
leds:44: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void update_motor_light()':
leds:56: error: 'HIGH' was not declared in this scope
leds:56: error: 'bitWrite' was not declared in this scope
leds:56: error: 'bitWrite' was not declared in this scope
leds:56: error: 'digitalWrite' was not declared in this scope
leds:58: error: 'LOW' was not declared in this scope
leds:58: error: 'bitWrite' was not declared in this scope
leds:58: error: 'bitWrite' was not declared in this scope
leds:58: error: 'digitalWrite' was not declared in this scope
leds:63: error: 'HIGH' was not declared in this scope
leds:63: error: 'bitWrite' was not declared in this scope
leds:63: error: 'bitWrite' was not declared in this scope
leds:63: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void dancing_light()':
leds:70: error: 'byte' does not name a type
leds:72: error: 'step' was not declared in this scope
leds:75: error: 'step' was not declared in this scope
leds:78: error: 'LOW' was not declared in this scope
leds:78: error: 'bitWrite' was not declared in this scope
leds:78: error: 'bitWrite' was not declared in this scope
leds:78: error: 'digitalWrite' was not declared in this scope
leds:79: error: 'HIGH' was not declared in this scope
leds:79: error: 'bitWrite' was not declared in this scope
leds:79: error: 'bitWrite' was not declared in this scope
leds:79: error: 'digitalWrite' was not declared in this scope
leds:83: error: 'LOW' was not declared in this scope
leds:83: error: 'bitWrite' was not declared in this scope
leds:83: error: 'bitWrite' was not declared in this scope
leds:83: error: 'digitalWrite' was not declared in this scope
leds:84: error: 'HIGH' was not declared in this scope
leds:84: error: 'bitWrite' was not declared in this scope
leds:84: error: 'bitWrite' was not declared in this scope
leds:84: error: 'digitalWrite' was not declared in this scope
leds:88: error: 'LOW' was not declared in this scope
leds:88: error: 'bitWrite' was not declared in this scope
leds:88: error: 'bitWrite' was not declared in this scope
leds:88: error: 'digitalWrite' was not declared in this scope
leds:89: error: 'HIGH' was not declared in this scope
leds:89: error: 'bitWrite' was not declared in this scope
leds:89: error: 'bitWrite' was not declared in this scope
leds:89: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void clear_leds()':
leds:95: error: 'LOW' was not declared in this scope
leds:95: error: 'bitWrite' was not declared in this scope
leds:95: error: 'bitWrite' was not declared in this scope
leds:95: error: 'digitalWrite' was not declared in this scope
leds:96: error: 'LOW' was not declared in this scope
leds:96: error: 'bitWrite' was not declared in this scope
leds:96: error: 'bitWrite' was not declared in this scope
leds:96: error: 'digitalWrite' was not declared in this scope
leds:97: error: 'LOW' was not declared in this scope
leds:97: error: 'bitWrite' was not declared in this scope
leds:97: error: 'bitWrite' was not declared in this scope
leds:97: error: 'digitalWrite' was not declared in this scope
leds:99: error: 'led_mode' was not declared in this scope
leds.pde: In function 'void update_copter_leds()':
leds:129: error: 'bitRead' was not declared in this scope
leds:151: error: 'bitRead' was not declared in this scope
leds:185: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_reset()':
leds:196: error: 'LOW' was not declared in this scope
leds:196: error: 'bitWrite' was not declared in this scope
leds:196: error: 'bitWrite' was not declared in this scope
leds:196: error: 'digitalWrite' was not declared in this scope
leds:197: error: 'LOW' was not declared in this scope
leds:197: error: 'bitWrite' was not declared in this scope
leds:197: error: 'bitWrite' was not declared in this scope
leds:197: error: 'digitalWrite' was not declared in this scope
leds:198: error: 'LOW' was not declared in this scope
leds:198: error: 'bitWrite' was not declared in this scope
leds:198: error: 'bitWrite' was not declared in this scope
leds:198: error: 'digitalWrite' was not declared in this scope
leds:199: error: 'LOW' was not declared in this scope
leds:199: error: 'bitWrite' was not declared in this scope
leds:199: error: 'bitWrite' was not declared in this scope
leds:199: error: 'digitalWrite' was not declared in this scope
leds:200: error: 'LOW' was not declared in this scope
leds:200: error: 'bitWrite' was not declared in this scope
leds:200: error: 'bitWrite' was not declared in this scope
leds:200: error: 'digitalWrite' was not declared in this scope
leds:201: error: 'LOW' was not declared in this scope
leds:201: error: 'bitWrite' was not declared in this scope
leds:201: error: 'bitWrite' was not declared in this scope
leds:201: error: 'digitalWrite' was not declared in this scope
leds:202: error: 'LOW' was not declared in this scope
leds:202: error: 'bitWrite' was not declared in this scope
leds:202: error: 'bitWrite' was not declared in this scope
leds:202: error: 'digitalWrite' was not declared in this scope
leds:203: error: 'LOW' was not declared in this scope
leds:203: error: 'bitWrite' was not declared in this scope
leds:203: error: 'bitWrite' was not declared in this scope
leds:203: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_on()':
leds:207: error: 'bitRead' was not declared in this scope
leds:208: error: 'HIGH' was not declared in this scope
leds:208: error: 'bitWrite' was not declared in this scope
leds:208: error: 'bitWrite' was not declared in this scope
leds:208: error: 'digitalWrite' was not declared in this scope
leds:215: error: 'HIGH' was not declared in this scope
leds:215: error: 'bitWrite' was not declared in this scope
leds:215: error: 'bitWrite' was not declared in this scope
leds:215: error: 'digitalWrite' was not declared in this scope
leds:217: error: 'bitRead' was not declared in this scope
leds:218: error: 'HIGH' was not declared in this scope
leds:218: error: 'bitWrite' was not declared in this scope
leds:218: error: 'bitWrite' was not declared in this scope
leds:218: error: 'digitalWrite' was not declared in this scope
leds:220: error: 'HIGH' was not declared in this scope
leds:220: error: 'bitWrite' was not declared in this scope
leds:220: error: 'bitWrite' was not declared in this scope
leds:220: error: 'digitalWrite' was not declared in this scope
leds:221: error: 'HIGH' was not declared in this scope
leds:221: error: 'bitWrite' was not declared in this scope
leds:221: error: 'bitWrite' was not declared in this scope
leds:221: error: 'digitalWrite' was not declared in this scope
leds:222: error: 'HIGH' was not declared in this scope
leds:222: error: 'bitWrite' was not declared in this scope
leds:222: error: 'bitWrite' was not declared in this scope
leds:222: error: 'digitalWrite' was not declared in this scope
leds:223: error: 'HIGH' was not declared in this scope
leds:223: error: 'bitWrite' was not declared in this scope
leds:223: error: 'bitWrite' was not declared in this scope
leds:223: error: 'digitalWrite' was not declared in this scope
leds:224: error: 'HIGH' was not declared in this scope
leds:224: error: 'bitWrite' was not declared in this scope
leds:224: error: 'bitWrite' was not declared in this scope
leds:224: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_off()':
leds:228: error: 'bitRead' was not declared in this scope
leds:229: error: 'LOW' was not declared in this scope
leds:229: error: 'bitWrite' was not declared in this scope
leds:229: error: 'bitWrite' was not declared in this scope
leds:229: error: 'digitalWrite' was not declared in this scope
leds:236: error: 'LOW' was not declared in this scope
leds:236: error: 'bitWrite' was not declared in this scope
leds:236: error: 'bitWrite' was not declared in this scope
leds:236: error: 'digitalWrite' was not declared in this scope
leds:238: error: 'bitRead' was not declared in this scope
leds:239: error: 'LOW' was not declared in this scope
leds:239: error: 'bitWrite' was not declared in this scope
leds:239: error: 'bitWrite' was not declared in this scope
leds:239: error: 'digitalWrite' was not declared in this scope
leds:241: error: 'LOW' was not declared in this scope
leds:241: error: 'bitWrite' was not declared in this scope
leds:241: error: 'bitWrite' was not declared in this scope
leds:241: error: 'digitalWrite' was not declared in this scope
leds:242: error: 'LOW' was not declared in this scope
leds:242: error: 'bitWrite' was not declared in this scope
leds:242: error: 'bitWrite' was not declared in this scope
leds:242: error: 'digitalWrite' was not declared in this scope
leds:243: error: 'LOW' was not declared in this scope
leds:243: error: 'bitWrite' was not declared in this scope
leds:243: error: 'bitWrite' was not declared in this scope
leds:243: error: 'digitalWrite' was not declared in this scope
leds:244: error: 'LOW' was not declared in this scope
leds:244: error: 'bitWrite' was not declared in this scope
leds:244: error: 'bitWrite' was not declared in this scope
leds:244: error: 'digitalWrite' was not declared in this scope
leds:245: error: 'LOW' was not declared in this scope
leds:245: error: 'bitWrite' was not declared in this scope
leds:245: error: 'bitWrite' was not declared in this scope
leds:245: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_slow_blink()':
leds:249: error: 'copter_leds_motor_blink' was not declared in this scope
leds:252: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_fast_blink()':
leds:262: error: 'copter_leds_motor_blink' was not declared in this scope
leds.pde: In function 'void copter_leds_oscillate()':
leds:273: error: 'copter_leds_motor_blink' was not declared in this scope
leds:275: error: 'bitRead' was not declared in this scope
leds:276: error: 'HIGH' was not declared in this scope
leds:276: error: 'bitWrite' was not declared in this scope
leds:276: error: 'bitWrite' was not declared in this scope
leds:276: error: 'digitalWrite' was not declared in this scope
leds:283: error: 'HIGH' was not declared in this scope
leds:283: error: 'bitWrite' was not declared in this scope
leds:283: error: 'bitWrite' was not declared in this scope
leds:283: error: 'digitalWrite' was not declared in this scope
leds:285: error: 'bitRead' was not declared in this scope
leds:286: error: 'LOW' was not declared in this scope
leds:286: error: 'bitWrite' was not declared in this scope
leds:286: error: 'bitWrite' was not declared in this scope
leds:286: error: 'digitalWrite' was not declared in this scope
leds:288: error: 'LOW' was not declared in this scope
leds:288: error: 'bitWrite' was not declared in this scope
leds:288: error: 'bitWrite' was not declared in this scope
leds:288: error: 'digitalWrite' was not declared in this scope
leds:289: error: 'HIGH' was not declared in this scope
leds:289: error: 'bitWrite' was not declared in this scope
leds:289: error: 'bitWrite' was not declared in this scope
leds:289: error: 'digitalWrite' was not declared in this scope
leds:290: error: 'HIGH' was not declared in this scope
leds:290: error: 'bitWrite' was not declared in this scope
leds:290: error: 'bitWrite' was not declared in this scope
leds:290: error: 'digitalWrite' was not declared in this scope
leds:291: error: 'LOW' was not declared in this scope
leds:291: error: 'bitWrite' was not declared in this scope
leds:291: error: 'bitWrite' was not declared in this scope
leds:291: error: 'digitalWrite' was not declared in this scope
leds:292: error: 'LOW' was not declared in this scope
leds:292: error: 'bitWrite' was not declared in this scope
leds:292: error: 'bitWrite' was not declared in this scope
leds:292: error: 'digitalWrite' was not declared in this scope
leds:294: error: 'bitRead' was not declared in this scope
leds:295: error: 'LOW' was not declared in this scope
leds:295: error: 'bitWrite' was not declared in this scope
leds:295: error: 'bitWrite' was not declared in this scope
leds:295: error: 'digitalWrite' was not declared in this scope
leds:302: error: 'LOW' was not declared in this scope
leds:302: error: 'bitWrite' was not declared in this scope
leds:302: error: 'bitWrite' was not declared in this scope
leds:302: error: 'digitalWrite' was not declared in this scope
leds:304: error: 'bitRead' was not declared in this scope
leds:305: error: 'HIGH' was not declared in this scope
leds:305: error: 'bitWrite' was not declared in this scope
leds:305: error: 'bitWrite' was not declared in this scope
leds:305: error: 'digitalWrite' was not declared in this scope
leds:307: error: 'HIGH' was not declared in this scope
leds:307: error: 'bitWrite' was not declared in this scope
leds:307: error: 'bitWrite' was not declared in this scope
leds:307: error: 'digitalWrite' was not declared in this scope
leds:308: error: 'LOW' was not declared in this scope
leds:308: error: 'bitWrite' was not declared in this scope
leds:308: error: 'bitWrite' was not declared in this scope
leds:308: error: 'digitalWrite' was not declared in this scope
leds:309: error: 'LOW' was not declared in this scope
leds:309: error: 'bitWrite' was not declared in this scope
leds:309: error: 'bitWrite' was not declared in this scope
leds:309: error: 'digitalWrite' was not declared in this scope
leds:310: error: 'HIGH' was not declared in this scope
leds:310: error: 'bitWrite' was not declared in this scope
leds:310: error: 'bitWrite' was not declared in this scope
leds:310: error: 'digitalWrite' was not declared in this scope
leds:311: error: 'HIGH' was not declared in this scope
leds:311: error: 'bitWrite' was not declared in this scope
leds:311: error: 'bitWrite' was not declared in this scope
leds:311: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_on()':
leds:319: error: 'HIGH' was not declared in this scope
leds:319: error: 'bitWrite' was not declared in this scope
leds:319: error: 'bitWrite' was not declared in this scope
leds:319: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_off()':
leds:323: error: 'LOW' was not declared in this scope
leds:323: error: 'bitWrite' was not declared in this scope
leds:323: error: 'bitWrite' was not declared in this scope
leds:323: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_slow_blink()':
leds:327: error: 'copter_leds_GPS_blink' was not declared in this scope
leds:330: error: 'bitRead' was not declared in this scope
leds.pde: In function 'void copter_leds_GPS_fast_blink()':
leds:340: error: 'copter_leds_GPS_blink' was not declared in this scope
leds.pde: In function 'void copter_leds_aux_off()':
leds:350: error: 'LOW' was not declared in this scope
leds:350: error: 'bitWrite' was not declared in this scope
leds:350: error: 'bitWrite' was not declared in this scope
leds:350: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void copter_leds_aux_on()':
leds:354: error: 'HIGH' was not declared in this scope
leds:354: error: 'bitWrite' was not declared in this scope
leds:354: error: 'bitWrite' was not declared in this scope
leds:354: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_on()':
leds:358: error: 'HIGH' was not declared in this scope
leds:358: error: 'bitWrite' was not declared in this scope
leds:358: error: 'bitWrite' was not declared in this scope
leds:358: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_off()':
leds:362: error: 'LOW' was not declared in this scope
leds:362: error: 'bitWrite' was not declared in this scope
leds:362: error: 'bitWrite' was not declared in this scope
leds:362: error: 'digitalWrite' was not declared in this scope
leds.pde: In function 'void piezo_beep()':
leds:367: error: 'delay' was not declared in this scope
limits.pde: In function 'void limits_loop()':
limits:53: error: 'millis' was not declared in this scope
limits:129: error: 'millis' was not declared in this scope
limits:140: error: 'millis' was not declared in this scope
limits:173: error: 'millis' was not declared in this scope
limits:195: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:195: error: 'oldSwitchPosition' was not declared in this scope
limits:196: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:216: error: 'millis' was not declared in this scope
limits:229: error: 'class AP_Limits' has no member named 'old_mode_switch'
limits:229: error: 'oldSwitchPosition' was not declared in this scope
limits:259: error: 'set_mode' was not declared in this scope
limits:260: error: 'millis' was not declared in this scope
limits:286: error: 'millis' was not declared in this scope
limits:288: error: 'set_mode' was not declared in this scope
limits:297: error: 'millis' was not declared in this scope
limits:301: error: 'set_mode' was not declared in this scope
limits:324: error: 'millis' was not declared in this scope
limits:331: error: 'set_mode' was not declared in this scope
limits.pde: In function 'void limits_send_mavlink_status(mavlink_channel_t)':
limits:347: error: 'millis' was not declared in this scope
motors.pde: In function 'void init_arm_motors()':
motors:123: error: 'bitRead' was not declared in this scope
motors:125: error: 'delay' was not declared in this scope
motors:157: error: 'HIGH' was not declared in this scope
motors:157: error: 'digitalWrite' was not declared in this scope
motors.pde: In function 'void init_disarm_motors()':
motors:198: error: 'bitRead' was not declared in this scope
navigation.pde: In function 'void update_navigation()':
navigation:16: error: 'millis' was not declared in this scope
navigation:20: error: 'min' was not declared in this scope
navigation:66: error: 'millis' was not declared in this scope
navigation.pde: In function 'void run_navigation_contollers()':
navigation:184: error: 'set_mode' was not declared in this scope
navigation:242: error: 'wp_control' was not declared in this scope
navigation:253: error: 'wp_control' was not declared in this scope
navigation:268: error: 'wp_control' was not declared in this scope
navigation.pde: In function 'void update_nav_wp()':
navigation:297: error: 'wp_control' was not declared in this scope
navigation:360: error: 'constrain' was not declared in this scope
navigation.pde: In function 'void calc_loiter(int16_t, int16_t)':
navigation:480: error: 'constrain' was not declared in this scope
navigation.pde: In function 'void calc_nav_rate(int16_t)':
navigation:545: error: 'constrain' was not declared in this scope
navigation.pde: In function 'int16_t get_desired_speed(int16_t)':
navigation:616: error: 'min' was not declared in this scope
navigation:620: error: 'min' was not declared in this scope
navigation:621: error: 'max' was not declared in this scope
navigation.pde: In function 'int32_t get_yaw_slew(int32_t, int32_t, int16_t)':
navigation:735: error: 'constrain' was not declared in this scope
radio.pde: In function 'void init_rc_out()':
radio:71: error: 'byte' was not declared in this scope
radio:71: error: expected `;' before 'i'
radio:71: error: 'i' was not declared in this scope
radio:72: error: 'delay' was not declared in this scope
radio:95: error: 'delay' was not declared in this scope
radio.pde: In function 'void read_radio()':
radio:146: error: 'min' was not declared in this scope
radio:150: error: 'millis' was not declared in this scope
radio.pde: In function 'void trim_radio()':
radio:203: error: 'byte' was not declared in this scope
radio:203: error: expected `;' before 'i'
radio:203: error: 'i' was not declared in this scope
sensors.pde: In function 'void read_receiver_rssi()':
sensors:144: error: 'constrain' was not declared in this scope
setup.pde: In function 'int8_t setup_mode(uint8_t, const Menu::arg*)':
setup:72: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_factory(uint8_t, const Menu::arg*)':
setup:133: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_radio(uint8_t, const Menu::arg*)':
setup:151: error: 'delay' was not declared in this scope
setup:158: error: 'delay' was not declared in this scope
setup:194: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_motors(uint8_t, const Menu::arg*)':
setup:237: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_accel(uint8_t, const Menu::arg*)':
setup:252: error: 'delay' was not declared in this scope
setup.pde: In function 'void setup_printf_P(const prog_char_t*, ...)':
setup:267: error: invalid conversion from 'void*' to 'int'
setup:267: error: initializing argument 2 of 'void BetterStream::vprintf_P(const prog_char_t*, int)'
setup.pde: In function 'void setup_wait_key()':
setup:275: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_accel_scale(uint8_t, const Menu::arg*)':
setup:290: error: 'delay' was not declared in this scope
setup.pde: In function 'int8_t setup_flightmodes(uint8_t, const Menu::arg*)':
setup:320: error: 'byte' was not declared in this scope
setup:320: error: expected `;' before '_switchPosition'
setup:321: error: expected `;' before '_oldSwitchPosition'
setup:328: error: 'delay' was not declared in this scope
setup:330: error: '_switchPosition' was not declared in this scope
setup:330: error: 'readSwitch' was not declared in this scope
setup:334: error: '_oldSwitchPosition' was not declared in this scope
setup:337: error: 'constrain' was not declared in this scope
setup:340: error: 'print_switch' was not declared in this scope
setup:356: error: 'print_switch' was not declared in this scope
setup:364: error: 'print_switch' was not declared in this scope
setup:372: error: 'print_switch' was not declared in this scope
setup.pde: In function 'int8_t setup_declination(uint8_t, const Menu::arg*)':
setup:392: error: 'radians' was not declared in this scope
setup.pde: At global scope:
setup:784: error: variable or field 'report_wp' declared void
setup:784: error: 'byte' was not declared in this scope
ArduCopter.pde:204: warning: 'int16_t get_heli_rate_roll(int32_t)' declared 'static' but never defined
ArduCopter.pde:206: warning: 'int16_t get_heli_rate_pitch(int32_t)' declared 'static' but never defined
ArduCopter.pde:208: warning: 'int16_t get_heli_rate_yaw(int32_t)' declared 'static' but never defined
ArduCopter.pde:258: warning: 'void send_simstate(mavlink_channel_t)' declared 'static' but never defined
GCS_Mavlink.pde:2107: warning: 'void gcs_send_text(gcs_severity, const char*)' defined but not used
Log.pde:873: warning: 'void Log_Write_Startup()' defined but not used
Log.pde:904: warning: 'void Log_Write_Data(uint8_t, float)' defined but not used
Log.pde:915: warning: 'void Log_Write_Data(uint8_t, int16_t)' defined but not used
Log.pde:1016: warning: 'void Log_Write_DMP()' defined but not used
Parameters.pde:633: warning: 'void load_parameters()' defined but not used
leds.pde:93: warning: 'void clear_leds()' defined but not used
navigation.pde:646: warning: 'void force_new_altitude(int32_t)' defined but not used
radio.pde:21: warning: 'void init_rc_in()' defined but not used
radio.pde:61: warning: 'void init_rc_out()' defined but not used
sensors.pde:6: warning: 'void ReadSCP1000()' defined but not used
sensors.pde:10: warning: 'void init_sonar()' defined but not used
ArduCopter.pde:498: warning: 'void report_sonar()' declared 'static' but never defined
ArduCopter.pde:499: warning: 'void report_frame()' declared 'static' but never defined
ArduCopter.pde:500: warning: 'void report_radio()' declared 'static' but never defined
ArduCopter.pde:501: warning: 'void report_ins()' declared 'static' but never defined
ArduCopter.pde:502: warning: 'void report_compass()' declared 'static' but never defined
ArduCopter.pde:503: warning: 'void report_flight_modes()' declared 'static' but never defined
ArduCopter.pde:505: warning: 'void report_heli()' declared 'static' but never defined
ArduCopter.pde:506: warning: 'void report_gyro()' declared 'static' but never defined
ArduCopter.pde:508: warning: 'void print_radio_values()' declared 'static' but never defined
ArduCopter.pde:512: warning: 'void print_done()' declared 'static' but never defined
ArduCopter.pde:513: warning: 'void zero_eeprom()' declared 'static' but never defined
ArduCopter.pde:515: warning: 'void print_accel_offsets_and_scaling()' declared 'static' but never defined
ArduCopter.pde:517: warning: 'void print_gyro_offsets()' declared 'static' but never defined
ArduCopter.pde:519: warning: 'RC_Channel* heli_get_servo(int16_t)' declared 'static' but never defined
ArduCopter.pde:520: warning: 'int16_t read_num_from_serial()' declared 'static' but never defined
ArduCopter.pde:522: warning: 'void print_blanks(int16_t)' declared 'static' but never defined
ArduCopter.pde:524: warning: 'void print_divider()' declared 'static' but never defined
ArduCopter.pde:525: warning: 'void print_enabled(bool)' declared 'static' but never defined
ArduCopter.pde:527: warning: 'void init_esc()' declared 'static' but never defined
ArduCopter.pde:528: warning: 'void print_wp(Location*, int)' declared 'static' but never defined
ArduCopter.pde:529: warning: 'void report_version()' declared 'static' but never defined
ArduCopter.pde:530: warning: 'void report_tuning()' declared 'static' but never defined
ArduCopter.pde:531: warning: 'void run_cli(FastSerial*)' declared 'static' but never defined
ArduCopter.pde:532: warning: 'void init_ardupilot()' declared 'static' but never defined
ArduCopter.pde:533: warning: 'void startup_ground()' declared 'static' but never defined
ArduCopter.pde:536: warning: 'void init_simple_bearing()' declared 'static' but never defined
ArduCopter.pde:539: warning: 'uint32_t map_baudrate(int8_t, uint32_t)' declared 'static' but never defined
ArduCopter.pde:540: warning: 'void check_usb_mux()' declared 'static' but never defined
ArduCopter.pde:543: warning: 'void reboot_apm()' declared 'static' but never defined
ArduCopter.pde:545: warning: 'void print_flight_mode(uint8_t)' declared 'static' but never defined
ArduCopter.pde:546: warning: 'void print_hit_enter()' declared 'static' but never defined
ArduCopter.pde:547: warning: 'void print_test_disabled()' declared 'static' but never defined
ArduCopter.pde:673: warning: 'climb_rate_actual' defined but not used
ArduCopter.pde:675: warning: 'climb_rate_error' defined but not used
ArduCopter.pde:688: warning: 'saved_toy_throttle' defined but not used
ArduCopter.pde:798: warning: 'yaw_timer' defined but not used
Log.pde:223: warning: 'int8_t process_logs(uint8_t, const Menu::arg*)' defined but not used
setup.pde:61: warning: 'int8_t setup_mode(uint8_t, const Menu::arg*)' defined but not used

Views: 5535

Reply to This

Replies to This Discussion

Scott, I had a similar issue Saturday while trying to compile the Ardurover code.    The latest Ardurover code requires the Arduino IDE in the downloads area becase the next generation of firmware (3.0+ I guess) includes support for different hardware platforms.  I suspect that IDE will be used for firmware relases after AC 2.9.  Apparently, the current Ardurover code (in alpha) uses the next generation code requiring the special IDE in the downloads area.  Its pretty cool actually.  The next generation firmware will have board support (APM1, APM , etc.), just like you select the AVR chip now in the IDE.  No longer will you have to uncomment the #define for APM2.

So to get AC 2.9rc4 to compile, I had to use the regular Arduino IDE (1.0.3).  It took a while to sort this out - just like you.

A suggestion to the developers:  The file "ArduCopter.pde" contains the following statement:

"*  Requires modified "mrelax" version of Arduino, which can be found here:

http://code.google.com/p/ardupilot-mega/downloads/list"

This statement is old and misleading and should be updated as the toolchain changes.

I'm glad you got it to work Scott.

Hi All,

I have had no problems using the ArduPilot version of the Arduino IDE 1.0.3 to compile the latest ArduRover code from the Git. I did have to have the ArduPilot libraries and the ArduRover2 code in the same root directory as the ArduPilot IDE 1.0.3. Also, you need to restart ArduPilot IDE 1.0.3 after using the "Ardupilot" function in the IDE header to select the correct "HAL" configuration.

Just a thought.

Regards,

TCIII

Just a tip for those trying to compile the latest beta code based on the new "Hardware Abstraction Layer" (HAL) architecture. It requires a special patched version of Arduino that you can find in the downloads section here:

http://code.google.com/p/ardupilot-mega/downloads/list 

Hi all,

Same problem here with me, trying to compile ArduCopter 2.8.1 and Arducopter 2.9 using Arduino IDE.

Well it does compile without errors when NOT selecting the Board from Ardupilot->HAL Board Menu. But has anyone seen a difference between the sketch compiled and uploaded by Arduino this way and the one that mission planner automatically uploads? 

In flight data tab of mission planner when you connect to your APM 2.x board, the dataStream begins and you can see things move in the top-left indicator as you change the orientation of your board. However the firmware compiled from Arduino IDE by NOT selecting the board does not show any such thing. 

Conclusion: There is a reason why the ArduPilot menu is included. But then why does it give compile errors on choosing the board?

Thomas: Could you please describe in detail the steps you followed and got the code compile successfully even after selecting the board.

@All: Has anyone tried compiling using AVR Studio or from the command-line ??

Raj: Are you using the special version of Arduino I linked to above?

Yes, Chris ! And so I am having the ArduPilot menu.

Is there any resolution on this? I also get these errors when trying to compile with the Arduino.app from ArduPilot-Arduino-1.0.3-Mac.zip on the download site. I also suspected the Exclude Core directive, and I'm about to go downgrade to 1.0.2 to see if that works.

I ended up using the standard version of Arduino from the Arduino Web Site. Compiled for the 2560. Code worked fine. Could not get the HAL version to work at all.

cool, that's what I've done as well. seems to compile, guess I'll find out whether it'll fly tonight.

I got it working no problem.  I just cloned the latest master branch from https://github.com/diydrones/ardupilot, into D:\git\ardupilot and installed the patched Arduino IDE from here into D:\Arducopter\ArduPilot-Arduino-1.0.3-windows, then did this to merge the libraries.

 

xcopy /s D:\git\ardupilot\libraries D:\Arducopter\ArduPilot-Arduino-1.0.3-windows\libraries

 

Then I loaded up arduino.exe, then loaded d:\git\ardupilot\arducopter\arducopter.pde, set the Board to Arduino Mega 2560, set the HAL Board to ArduPilot Mega 2.x and hit Verify/Compile and it worked first time.

 

Hey Folks,

I have a question I think is probably related to this thread, I posted it in its own thread but this thread seems so well populated and on the right track I wonder if I might ask it here?

If I'm out of order please mods, move or delete. It's a bit long I apologise in advance.

I'll copy my original question and follow up's here, Dimitri did offer some advice yesterday for which i'm grateful but the assumption is that the IDE is working OK which, judging by this thread, may not be the case.

My original post was:

I read a couple of posts relating to the non standard placement of the motors with the TBS Discovery frame and thought it might be a good idea to adjust for their offsets.

I have a couple of questions regarding this:

The first is, what values would I need to change? I read that the % distance of the motors from the pitch and roll axis are the important thing and also that angle is the important thing.

Which is it most likely to be and..

The second is, what is the simplest way for me to make the required changes to the code?

I'm quite computer literate but I'm no programmer. Obviously, I didn't embark on the APM route thinking I'd never need to do any programing but I would also like to get this baby in the air without having to do a  degrees worth of study first, AFAIK, I only need to change 4 values.

I am interested in the code side of things but hoped I could pick it up in bite sized chunks as I went along.

I think I need to change values in AP_MotorsQuad.cpp

I guess from what limited knowledge I have thus far plus a bit of err.. guesswork that I might need to do something like:

Download the code from the APM to the computer (using arduino IDE)

Locate the correct part of the code and edit it with the necessary changes,

Save the changes, Recompile the code and reupload it to the APM.

When I tried a dummy run on some code I'd DL from google code, I couldn't find the bit I needed to edit.

Any help on the above would be most appreciated.

Cheers

D

Then Dimitri kindly replied

You're correct about the filename, you do need to modify AP_MotorsQuad.cpp. It's under libraries folder , not Arducopter. You won't be able to edit with Arduino since its .cpp, any simple text editor will do though. After editing you'll need to compile it with Arduino (you'll need the modified version from here.) and upload. This is the wiki entry.

I went on to ask

Dimitri,

Thank you so much for the help.

Would I do something like this:

Connect to the APM using the (modified) arduino IDE,

Then download the code from the APM to the IDE,

Navigate to the sketch folder in windows explorer and use something like notepad to edit the AP_MotorsQuad.cpp file, save and exit.

Use the IDE to compile the code,

re-upload the code to the APM?

Or does the the request to the IDE to upload the code to the APM automatically compile it first then upload it in one action?

Sorry to sound so dumb and thanks again.

D

and also

I've just had a quick look at the IDE and wanted to ask a couple of things:

Would I set the tools----->programmer to USBasp or Arduino as ISP? (I'm using APM 2.5 with usb header on board)

Would I also set Ardupilot----->Hal board----->ArdupilotMega 2.X

Would I import the sketch from the APM using   Sketch----->Import library------->EEPROM ?

Sorry for all the dumb questions.

D

Since the post above I've learned a few things (I think!)

I need to change AP_Motorsquad.cpp (which is in the library) to this:

 // X frame set-up
        add_motor(AP_MOTORS_MOT_1,   62, AP_MOTORS_MATRIX_MOTOR_CCW, 1);
        add_motor(AP_MOTORS_MOT_2, -133, AP_MOTORS_MATRIX_MOTOR_CCW, 3);
        add_motor(AP_MOTORS_MOT_3,  -62, AP_MOTORS_MATRIX_MOTOR_CW,  4);
        add_motor(AP_MOTORS_MOT_4,  133, AP_MOTORS_MATRIX_MOTOR_CW,  2);

I'm assuming it's better to DL the code from the APM instead of from the repository so that I don't need to make every previous change each time I want to modifiy the code.

I did DL the V2.9 code and without modifying it in any way attempted to compile it by going to file-----> open and navigate to the folder\file :C:\Users\User\Downloads\Arducopter\ArduCopter-2.9\ArduCopter\ArduCopter.pde

Then  Sketch---->Verify/compile, but it would not compile without lots of errors and warnings.

Now I'm not sure weather I'm being a stoopid noob or the IDE is busted or a probable mixture of both?

Any comments would be most gratefully accepted!

Cheers

D

You can't "download the code from APM" as you suggest. The image on the APM is a compiled binary. The correct thing to do is grab the code from the repository (as you've done) modify it, compile, and upload.

You will likely have to re-do any configuration changes after you upload. 

My guess, not seeing the errors you are referencing, that your compile is failing due to missing or old libraries. You need to copy the directories under "ArduCopter-2.9\libraries\" to the libraries directory in your arduino distribution. Also, don't forget to modify your APM_Config.h to match your configuration before compiling.

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service